|
abbeyvet -> RE: Making A Popup Window (5/10/2003 16:55:30)
|
Yes, you can do that. All you need to do is add a ' target' to your <a> tag. You can call the target anything you like, let' s call it " monkey" . So you would have: <a href=" etc etc" other stuff target=monkey> Basically what happens then is that when the user clicks the first link the browser says: " Ah, they want me to open this link in a window called " monkey" . But there is no existing window called " monkey" ! No problem, I' ll just make one" If the user closes the window, this is repeated each time a link is clicked. however if the user does NOT close the window, then clicks another link containing target=" monkey" , the browser says: " OK! Another link for that window " monkey" , there is already a window open called that name, so I will open the link in that window" There is just one thing you need to be aware of here - if the user clicks a second link, it may open in the same (monkey) window, but if this window is under the main window at the time, the user may be blissfuly unaware that the content in the popup has changed, and instead assume that the link did not work. If you are literally opening images in the pop up there is little you can do about this. If you are on the other hand opening actual web pages containing an image you can put this into the <body> tag of the page that will open in the popup: ONLOAD=" focus()" That will bring the popup window to the top when a new page is loaded into it.
|
|
|
|