HTML Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignHTML Programming

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 December 28th, 2000, 03:51 PM
londonner londonner is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2000
Posts: 3 londonner User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
The main browser window is window X. A link opens up pop-up window Y.

Pop-up window Y displays page 1. Upon submission of page 1, user goes to page 2 still within window Y.

What's the Javascript code I can use in page 2 (perhaps in onLoad in the <body> tag?!> when it loads up to automatically refresh window X?

Reply With Quote
  #2  
Old December 28th, 2000, 05:44 PM
brian@studiom80.com
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
I would research window.opener and the reload() function.

The answer is there.

sorry about to walk out the door and don't have time to give an example.


Reply With Quote
  #3  
Old December 28th, 2000, 08:04 PM
londonner londonner is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2000
Posts: 3 londonner User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Thanks for the tip Brian. Unfortunately though, I've looked at Javascript and it'll take quite a while for someone with my level of understanding of web languages to get to grips with it - I'd have to start from scratch (!) I won't have time, or need, to go into it in depth till the Summer.

I'd appreciate it if anyone else could point me to an appropriate code example - I've searched Google, About etc. with no luck. Any suggestions would be much welcomed.

Reply With Quote
  #4  
Old December 29th, 2000, 05:31 AM
Pallavi Pallavi is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2000
Location: India
Posts: 10 Pallavi User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Hello !!!
To automatically refresh window X u need the following lines in the onLoad of the opened window.

<script language="JavaScript">
function refreshnow()
{
self.opener.location.reload();
}
</script>

<body onLoad="javascript:refreshnow()">
<form>
<input type="button" value="this is new one">
</form>
</body>

Hope this helps u. :-)
Pallavi.

Reply With Quote
  #5  
Old December 29th, 2000, 11:18 AM
londonner londonner is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2000
Posts: 3 londonner User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Thanks for your post. I did in fact manage to solve the problem by asking in #javascript on DALnet IRC. The following was suggested and indeed worked on Netscape:

<body bgcolor="#FFFFFF" onload="opener.location.reload();">

BUT not in IE. The reason is that IE has stricter security; the pages that loaded up in window Y were on another domain. IE wouldn't let those pages affect (ie. refresh) the page in window X which was on a different domain.

I basically worked around this by creating a global link on the server, so that I could create a link from domain1.com to the appropriate directory which served up the pages in window Y as "dirblah/page2.htm" as opposed to "http://www.domain2.com/dirblah/page2.htm

Note: This was possible because the contents of both domains were in two separate subdirectories in the same root directory.

I did this by entering the following on the command line, once I was in the directory for domain1.com:

ln -s /home/username/public_html/domain2/dirblah dirblah

I then changed my link in window Y from 'http://www.domain2.com/dirblah/page2.htm' to 'dirblah/page2.htm ... because having created the global link, domain1.com thinks that 'dirblah' is one of its own subdirectories - even though it is not really!

Sounds confusing maybe to the casual browser of these boards, but if you have this problem this work around will save you hours of time! Maybe there's an even simpler soltution ...


[This message has been edited by londonner (edited December 29, 2000).]

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignHTML Programming > Pop window refreshing parent window


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 | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway
Stay green...Green IT