possible to refresh (not reload) a parent page with javascript? -


i have page shows images. if record doesn't have image associated yet, provide user pop-up window link can upload image. when user submits form on pop-up, refreshes, uploads image , automatically closes. before pop-up closes, want refresh (not reload) parent. reason don't want reload because i'm using post data dynamically populate page content. if reload, previous data lost. tried change window.opener.location.reload(true); window.opener.location.refresh(true); ... apparently that's not valid command.

is there way refresh parent page instead of reloading it?

if want show newly uploaded image, best way have function on parent page like:

top.refreshimage = function(url){     $("#<id_of_image_tag>").attr("src",url);     //or if not using jquery usual way     document.getelementbyid("<id_of_image_tag>").src=url; } 

then dialog, after image uploaded call function:

top.refreshimage("<url_of_newly_uploaded_image"); 

Comments

Popular posts from this blog

Detect support for Shoutcast ICY MP3 without navigator.userAgent in Firefox? -

web - SVG not rendering properly in Firefox -

java - JavaFX 2 slider labelFormatter not being used -