Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2

Thread: pop up menu

  1. #1
    New to the CF scene
    Join Date
    May 2004
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    pop up menu

    i want to put condition like if..then ..else,if the first condition is true,then it will popup a window that contains file 1.normally ,as what i know,pop up will display if there is onclick button.but it is possible if after the condition, it will straight away display pop up window?i want to have the sample coding

    if a true
    then display pop up that contains file 1
    elseif b true
    then display pop up that contains file 2

  • #2
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,030
    Thanks
    0
    Thanked 247 Times in 244 Posts
    You display a popup by using the window.open method.
    Code:
    if (a){
      window.open(file1, "mypopup");
    }
    else if (b){
      window.open(file2, "mypopup");
    }


  •  

    Posting Permissions

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