JavaScript Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsWeb DesignJavaScript Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old August 9th, 2001, 05:06 PM
munkfish's Avatar
munkfish munkfish is offline
funky munky
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: Jul 2001
Location: UK
Posts: 1,446 munkfish User rank is Corporal (100 - 500 Reputation Level)munkfish User rank is Corporal (100 - 500 Reputation Level)munkfish User rank is Corporal (100 - 500 Reputation Level)munkfish User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 2 Days 18 h 45 m 36 sec
Reputation Power: 14
javascript and php - a refreshing post (*groan*)

Ok, I asked a question in here about resolution sniffing and PHP a while back and the question was resolved very nicely... I'm hoping someone can help again!

The problem regards refreshing one window from another using the javascript 'opener.location.reload()' call.

I have a script to allow users to add a gig for their band. At a point in the script, they have the option to click a link which adds a new venue if the venue they're playing at is not currently listed.

On clicking the link, a new window opens and the code for adding a new venue is invoked.

After successfully adding a new venue, the venue window is closed and the referring window (the gigs screen) is refreshed to reflect the changes made to the venues list.

This is achieved using the following php after successfully adding a venue:
PHP Code:
if($refered){
$html="<html><head><title>New Venue "
." Added</title></head>"
."<body bgcolor=#336699 onload=\"settimeout(window.close(),5000); opener.location.reload();\">"
."<br>New venue added - please close this window!"
."</body></html>";
print(
$html);
exit;




However I cannot get the referring window to refresh with this code... does anyone have any ideas?

PS - see the instructions in one of my replies on the JS forum to see an example:
http://forums.devshed.com/showthrea...73690#post73690

Reply With Quote
  #2  
Old August 9th, 2001, 06:46 PM
jochum jochum is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2000
Location: In nederland
Posts: 41 jochum User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 40 m 2 sec
Reputation Power: 14
now it is javascript ;0)
window.location.reload...
maybe "document.location=whereeveryouwannego.php"
[PHP]
<?if($refered){?>

<html><head><title>New Venue Added</title></head>
<body bgcolor=#336699>

<SCRIPT>
settimeout(window.close(),5000);
window.location.reload();
</SCRIPT>

<br>New venue added - please close this window!
</body></html>

<?}?>
[PHP]

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignJavaScript Development > javascript and php - a refreshing post (*groan*)

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap