469,287 Members | 2,709 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,287 developers. It's quick & easy.

location.href, a popup and frames

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 ?
Jul 23 '05 #1
3 2165
In article <cb**********@news4.tilbu1.nb.home.nl>, hl*****@fjslfj.com
enlightened us with...
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.

--
--
~kaeli~
No one is listening until you make a mistake.
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace

Jul 23 '05 #2
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" <ti******@NOSPAM.comcast.net>
Newsgroups: comp.lang.javascript
Sent: Friday, June 25, 2004 3:23 PM
Subject: Re: location.href, a popup and frames

In article <cb**********@news4.tilbu1.nb.home.nl>, hl*****@fjslfj.com
enlightened us with...
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.

--
--
~kaeli~
No one is listening until you make a mistake.
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace

"Chris Geerdink" <hl*****@fjslfj.com> schreef in bericht
news:cb**********@news4.tilbu1.nb.home.nl... 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 ?

Jul 23 '05 #3
In article <cb**********@news1.tilbu1.nb.home.nl>, hl*****@fjslfj.com
enlightened us with...
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?

else
Where is this PHP code?
It needs to be in a syntactically valid HTML document between the <body>
and </body> tags for the javascript to run.
{
$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. ;)
--
--
~kaeli~
Can you be a closet claustrophobic?
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace

Jul 23 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

10 posts views Thread by Scott | last post: by
14 posts views Thread by Frances Del Rio | last post: by
19 posts views Thread by Darren | last post: by
2 posts views Thread by ENIZIN | last post: by
4 posts views Thread by ChrisC | last post: by
6 posts views Thread by August Karlstrom | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.