location.href, a popup and frames

C

Chris Geerdink

i made myself a guestbook. when people want to write in it, a pop-up appears
with the form. now this is what i want to happen when they wrote in it:

the pop-up has to close itself ( self.close() ? ) and the guestbook page has
to refresh itself in a frame called 'inhoud'...

can somebody help me pls ?
 
K

kaeli

i made myself a guestbook. when people want to write in it, a pop-up appears
with the form. now this is what i want to happen when they wrote in it:

the pop-up has to close itself ( self.close() ? ) and the guestbook page has
to refresh itself in a frame called 'inhoud'...

can somebody help me pls ?

opener.reload(true);
self.close();

Assuming the 'inhoud' frame was the window that opened the popup.

--
 
C

Chris Geerdink

Here is the script of my guestbook. its a combo between php and javascript.
de $query inserts the data in the mysql database. and then the window has to
close itself... but it wont work :(

else
{
$query1 = mysql_query("INSERT INTO gbook (naam, email, text) VALUES
('".$_POST['naam']."', '".$_POST['email']."', '".$_POST['text']."')");
?>
<script language="JavaScript">
<!--
opener.reload(true);
self.close();
//-->
</script>
<?
}

And here is the javascript of how i open the popup window. maybe that can
help

<script language="JavaScript">
<!--
function popup(url)
{
window.open(url, 'Gastenboek', 'scrollbars=yes,height=400,width=400')
}
//-->
</script>



----- Original Message -----
From: "kaeli" <[email protected]>
Newsgroups: comp.lang.javascript
Sent: Friday, June 25, 2004 3:23 PM
Subject: Re: location.href, a popup and frames
 
K

kaeli

Here is the script of my guestbook. its a combo between php and javascript.
de $query inserts the data in the mysql database. and then the window has to
close itself... but it wont work :(

'It doesn't work' is a bit of a general statement.
Does it throw an error?
Does anything happen at all?

Where is this PHP code?
It needs to be in a syntactically valid HTML document between the <body>
and said:
{
$query1 = mysql_query("INSERT INTO gbook (naam, email, text) VALUES
('".$_POST['naam']."', '".$_POST['email']."', '".$_POST['text']."')");
?>
<script language="JavaScript">
<script language="javascript" type="text/javascript">

If it still won't close the window, look at the HTML source of the popup
and post it here (view source). The php runs on the server. I don't care
what it says. Only what the browser sees matters here. ;)


--
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top