|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Modify MAP Target
I have an image map that targets different files. I would like to modify it so that it opnes a new window. However, I want the new screen to be like a pop-up. No scroll-bars, no address bar and so forth. Here is the code for my Image Map.
<map name="Map"> <area shape="rect" coords="416,104,569,125" href="files/rules.doc" target="_blank"> <area shape="rect" coords="454,201,640,227" href="files/waiver.doc" target="_blank"> <area shape="rect" coords="58,104,222,125" href="muscle.htm" target="_blank"> <area shape="rect" coords="7,203,200,226" href="bodyfat.htm" target="_blank"> <area shape="rect" coords="50,304,220,324" href="beginnersampleworkout.htm" target="_blank"> <area shape="rect" coords="414,302,592,326" href="tobedetermined.htm" target="_blank"> </map> |
|
#2
|
|||
|
|||
|
RE: Modify MAP Target
here is a javascript function that makes opening windows easier and is customizable to your needs (Note please leave the credits in if you use the script as requested I did not write it so it is only fair.)
<script type="text/javascript"> <!-- /************************************************** ** Author: Eric King Url: http://redrival.com/eak/index.shtml This script is free to use as long as this info is left in Featured on Dynamic Drive script library (http://www.dynamicdrive.com) ************************************************** **/ var win=null; function NewWindow(mypage,myname,w,h,scroll,pos){ if(pos=="random"){LeftPosition=(screen.width)?Math.floor(Math.rand om()*(screen.width-w)):100;TopPosition=(screen.height)?Math.floor(Mat h.random()*((screen.height-h)-75)):100;} if(pos=="center"){LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?(screen.height-h)/2:100;} else if((pos!="center" && pos!="random") || pos==null){LeftPosition=0;TopPosition=20} settings='width='+w+',height='+h+',top='+TopPositi on+',left='+LeftPosition+',scrollbars='+scroll+',l ocation=no,directories=no,status=no,menubar=no,too lbar=no,resizable=yes'; win=window.open(mypage,myname,settings);} // --> </script> then in your area tags, put a javascript onclick event and call the function like so... <area shape="rect" coords="416,104,569,125" href="files/rules.doc" onclick="NewWindow(this.href,'popup',600,800,'no','center') ;return false;"> the function arguments are self explainatory, but if you have any questions let me know. The "return false" after the function call prevents the main page from going anywhere when you click the area. |
|
#3
|
|||
|
|||
|
RE: Modify MAP Target
Worked. Thank you!
|
![]() |
| Viewing: Codewalkers Forums > Other Technologies > Client Side Things > Modify MAP Target |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|