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

[eluser]rajyakshmik[/eluser]
Hi,
I have two div's .after clicking one button, one div will open.within first div i m giving name and email address and i m submitting the form.After submitting the form i need to display second div based on my form action.
Now my problem is it's going to controller but second div content is displaying ...Please help me on this..
#2

[eluser]Thorpe Obazee[/eluser]
Please show us some code and please explain the problem better.
#3

[eluser]rajyakshmik[/eluser]
My problem is resolved.thanks for ur reply
#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>




Theme © iAndrew 2016 - Forum software by © MyBB