Help please!
- Started
- Last post
- 20 Responses
- techma
I'm designing a site that contains an iframe with vertical scrolling, and a page within the iframe has pop-up links on it. The problem is, everytime a link gets clicked on, it "renews" the entire page (scrolls back to the beginning). How do I get it to stay where the link is without it scrolling back to the top? Any help is appreciated.
- grafholic0
link to the site or source would help.
how are you targeting the link?
- cosmo0
link please.
- UndoUndo0
named anchors maybe?
- techma0
I'm hosting it on my url for now
http://www.designitoutloud.com/p…
Thanks for taking the time you guys.
- techma0
I forgot to add:
It's the first link in the navbar titled "printers".
- -_MU_-0
I am being a Div - I can't see the links, which page are they one (section i mean?)
- -_MU_-0
Ok, now I am going to be a double Div - in my (limited use of) iFrames, I have not come across this line:
onclick="return loadIframe('ifrm', this.href)"
Any ideas what it does?
- blaw0
named anchors maybe?
UndoUndo
(Sep 23 05, 10:04)
- techma0
The Printers Section. The photos are links to popups. I guess I need to make that more clear.
- techma0
I'll cut you in on a little secret MU...I don't know! Haha. I'm a N00B. Sweet!!! Everybody EAT ME UP.
- -_MU_-0
Seriously though - I am no guru but this line in his code seems to say reload the iframe on click:
onclick="return loadIframe('ifrm', this.href)"
Am I tripping?
- -_MU_-0
Hey man, everyones a n00b at shit they don't know - anyonelse know about that code line?
- blaw0
change the href of # to #printer01 so the page jumps the the anchor tag printer01.
just make sure the anchor tag is positioned on the page so the the page doesn't move.
make sense?
- techma0
Thanks for pointing that out MU. I think you may have solved my dilemma.
- techma0
Thanks blaw!
- -_MU_-0
Listen to blaw - he knows far more about this shit than me!
- blaw0
check you out, MU... diving right back in to help folks out. very nice.
- -_MU_-0
thanks blaw. one night stand gig, at home alone with the beers and finally got bored of san andreas after what... 12 months?!?! OMFG!
- thismanslife0
I know the best way to fix this. But yeah, it's simply because you're using a # character in your href, this makes it scroll to the top.
You just need to add return false at the end of your JS onclick... ie.
"your js here; return false;"
- techma0
I love this site! Thanks for all of the input I always get guys.