Welcome Guest, Not a member yet? Register   Sign In
div display problem
#4

[eluser]Freshinc.Olly[/eluser]
In your controller you can have some process measures to check if the data is valid. For this, check out the Form Validation class.

Essencially if no other data is being passed to your view, you could simply pass a boolean variable inidcating whether or not to show the div.

Code:
$data['form_success'] = true;
$this->load->view('login', $data);

or if the form failed.

Code:
$data['form_success'] = false;
$this->load->view('login', $data);

then in your view you will need to have code to read this variable to either show or hide the div. You can do so by the following:

Code:
<div class="Message" style="visibility: &lt;?= ($data['form_success'] ? 'hidden' : 'visible'); ?&gt;;" >
The process completed successfully
</div>


Messages In This Thread
div display problem - by El Forum - 04-24-2009, 01:22 AM
div display problem - by El Forum - 04-24-2009, 01:25 AM
div display problem - by El Forum - 04-24-2009, 03:03 AM
div display problem - by El Forum - 04-24-2009, 03:33 AM



Theme © iAndrew 2016 - Forum software by © MyBB