By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,482 Members | 1,123 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,482 IT Pros & Developers. It's quick & easy.

avoiding jump with <a href="#" onclick="window.open....

P: n/a
Hi all

I have a file I open in a smaller window, like this:

<a href="#" onclick="window.open....

but it also causes the main window to jump to the top. What have
people done to avoid that?

BR
Sonnich

Feb 15 '07 #1
Share this Question
Share on Google+
4 Replies

P: n/a
jodleren said the following on 2/15/2007 7:31 AM:
Hi all

I have a file I open in a smaller window, like this:

<a href="#" onclick="window.open....

but it also causes the main window to jump to the top. What have
people done to avoid that?
onclick="window.open('.....');return false"

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Feb 15 '07 #2

P: n/a
Randy Webb wrote on 15 feb 2007 in comp.lang.javascript:
jodleren said the following on 2/15/2007 7:31 AM:
>Hi all

I have a file I open in a smaller window, like this:

<a href="#" onclick="window.open....

but it also causes the main window to jump to the top. What have
people done to avoid that?

onclick="window.open('.....');return false"
.... unless the modern IE/FF browser is set to always tab.

===============

What about gracefull
retardation/recreation/retalliation/what-was-that-d'mn-word-again?

<a
href='http://cnn.com/' target='_blank'
onclick='window.open(this.href);return false'
>
CNN
</a>

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Feb 15 '07 #3

P: n/a
On Feb 15, 12:31 pm, "jodleren" <sonn...@hot.eewrote:
Hi all

I have a file I open in a smaller window, like this:

<a href="#" onclick="window.open....
http://www.jibbering.com/faq/#FAQ4_24

" Instead, use <a href="something.html" onclick="somefunction();return
false"where something.html is a meaningful alternative. "

Feb 15 '07 #4

P: n/a
On Feb 15, 5:41 pm, "David Dorward" <dorw...@gmail.comwrote:
On Feb 15, 12:31 pm, "jodleren" <sonn...@hot.eewrote:
Hi all
I have a file I open in a smaller window, like this:
<a href="#" onclick="window.open....

http://www.jibbering.com/faq/#FAQ4_24

" Instead, use <a href="something.html" onclick="somefunction();return
false"where something.html is a meaningful alternative. "
I changed then items to buttons, it also makes more sence it that
place.

BR&Thanks
Sonnich

Feb 16 '07 #5

This discussion thread is closed

Replies have been disabled for this discussion.