#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2003
    Posts
    5
    Rep Power
    0

    getURL javascript!?!?


    Hi all,

    I can close a browser window within getURL using javascript:

    getURL("javascript:self.close();");

    But I always get a verification message BECAUSE I DID NOT OPEN THE BROWSER WINDOW USING JAVASCRIPT. I open the browser window by this method:

    getURL ("http://localhost/play/send.asp", "_blank", "GET");

    I need to call the ASP file using javascript within actionscript using something like this:

    getURL ("javascript:window.open('http://www.localhost/play/send.asp'...);

    This way, I won't get a verification message, but the variables are not getting passed to the asp file. I need to use the GET method for my ASP file. Any ideas how to use GET method within javascript?

    Alternatively, to close a browser window without the verification message popping up? Any way to "trick" the browser window into closing?

    Reason I'm doing this is I'm running the swf file as an exe, and not from within a browser window. Appreciate any help... please ;-)

    J.
  2. #2
  3. No Profile Picture
    Senior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2003
    Posts
    151
    Rep Power
    0
    when you specify

    getURL ("http://localhost/play/send.asp", "_blank", "GET");

    you are appending the variables to the URL automatically. so if you have two variables:

    var1 = 'hello';
    var2 = 'world';

    the url will automatically be:

    http://localhost/play/send.asp?var1=hello&var2=world

    when you call

    getURL ("javascript:window.open('http://www.localhost/play/send.asp'...);

    you are not sending any variables. so a way to do this is to make a string with the url and variables appended.

    so make a string s in your actionscript where

    s = "javascript:window.open('http://localhost/play/send.asp?var1=hello&var2=world');"

    and then do

    getURL (s);

    i did flash 5 about a year ago, so my syntax might be off, but you get the idea i hope.

IMN logo majestic logo threadwatch logo seochat tools logo