Web Analytics Made Easy -
StatCounter javascript popup windows with PHP - CodingForum

Announcement

Collapse
No announcement yet.

javascript popup windows with PHP

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • javascript popup windows with PHP

    Hello all!
    In my PHP page I printing in a table a list of records... for exsample - documents description. Each document has fields - name, type, etc and buttons - "Edit", "Delete"....
    I want using JavaScript open a popup modal window, in wich I can edit the fields of chousen document and two buttons - "Submit" and "Cansel".
    By pressing "Cansel" I want to close thise popup window and by pressing "Submit" - send form/fields data to PHP script and reload opener window to show changes.
    Can I do this and HOW????

  • #2
    <form action="page.php">
    ...
    <input type="submit" value="Submit" />
    <input type="button" value="Cancel" onclick="window.close()" />
    </form>

    then in page.php after the processing of form data, display this html:

    <html>
    <head>
    <script type="text/javascript">
    if (opener && !opener.closed) opener.location.reload();
    </script>

    </head>
    <body>
    content here...
    </body>
    </html>
    Glenn
    vBulletin Mods That Rock!

    Comment

    Working...
    X