473,583 Members | 3,413 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2285
In article <cb**********@n ews4.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(t rue);
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("IN SERT INTO gbook (naam, email, text) VALUES
('".$_POST['naam']."', '".$_POST['email']."', '".$_POST['text']."')");
?>
<script language="JavaS cript">
<!--
opener.reload(t rue);
self.close();
//-->
</script>
<?
}

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

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

----- Original Message -----
From: "kaeli" <ti******@NOSPA M.comcast.net>
Newsgroups: comp.lang.javas cript
Sent: Friday, June 25, 2004 3:23 PM
Subject: Re: location.href, a popup and frames

In article <cb**********@n ews4.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(t rue);
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**********@n ews1.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("IN SERT INTO gbook (naam, email, text) VALUES
('".$_POST['naam']."', '".$_POST['email']."', '".$_POST['text']."')");
?>
<script language="JavaS cript">

<script language="javas cript" 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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
14697
by: Scott | last post by:
I'm new to ASP, but I've been programming in VB for several years, and I'm having a few issues with this ASP enhancement I'm working on. I've found ASP to be a lot different than what I'm use to in VB. I've created an ASP interface where a user can select an email group that populates a listbox with those email addresses. If a user sees...
14
37143
by: Frances Del Rio | last post by:
I'm trying to open a url in a new window while pg loads (but NOT in a pop-up..) I need to do sthg like // while pg is loading.. window.location ='page.html' // but I need this to open in a new blank window.. // (NOT in a pop-up, a regular new window..) can you do this?? thank you..
3
50393
by: saiho.yuen | last post by:
Hi, Is anyone know what is the difference between Location.href and Window.location.href Thanks you very much:) Saiho
19
31033
by: Darren | last post by:
I have a page that opens a popup window and within the window, some databse info is submitted and the window closes. It then refreshes the original window using window.opener.location.reload(). The problem is that after the reload, it brings you right to the top of the page. When I click 'refresh" on the original page, it brings me back to...
1
10439
by: Leon | last post by:
From parent windows, I have created a popup windows that comprises two frames. When I have clicked a link button in one of the frames, I would like to redirect the parent windows to somewhere. So I did ------------------------------------------------------------------ <a href='#' onclick='window.opener.location.href...
2
2496
by: ENIZIN | last post by:
I am having an interesting problem where I am simply trying to put in country selection popup window on my site. When the user closes the window the popup should call the window.opener.location.reload(true) function and show the newly selected country. Well, when I try it from my MAC box I get an Access denied error but when I do it from my...
4
9957
by: ChrisC | last post by:
I have a nice simple page - navigation frame on the left, main panel on the right - <frameset cols = "20%, 80%"> <frame src="LeftPanel.aspx" id="leftFrame" name="leftFrame" width="20%" height="100%" frameborder="0" scrolling="no" /> <frame src="Default.aspx" id="RightFrame" name="RightFrame" width="80%" height="100%" frameborder="0"...
6
13844
by: August Karlstrom | last post by:
Hi everyone, I have some problems loading a page into a frame from a different frame. In Firefox and Explorer the lower frame displays "Test..." but in some older version of Safari it is left blank. Can anyone spot undefined behavior in the documents below or should we blame Safari? Regards,
0
7821
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8320
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7929
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6577
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5697
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5370
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3841
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2328
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
1152
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.