Welcome Guest, Not a member yet? Register   Sign In
hi.. question about views
#1

[eluser]jekjek[/eluser]
Hi guys. I am new with CI. is it possible to make my page go to a specific anchor in a page?
to make my question a bit clearer......

my view

Code:
<div id="body">
//some html tags
.........
</div>

<div id="message_form">
<a  name="message">
//some html tags
....
</a>
</div>

now when a visitor goes to http://mysite.com/ i want them to see <b>message_form</b>area right away. is that possible without using redirect function?

thanks..
#2

[eluser]davidbehler[/eluser]
Just add "#message" or "/#message" (not sure) to the end of your url, just like you would normally do it.
#3

[eluser]jekjek[/eluser]
hm... is it possible without putting the #message? because the scenario is like this.. I have a form.. once sent... if the request is successful i want the users to see the top of the page.. but if not i want them to see the #message area where the form fields are located so that the user can easily make the necessary changes in the fields. but if i redirect the page to url#message the input data will be gone and i will not be able to fill the fields with the data the user has entered.
#4

[eluser]jekjek[/eluser]
i got it.. hehe i put #message in my for action form_open('url#message')... thanks




Theme © iAndrew 2016 - Forum software by © MyBB