Results 1 to 4 of 4

Thread: Popup upon if

  1. #1
    Join Date
    Oct 2009
    Posts
    31
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default Popup upon if

    I have the following code:

    Code:
    if ($variable == "^") $_SESSION['zlib']=true;
      }
    
    //i want to open a popup here automatically
    
      }
    How would i open a popup automatically between the } ~ {?

    Thanks
    Last edited by newbtophp; 10-30-2009 at 05:15 AM.

  2. #2
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    What do you want to popup? A new window? A javascript alert?
    Jeremy | jfein.net

  3. #3
    Join Date
    Oct 2009
    Posts
    31
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default

    Nevermind, i managed to figure it out!

    Last edited by newbtophp; 10-30-2009 at 05:15 AM.

  4. #4
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    The structure of that code is not normal, or at least it is not a complete unit in itself.

    PHP Code:
    //ADDED:
    {{//open two layers of bracket


    //your code:

    if ($variable == "^"$_SESSION['zlib']=true//single-line-only if-statement
      
    //CLOSE bracket

    //i want to open a popup here automatically
    //Why here? What is this region defined as?
    //Do you want this as part of the if, or just inside the first
    //layer of brackets, but not inside the second?

      
    //close outer layer of brackets 
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

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
  •