Codeigniter - open a page and jump to anchor point.

Hi.

I'm building my first app in Codeigniter; liking it...

I have one page updating some user data, and then going back to a summary screen.  All good.

Now once the update has happened, I want the controller to load the summary page, but also jump to a specific anchor on the view.

So the question: how do I display a specific anchor point in a view using the controller?

ta.
Cris.
CrisThompsonUKAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Ray PaseurCommented:
This is not CodeIgniter specific, it's just HTML.  If you have a URL with a hashtag at the end you can use the HTML anchor tag to cause the jump.
http://www.w3schools.com/tags/att_a_name.asp

I've never used this in HTML5 and W3Schools seems to believe that it is unsupported.  They recommend using the id attribute instead.
http://www.w3schools.com/tags/att_global_id.asp

You might find that the id attribute in combination with jQuery "Scroll" would be a good way to go.  The "id" must be unique so it can be used as a jQuery selector.
http://www.jquerysdk.com/api/scrollTo
http://flesler.blogspot.com/2007/10/jqueryscrollto.html

HTH, ~Ray
0
CrisThompsonUKAuthor Commented:
woops, forgot to close this question.

I didn;t get this working on a normal CI view display, but I did get it onto a refresh:

redirect("/managecards#$thisServiceID", 'refresh');

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
CrisThompsonUKAuthor Commented:
no other Codeigniter specific response.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Frameworks

From novice to tech pro — start learning today.