SitePoint Sponsor

User Tag List

Results 1 to 7 of 7

Thread: JS popup window

  1. #1
    SitePoint Member
    Join Date
    May 2003
    Location
    T dot O dot
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    JS popup window

    I have the following code in flash for a button:

    getURL ("javascript:NewWindow=window.open(link,'newWin','width=400,height=300,left=0,top=0,toolbar=No,location=No,scrollbars=No,status=No,resizable=No,fullscreen=No'); NewWindow.focus();void(0);");

    and a variable called link also in the same flash file
    but somehow it doesnt work

    if i replace the link in the call with a non variable
    it works.. I dont understand why
    please help =)

  2. #2
    SitePoint Zealot
    Join Date
    Mar 2002
    Location
    New York, NY
    Posts
    170
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    replace it with this:

    Code:
    getURL("javascript:NewWindow=window.open(" + link + ",'newWin','width=400,height=300,left=0,top=0,toolbar=No,location=No,location=No,scrollbars=No,status=No,resizable=No,fullscreen=No');NewWindow.focus();void(0);");
    zing
    Better-Barter.com
    Logo store full of unique, professional identities
    perfect for you or your client!

  3. #3
    SitePoint Member
    Join Date
    May 2003
    Location
    T dot O dot
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i copy the exact coding n replaced it
    n i got an error

  4. #4
    SitePoint Zealot
    Join Date
    Mar 2002
    Location
    New York, NY
    Posts
    170
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
    getURL ("java script:NewWindow=window.open(" + link + ",'newWin','width=400,height=300,left=0,top=0,toolbar=No,location=No,scrollbars=No,status=No,resizable=No,fullscreen=No'); NewWindow.focus();void(0);" );
    try that... note, you need to remove the space between java and script first, sitepoint automatically puts it there to protect itself

    zing
    Better-Barter.com
    Logo store full of unique, professional identities
    perfect for you or your client!

  5. #5
    SitePoint Member
    Join Date
    May 2003
    Location
    T dot O dot
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It kinda work when I replace it:
    for example

    if i use ur last posting code...did the space change
    link = "apple.html"
    if I ran the swf on it's own i get a new popup window with
    <indent>javascript:NewWindow=window.open(apple.html,'newWin','width=400,height=300,left=0,top=0,toolbar=No,location=No,scrollbars=No,status=No,resizable=No,fullscreen=No');</indent>

    but When I run the same file in html...
    I get nothing

    =(

  6. #6
    SitePoint Zealot
    Join Date
    Mar 2002
    Location
    New York, NY
    Posts
    170
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    perhaps you should get rid of the void(0); as i don't think it really does anything... other than that i'm afraid i can't really think of anything else...
    Better-Barter.com
    Logo store full of unique, professional identities
    perfect for you or your client!

  7. #7
    SitePoint Member
    Join Date
    May 2003
    Location
    T dot O dot
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    zing you almost had it...finally figured it out
    you gotta put
    '"+link+"'
    2 sets of quotations...

    thanks for the help tho


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •