Jump to content

Archived

This topic is now archived and is closed to further replies.

johnnyk

Function not working, escaping problem?

Recommended Posts

Why isn't this working:

function directions(id){
  window.open('\"directions.html?id=' + id + '\",\"directions\",\"toolbar=no, location=no, directories=no, status=no, menubar=yes, scrollbars=yes, resizable=no, copyhistory=no, width=500, height=400\"')
}

Share this post


Link to post
Share on other sites
[code]
function directions(id){
  window.open("directions.html?id=" + id,"directions","toolbar=no, location=no, directories=no, status=no, menubar=yes, scrollbars=yes, resizable=no, copyhistory=no, width=500, height=400");
}
[/code]

Share this post


Link to post
Share on other sites
If you don't mind, how about one more I can't figure out:

[code]
function picture(img,width,height){
  window.open("pictures2b.html?img=" + img,"picture","toolbar=no, location=no, directories=no, status=no, menubar=yes, scrollbars=yes, resizable=no, copyhistory=no, width=" + width + ", height=" + height);
}
[/code]

I'm no good at Javascript.
::tear::

Share this post


Link to post
Share on other sites
this looks fine, post the code you use when you call this function.

Share this post


Link to post
Share on other sites
Ahh, there was a problem in the HTML (...target="picture"...). Thanks for the help.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.