By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
449,075 Members | 949 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 449,075 IT Pros & Developers. It's quick & easy.

location.href, a popup and frames

P: n/a
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
Share this Question
Share on Google+
3 Replies


P: n/a
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

P: n/a
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

P: n/a
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.