PDA

View Full Version : Dynamically named URL's in javascript pop ups


mompiex
06-29-2005, 11:02 AM
Hi,

I've been pulling out my hair for some time trying to figure this one out - any help would be much appreciated.

I'm using xml to dynamically create url names (the variable dynamicUrl) that I then want to use to create popup windows. creating the url and getting it to work with a simple getURL works fine (see the commented out line below) but trying to make this work with the javascript is causing me problems.

on (release) {
getURL("javascript:newwin(dynamicUrl,'name',300,300)");
//getURL(dynamicUrl, "_blank");

}
Thanks a bunch

Cheers

Mompiex :eek: :eek: :eek:

Boskic.com
06-30-2005, 04:26 PM
Presuming that you have added newwin function in page, try something like thison (release) {
getURL("javascript:newwin("+dynamicUrl+",'name',300,300)");
}

mompiex
07-01-2005, 12:23 AM
thanks for that - I ended up needing to add an extra ' but you put me on the right track - thanks

on (release) {
getURL("javascript:newwin('"+dynamicUrl+"','name',300,300)");
}