25 users online (2 members and 23 guests)  


  Results 1 to 4 of 4

Related

  1. Popup-like window    Forum: HTML Forum
    Replies: 0
  2. Passing value from parent window to child window    Forum: Javascript Forum
    Replies: 0
  3. Replies: 1
  4. New Image Window    Forum: HTML Forum
    Replies: 2
  1. #1
    TechExpressInc's Avatar
    New User

    Status
    Offline
    Join Date
    Aug 2008
    Posts
    1

    Question Pop-up Window within PHP how?

    I have an inframe PHP coded form within a HTML page. I like to have a pop-up window for more info.
    I can not figure out how.

    I think I have to exit the PHP secession and start a HTML secession and put in some javascript??

    Can someone give some help on what direction to go and how?

    Thanks a Lot
    Russ

  2. #2
    rangana's Avatar
    Moderator/Allstar

    Status
    Offline
    Join Date
    Feb 2008
    Location
    Cebu City Philippines
    Posts
    317

    Re: Pop-up Window within PHP how?

    JS in PHP will work without constraints. You just need to surround it with <script></script> tags. A basic example to keep you going:
    PHP Code:
    <?php
    echo '<script type="text/javascript">
    window.onload=function(){alert("It\'s been parsed correctly.");}
    </script>'
    ;
    ?>
    Checkout my porfolio.
    Please click the button when a member helped you.
    Take time to use Forum's Search function.

  3. #3
    thegotoguy's Avatar
    Disabled

    Status
    Offline
    Join Date
    Aug 2008
    Location
    Oklahoma
    Posts
    1

    Re: Pop-up Window within PHP how?

    Or you can look here on this site for a quick tutorial...I looked it up in the webmaster tools area up there. ^^
    http://www.ahfb2000.com/popupmakertool.php

  4. #4
    jthayne's Avatar

    Status
    Offline
    Join Date
    Aug 2008
    Location
    Texas
    Posts
    508

    Re: Pop-up Window within PHP how?

    The best way to do it is to use JavaScript. There is a great tool here to create a popup window (thanks to gotoguy). There are also quite a few scripts out on the web (for free) that will do what you need as well.

    rangana has the right of it as well. You don't have to create a whole new script in order to server up HTML/JavaScript code. You have two options.

    Option #1
    Code:
    <?php
    echo "HTML code here";
    ?>
    Option #2
    Code:
    <?php
    php code here
    ?>
    HTML code here
    So basically, your options are to print the HTML via PHP or serve the HTML within the same file, but outside the PHP script.

    Hope that answers your question. I can help you figure out what you need more if you need the additional assistance.



Tags for this Thread