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

Can a Javascript Window refresh normal parent

P: n/a
Hi,
I use a JavaScript window to access a library of songs when the user
picks one this is written to the users database record (PHP/MySQL).
When the use closes the JavaScript window he returns to the original
browser window.
Unfortunately unless he manually refreshes this window he cannot see
that he has succeeded in selecting a song.

Any ideas how I can force the refresh from the Javascript window, or
any other work-around?

Whoops just googled this

<input type="button" value="Reload"
onclick="parent.location='javascript:location.relo ad()'"
alt="refresh"</form>

Have tried this, but didn't work for me in IE

--
zzapper
http://motivation-tips.co.uk/

Jun 7 '07 #1
Share this Question
Share on Google+
5 Replies


P: n/a
zzapper wrote:
Hi,
I use a JavaScript window to access a library of songs when the user
picks one this is written to the users database record (PHP/MySQL).
When the use closes the JavaScript window he returns to the original
browser window.
Unfortunately unless he manually refreshes this window he cannot see
that he has succeeded in selecting a song.

Any ideas how I can force the refresh from the Javascript window, or
any other work-around?

Whoops just googled this

<input type="button" value="Reload"
onclick="parent.location='javascript:location.relo ad()'"
alt="refresh"</form>

Have tried this, but didn't work for me in IE
What about onClick="parent.location.reload();"
?

Regards,
Erwin Moller
>
--
zzapper
http://motivation-tips.co.uk/
Jun 7 '07 #2

P: n/a
On Jun 7, 2:15 pm, Erwin Moller
<since_humans_read_this_I_am_spammed_too_m...@spam yourself.comwrote:
zzapper wrote:
Hi,
I use a JavaScript window to access a library of songs when the user
picks one this is written to the users database record (PHP/MySQL).
When the use closes the JavaScript window he returns to the original
browser window.
Unfortunately unless he manually refreshes this window he cannot see
that he has succeeded in selecting a song.
Any ideas how I can force the refresh from the Javascript window, or
any other work-around?
Whoops just googled this
<input type="button" value="Reload"
onclick="parent.location='javascript:location.relo ad()'"
alt="refresh"</form>
Have tried this, but didn't work for me in IE

What about onClick="parent.location.reload();"
?

Regards,
Erwin Moller
--
zzapper
http://motivation-tips.co.uk/
Erwin
Looks more likely but sadly doesn't seem to work for me

zzapper

Jun 7 '07 #3

P: n/a
zzapper wrote:
On Jun 7, 2:15 pm, Erwin Moller
<since_humans_read_this_I_am_spammed_too_m...@spam yourself.comwrote:
>zzapper wrote:
Hi,
I use a JavaScript window to access a library of songs when the user
picks one this is written to the users database record (PHP/MySQL).
When the use closes the JavaScript window he returns to the original
browser window.
Unfortunately unless he manually refreshes this window he cannot see
that he has succeeded in selecting a song.
Any ideas how I can force the refresh from the Javascript window, or
any other work-around?
Whoops just googled this
<input type="button" value="Reload"
onclick="parent.location='javascript:location.relo ad()'"
alt="refresh"</form>
Have tried this, but didn't work for me in IE

What about onClick="parent.location.reload();"
?

Regards,
Erwin Moller
--
zzapper
http://motivation-tips.co.uk/

Erwin
Looks more likely but sadly doesn't seem to work for me
Why not?

Check the JavaScript error console for details.
In Firefox: Tools-Error Console
What does it say?

Regards,
Erwin Moller

>
zzapper
Jun 7 '07 #4

P: n/a
On Jun 7, 5:28 pm, Erwin Moller
<since_humans_read_this_I_am_spammed_too_m...@spam yourself.comwrote:

Hi what finally worked

<form><input type="button" value="Reload"
onclick="window.opener.location.reload();" alt="refresh"</form>

thanks

--
zzapper
http://motivation-tips.co.uk/


Jun 13 '07 #5

P: n/a
zzapper wrote:
On Jun 7, 5:28 pm, Erwin Moller
<since_humans_read_this_I_am_spammed_too_m...@spam yourself.comwrote:

Hi what finally worked

<form><input type="button" value="Reload"
onclick="window.opener.location.reload();" alt="refresh"</form>

thanks
Of course.
I told you to try 'parent' which of course should have been 'opener'.
My bad.
Sorry for the confusion. :-/

Regards,
Erwin Moller
--
zzapper
http://motivation-tips.co.uk/
Jun 14 '07 #6

This discussion thread is closed

Replies have been disabled for this discussion.