Javascript won't work when linked from ImageMap

grasshopper

New Member
I can't get my shopping cart javascript popup window to work when linked from an ImageMap. It works fine if posted stand-alone, pops up the window over the main page.
However when I try to use the same code launched from an ImageMap, it just opens up a new tab and shows the cart (I want the popup).

Question: How can I get this popup window to work when linked from an ImageMap? (see attached)
 

Attachments

  • code.jpg
    code.jpg
    21.8 KB · Views: 23

onlinetraining

New Member
A regular hyperlink with the target attribute set to blank opens a new window or tab depending on the settings of the end-user's web browser.

To have a link open a pop-up window, use:
<a href="javascript:window.open(URL, WindowName, Features).

URL will be the URL of the page that will be opened in the pop-up window.
WindowName can be anything name such as "cartwindow"
Features is a string of parameters such as:

"status,menubar,height=400,width=300"
 

grasshopper

New Member
Thanks for your help. I'll give it a go and let you know.

I'm not a web designer by profession but had to wear that hat in order to get my company off the ground, so the help is really appreciated.

Question: Since the code I posted already has most of the info, do I essentially just need to add "javascript:window.open to the above? How much do I have to modify the above code besides getting rid of the img tags and adding 'javascript:window.open' ?
 
Last edited:
Top