Problem with: onClick="window.open

J

Jack

Hello,
From my main page I am providing options to open a daughter window with the
specified width and height.
<a href="" onClick="window.open
('downloads.htm','sizechart','width=480,height=474,scrollbars=no,resizable=no,status=yes');">Downloads</a>

When that window is opened, and I execute another command:

<a href="#Dial Engine Pro" onClick="window.open
('downloads_dep.htm','sizechart','width=280,height=430,scrollbars=no,resizable=yes,status=yes');">Downloads</a>

the new window inherits dimensions from the already opened window.

What should I change in the code above to make sure, that the window always
opens with the specified parameters or it will open the second daughter
window?
Thanks for your input,
Jack
 
J

Jens Peter Karlsen [FP-MVP]

Give the popup windows different names.

Regards Jens Peter Karlsen. Microsoft MVP - Frontpage.
 
J

Jack

Thank you.
I understand you meant the different hyperlink name?
Is there another way of solving that problem?
Jack
 
J

Jack

I tried to change the hyperlink name to no avail.
I do not understand your reply. Please clarify.
Which window name do you mean?
In my code examples I use 2 different names:
'downloads.htm' and 'downloads_dep.htm'
or are they the same to you???
Jack
 
R

Ronx

'downloads.htm' and 'downloads_dep.htm' are page names - the popup
windows must be given different names.
At present the same window is used, named "sizechart". For the second
link, change sizechart to something else.
--
Ron Symonds - Microsoft MVP (FrontPage)
Reply only to group - emails will be deleted unread.
FrontPage Support: http://www.frontpagemvps.com/


Jack said:
I tried to change the hyperlink name to no avail.
I do not understand your reply. Please clarify.
Which window name do you mean?
In my code examples I use 2 different names:
'downloads.htm' and 'downloads_dep.htm'
or are they the same to you???
Jack
Jens Peter Karlsen said:
Give the popup windows different names.

Regards Jens Peter Karlsen. Microsoft MVP - Frontpage.
 
R

Ronx

PS
Your link will be better written as
<a href="downloads.htm" target="_blank"
onClick="window.open('downloads.htm','sizechart','width=480,height=474
,scrollbars=no,resizable=no,status=yes');return false">
If the user has javascript disabled they will still open the
downloads.htm page in a new window, rather than a pop up. The
original link would give a 404 error (page named "" does not exist)
Similarly for 'downloads_dep.htm', change the link to
<a href="#Dial Engine Pro" target="_blank"
onClick="window.open('downloads_dep.htm','sizechart','width=280,height
=430,scrollbars=no,resizable=yes,status=yes');return false">
Note the return false at the end of the onclick attribute.
--
Ron Symonds - Microsoft MVP (FrontPage)
Reply only to group - emails will be deleted unread.
FrontPage Support: http://www.frontpagemvps.com/


Jack said:
I tried to change the hyperlink name to no avail.
I do not understand your reply. Please clarify.
Which window name do you mean?
In my code examples I use 2 different names:
'downloads.htm' and 'downloads_dep.htm'
or are they the same to you???
Jack
Jens Peter Karlsen said:
Give the popup windows different names.

Regards Jens Peter Karlsen. Microsoft MVP - Frontpage.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top