Back To Start Of Archive
Taken From The Forum: Help & Support for DHTML Menu Version 5+
Forum Topic: Click to view post
Last Updated: Saturday July 14 2012 - 06:07:50
URL=Javascrip....
Poster: kkaiser
Dated: Tuesday December 30 2003 - 21:54:23 GMT
In version 3 a menu item might look like this;
,"Scoutmasters Heaven", "javascript:openNewWindow(\"http://kaiserklan.com/roundtable/poems/scoutmastersheaven.html\",650,425,\"resizable=yes\")",,,0
This was converted for version 5 to;
aI("text=Scoutmasters Heaven;url=javascript:openNewWindow(\http://kaiserklan.com/roundtable/poems/Scoutmastersheaven.html\¬650¬425¬\resizable=yes\);");
But this is not right, I keep getting an error on line 1 of what I assume is the function which is below, does anyone have an idea how it should look? I've played with just about every combination of symbols I can think of.
<script language="javascript">
function openNewWindow(winURL,winWidth,winHeight,winConfig){
var winl = (screen.width - winWidth) / 2;
var wint = (screen.height - winHeight) / 2;
mmConfig=""
mmConfig="width="+winWidth+","
mmConfig+="height="+winHeight+","
mmConfig+="top="+wint+","
mmConfig+="left="+winl+","
mmConfig+="scrollbars=true,"
mmConfig+=winConfig
var mmWin=open(winURL,"",mmConfig);
mmWin.focus();
}
</script>
Thanks ...
Poster: kevin3442
Dated: Wednesday December 31 2003 - 1:39:30 GMT
Hi,
Try using single quotes around the function call's string parameter instead of double quotes, like this:
Code:
aI("text=Scoutmasters Heaven;url=javascript:openNewWindow('http://kaiserklan.com/roundtable/poems/Scoutmastersheaven.html\',650,425,'resizable=yes');");
That should work. There's also a new method in v5 that does not require you to have the openNewWindow() function, using the target and targetfeatures menu item properties. You'll find a discussion of the new approach in sample 11.
Hope that helps,
Kevin
Thank You
Poster: kkaiser
Dated: Wednesday December 31 2003 - 3:52:57 GMT
Thanks ever so much, it works great.