Creative COW SIGN IN :: SPONSORS :: ABOUT US :: CONTACT US
WEB: Web Design Forum- TutorialsDreamweaver Forum- TutorialsFlash Forum- TutorialsWeb StreamingTraining

Open Pix in New Window

Cow Forums : Adobe Dreamweaver
Open Pix in New Window
by Eric Martin on Sep 9, 2008 at 12:43:10 pm

Have a jump menu inserted on a page that links to dated photos on a 3rd party host.
Would like that the links open in a new window instead of in the client window.
Remedy?

Thanks.


Respond to this post   •   Return to posts index

Re: Open Pix in New Window
by Abraham Chaffin on Sep 9, 2008 at 3:50:22 pm

Unfortunately with the method that DW is using to create the jump menu it can not be done through their GUI so you need to go into code view and make some changes.

When you create the jump menu through DW it creates something like this (parts underlined and bold we will be changing):


<head>
<script type="text/javascript">
<!--
function MM_jumpMenu(targ,selObj,restore){ //v3.0
eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
if (restore) selObj.selectedIndex=0;

}
//-->
</script>
</head>
<body>
<form name="form" id="form">
<select name="jumpMenu" id="jumpMenu" onchange="MM_jumpMenu('parent',this,0)">
<option value="http://library.creativecow.net">Library</option>
<option value="http://forums.creativecow.net">CreativeCOW</option>
</select>
</form>
</body>
</html>




We're going to replace the top part of the javascript with this line:


window.open (selObj.options[selObj.selectedIndex].value,targ);


And then the bottom part of the onChange function simply delete the word parent and leave the two apostrophes.

You should end up something like this:


<head>
<script type="text/javascript">
<!--
function MM_jumpMenu(targ,selObj,restore){ //v3.0
window.open (selObj.options[selObj.selectedIndex].value,targ);
}
//-->
</script>
</head>
<body>
<form name="form" id="form">
<select name="jumpMenu" id="jumpMenu" onChange="MM_jumpMenu('',this,0)">
<option value="http://library.creativecow.net">Library</option>
<option value="http://forums.creativecow.net">CreativeCOW</option>
</select>
</form>
</body>
</html>





Abraham

Respond to this post   •   Return to posts index

Re: Open Pix in New Window
by Eric Martin on Sep 10, 2008 at 11:26:23 am

Did the trick!

Muchas gracias,

Eric



Respond to this post   •   Return to posts index

<< PREVIOUS THREAD   •   VIEW ALL THREADS   •   PRINT   •   NEXT THREAD >>


FORUMSTUTORIALSMAGAZINEDVDsBOOKSPODCASTSEVENTSSERVICESNEWSLETTERNEWSBLOGS

© CreativeCOW.net All rights are reserved.

[Top]