Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Javascript How-To
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Javascript How-To Ask your "How do I do this with Javascript?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript How-To section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old May 16th, 2005, 01:46 PM
Registered User
 
Join Date: May 2005
Location: , , .
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default popup problem

I have problem with my popup window

Code:
//IT LOOKS LIKE THIS BUT I WANT A SCRIPT THAT CAN UPDATE THE DATABASE AFTER THE POPUP HAS BEEN CLOSED.
I HAVE TRIED TO USE ONUNLOAD BUT IT DOES NOT WORK BECAUSE I HAVE A FORM IN THE POPUP 

Can Somebody give me a script that may work

or should I give up  this thing? 

<script type="text/javascript" language="JavaScript">
var msg;
function WinOpen() {
  msg=open("","displayWindow","toolbar=no,director
ies=no,menubar=no,width=60, height=60 );
 if (msg == null) alert('Popup was blocked');
msg.document.write("<HEAD><TITLE>yo!</TITLE&g
t;</HEAD>");
msg.document.write("<html><head><title>Unt
itled Document</title>");
msg.document.write("</head>");
msg.document.write("<frameset rows='*,225' cols='*' framespacing='1' frameborder='1' border='1' >");
msg.document.write("<frame src='/chat.php' name='mainFrame' > ");
msg.document.write("<frame src='send.php' name='bottomFrame' ></frameset>");
msg.document.write("<noframes><body></body>
;</noframes></html>");
msg.focus();
        }
<SCRIPT>

//open.php
<?
<form>
<input type="button" name="Button1" value="Open " onclick="WinOpen()">
</form>
?>

//FILE2
echo"<form method=\"post\" action=\"quit.php\" target=\"_top\">
<input type=\"submit\" name=\"Submit\" value=\" Log off! \">
</form>";



//I WANT THIS SCRIPT TO EXECUTE THIS SCRIPT EVEN WHEN THE WINDOW IS CLOSED

//quit.php
<?php
$sql1="UPDATE chat SET users='0' WHERE id='$id'";
$result1 = pg_query($sql1);
if(file_exists("message.txt")){
$filnamn ="message.txt";
unlink($filename);
session_unset();
session_destroy();
?>
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem in closing the parent window from a popup rakesh.kashnia1 Javascript 4 July 9th, 2007 05:39 AM
Popup problem ppayal ASP.NET 1.0 and 1.1 Professional 1 July 21st, 2006 07:05 AM
Problem with closing popup fs22 Javascript 4 May 20th, 2004 09:37 AM
problem with Popup tgopal Javascript 4 October 29th, 2003 08:27 AM



All times are GMT -4. The time now is 03:51 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.