Banner

Sponsor

Login


Welcome Back!
Guest
Guest

Register

Lost your password?

77 users online



Stopping pop-ups forcing scrolling

Stopping pop-ups forcing scrolling

Currently viewing this thread: 1 (0 members and 1 guests)


exit-wd

exit-wd

stillat school, into web design and punk music etc.
Status: Offline!

Stopping pop-ups forcing scrolling

when you use javascript to open pop-ups, the page with the link automatically scrolls back to the top, which is especially annoying with large pages.

I was wondering if there's any way to stop this?

sparky

sparky

I need a haircut
Status: Offline!

Yeah.

Code:

<a [b]href="javascript:void(0);"[/b] onClick="yourPopupFunctionHere();"> ... blah blah blah ... </a>

href="#" is a simple more compliant way to make sure the browser doesn't wander to a different page. void(0); is a placeholder function that does nothing, but makes it a clickable link.

___________________

Jon Culver Chia Pets

Quick Jump:

Main Navigation


Site & Graphic Design by Aeon Tan
Developed by Jeremie Pelletier & Scott Roach


NeverAPI generated this page in 0.0065 seconds.