Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Imagemap Help 1

Status
Not open for further replies.
Jul 13, 2003
25
US
I have a form with a bunch of zip codes (checkboxes) based on the county selected. I have a "Map" link that opens a popup window with an imagemap of the county with a hotspot over each zip code. When I click the hotspot, the parent window gets updated correctly, but the popup window shows the value of what is passed (true).

I am trying to give the ability to select multiple zip codes by clicking the hotspot, which fills in the appropriate checkbox as they click. Then, I will have the user close the window when they are done selecting their desired zip codes. The parent window will then have all the selected zip code checkboxes checked.

Any help would be greatly appreciated. As I said, the code is "working" by filling in the correct checkbox, but the imagemap goes away and displays the last value passed. I want to not show anything but the map.

Thanks.

CODE
-----------------------------------

<map name="Map">
<area shape="poly" coords="31,100,51,159,69,157,71,167,81,167,84,153,99,150,107,147,108,139,117,138,129,133,137,126,59,93,58,99" href="javascript:window.opener.document.TPPMSADADD.s_MSADZIPA_77447.checked=true;">
</map>
 
Try changing this:

Code:
href="javascript:window.opener.document.TPPMSADADD.s_MSADZIPA_77447.checked=true;"

to this:

Code:
href="javascript:window.opener.document.TPPMSADADD.s_MSADZIPA_77447.checked=true; return(false);"

or this:

Code:
href="javascript:void(0);" onclick="window.opener.document.TPPMSADADD.s_MSADZIPA_77447.checked=true;"

Hope this helps,
Dan

[tt]D'ya think I got where I am today because I dress like Peter Pan here?[/tt]
[banghead]

 
Thank you very much! I had been struggling with this and your help got it working. Just an FYI, this is the code that worked.

Code:
href="javascript:void(0);" onclick="window.opener.document.TPPMSADADD.s_MSADZIPA_77447.checked=true;"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top