If you are not registered or logged in, you may still use these forums but with limited features. Show recent topics
  [Search] Search   [Hottest Topics] Hottest Topics   [Members]  Member Listing   [FAQ]  FAQ 
[Register] Register / 
[Login] Login 
Using poll_id number as anchor  XML
Forum Index » Support Forum
Author Message
medusahead
Beginner

Joined: 03/03/2007 04:40:48
Messages: 6
Offline

hello, one other thing.

I have several polls on a pages and when someone votes, the page goes back to the top & they have to scroll back down to see their results. Not a huge deal, but kind of annoying.

I searched the forum for anchoring tips, but had no luck.

Here's my idea, but I'm not sure how to make it work (if it will work):

For example, I make an <a name="7"> on my html page at the location of the poll in question, then I want to <a href="#$poll_id"> (or something like that) in the code/template to return the current poll_id number (in this case "7") back into the <a href> to the redirect script.

I feel like this might anchor to whatever poll is currently giving results...but I'm not sure how to implement it into the redirect...any hints?

Thanks
medusahead
Beginner

Joined: 03/03/2007 04:40:48
Messages: 6
Offline

hello,

Well, I'm hovering all around this problem & could use any advice anyone might have.

I can make links to the anchors in the template, but it needs to be automatic after a vote to get people back to the appropriate results, rather than the top of the page.
If I use a:

in the template, it doesn't make it to the final HTML page. I suspect that it is getting lost when the php processes. This tells me I need to make the redirect to the anchor via php...but where is it? I've scoured all the files, but am confused about what gets me back to my HTML after a vote.

Also, I considered stuffing the anchor (that has the same name as the poll-id) into a:

,but again, where? (if something like that would even work)

seriously, if anyone has any ideas, that would be awesome!
Thanks
medusahead
Beginner

Joined: 03/03/2007 04:40:48
Messages: 6
Offline

I got a little advice at phpfreaks about using poll_id to anchor via redirect...



But i'm starting to think that a redirect is unnecessary since the page with results loads anyway...

If I just find what part of the codes loads/reloads the page with the results, then maybe I can add anchor info to that...

I could really use some help...really any advice would be useful...

Thanks
 
Forum Index » Support Forum
Go to:   
Based on the open source JForum