skydanb said the following on 12/4/2005 1:46 PM:[color=blue]
> I'm a j-script (and html) newbie with what I thought was a simple
> requirement:
>
> 1) From a link in a primary window open a secondary window
> 2) Want to specify size of secondary window
> 3) Want primary window NOT to reload when secondary opens
>
> Don't want to prejudge the approach; I'm guessing Javascript can help,
> and in fact have accomplished 1) and 2) above with the following,
> embedded in the body of the primary window html:
>
> <a href="javascript
:location='primary_window.html';
> window.open('secondary_window.html', 'secondary_window_label',
> 'height=345,width=550')">link_text</a>
>
> But when the secondary window opens, the primary window reloads.[/color]
Thats because you are telling it to in the href attribute.
And don't use javascript
: hrefs. It's in the FAQ.
[color=blue]
> I've seen earlier posts addressing this problem (or similar ones), but I
> haven't been able to make any of the suggestions work. Any guidance
> much appreciated.[/color]
And you didn't find this solution?
<a href="secondary_window.html" target="secondary_window_label"
onclick="window.open(this.href,this.target,'attrib utes here')">
link_text</a>
--
Randy
comp.lang.javascript FAQ -
http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices -
http://www.JavascriptToolbox.com/bestpractices/