Auto refresh an unrelated page

hi All,

Do you know how to trigger a refresh in another page using a hyperlink or a system button or even an auto refresh? This page is unrelated to the page that triggers it.

Dawn.
Dawn_ricoAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
thirdConnect With a Mentor Commented:
no, you should not do it that way. so should refer to the frame name u declared in the frameset. referring to the frames array is another way.


<HTML>
<FRAMESET>
<FRAME FRAMEBORDER="0" NORESIZE NAME="PageA" SRC="PageA.html">
<FRAME FRAMEBORDER="1" NORESIZE NAME="PageC" SRC="PageC.html">
</FRAMESET>
</HTML>


based here you can use,

opener.parent.frames['PageA'].location.reload();

or

opener.parent.frames[0].location.reload();


zero[0] refers to the first frame in your frameset.



0
 
thirdCommented:
if it's unrelated then you don't have control on it.
0
 
Dawn_ricoAuthor Commented:
hi third,

Thanks for offering ur help again :) but is there any other way to do it, cos' I really need to do it.

Thanks ...

Dawn.
0
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
Dawn_ricoAuthor Commented:
like in PageA, when we use a hyperlink, we can go to the other PageB. But now instead of going there, I need a solution to refresh that unrelated page.

Thanks for all ur help!
0
 
sushifishCommented:
If you want to refresh Page1.html in page2.html. then you should code your javascript in page2.html

source code:

function Refresh(){
document.form_name_for_page1.html.submit();
}


hope this help.
0
 
thirdCommented:
Hi Dawn,

so you mean both PageA and PageB are already opened and they're of different browser window? when was PageB created? can you tell the whole situation so we can formulate another method if possible?
0
 
Dawn_ricoAuthor Commented:
hi sushifish ,

I've tried this but I've this error msg - 'Error On Page', but thanks for ur suggestion ..

function refreshPage() {
     var iframename = "AI_POS_Sales004";
     document.AI_POS_Sales004.asp.submit();
     //top.window.close();
}

<a href="javascript:refreshPage();">Close</a>

-------------------------------------------------------
hi third :) and Other Experts

PageA that I wanted to refresh is one of the window in a frame. PageC is another window in the same frame. In PageC, I click to open a pop out window PageB. Upon finish some execution, I close PageB and refresh PageA with the latest ammended data.

Thanks :)

Dawn.

0
 
Dawn_ricoAuthor Commented:
hi sushifish ,

Perhaps you can show me how  you have implemented it? Thanks

Dawn.
0
 
Dawn_ricoAuthor Commented:
hi sushifish ,

I just noticed that you're using - submit();

Are you referring to a form post? Sory to let you know now that I'm actually using a hyperlink to do the refresh ..

Thanks ..

Dawn.

0
 
thirdCommented:
now its clear for me. you can always reference from PageA using the frames property of the window. now if you're closing PageB from PageC, you can use after the closing script,

parent.frames['PageA'].location.reload();

or if you're closing from the popup window (which is PageB) use,

opener.parent.frames['PageA'].location.reload();

btw, do the pages on this frames reside only on one server?

tell me if that works.
0
 
Dawn_ricoAuthor Commented:
hi third,

I'm closing from the pop out PageB. This is how I do but I ve the same error. Rechecking the rest of my codes, they're not causing this error.

<script language="JavaScript">
<!--
function refreshPage() {
     //opener.parent.frames['AI_POS_Sales004'].location.reload();
     opener.parent.frames['AI_POS_Sales004.asp'].location.reload(); }
//-->
</script>


May I know where shld I put 'window. now'? I guess maybe I require this to make the whole thing work?

Thanks :)

Dawn.
0
 
Dawn_ricoAuthor Commented:
hi third

function refreshPage() {
     opener.parent.frames['LeftFrame1'].location.reload();
     top.window.close();
}


I'm using this and guess what ... I got it! Yeh! Thanks a lot hor :) haha

Dawn.
0
 
Michel PlungjanIT ExpertCommented:
Assuming your link is to a static html page you do not own, try this:


<a href="http://www.othersite.com/page1.html"
target="othersiteWindow"
onClick="this.href=this.href+'?'+Math.random()">Reload page</a>

If it is not static, you can try

<a href="http://www.othersite.com/somecgi.pl?someparms"
target="othersiteWindow"
onClick="this.href=this.href+'&dummy='+Math.random()">Reload page</a>


Michel
0
 
Dawn_ricoAuthor Commented:
hi mplungjan ,

thanks for your offering ur help :)

Dawn.
0
 
Dawn_ricoAuthor Commented:
hi mplungjan ,

Do you mind looking at this qn on opening a toolbar-less window? .. thanks ..

http://www.experts-exchange.com/jsp/qManageQuestion.jsp?ta=javascript&qid=20298140

Dawn.
0
 
thirdCommented:
hi Dawn,

i'm so glad your problem was already solved!

HaPpY PrOgrAmMiNg!!!

;-),

third
0
 
Michel PlungjanIT ExpertCommented:
Dawn: What solution did you implement?
0
 
Dawn_ricoAuthor Commented:
huh ... no, it's not solved yet ...

Dawn.
0
 
Dawn_ricoAuthor Commented:
wait, wait, this qn is solved !! :) I had mixed it up with our the other qn ..opps sorry, third  .. :)
0
 
Dawn_ricoAuthor Commented:
hi All,

This is how I've implemented third's solution! and third, :D programming too

This is the frame that contains the unrelated pageA and to be triggered pageC that is used to pop up pageB..

<HTML>
<FRAMESET>
<FRAME FRAMEBORDER="0" NORESIZE NAME="PageA" SRC="PageA.html">
<FRAME FRAMEBORDER="1" NORESIZE NAME="PageC" SRC="PageC.html">
</FRAMESET>
</HTML>
-----<HTML>
<FRAMESET>
<FRAME FRAMEBORDER="0" NORESIZE NAME="PageA" SRC="PageA.html">
<FRAME FRAMEBORDER="1" NORESIZE NAME="PageC" SRC="PageC.html">
</FRAMESET>
</HTML>
--------------------------------------------------------
This is in pageB. When I click on the link, not only will my pageA in e frame refreshes, pageB will also close.

<script language="JavaScript">
<!--
function refreshPage() {
    opener.parent.frames['LeftFrame1'].location.reload();
    top.window.close();
}
//-->
</script>


<font face=Tahoma size=2 color=#000000><b><a href="javascript:refreshPage();">Close</a></b></font>

0
 
Dawn_ricoAuthor Commented:
sorry, it only contains this portion in the frame.

<HTML>
<FRAMESET>
<FRAME FRAMEBORDER="0" NORESIZE NAME="PageA" SRC="PageA.html">
<FRAME FRAMEBORDER="1" NORESIZE NAME="PageC" SRC="PageC.html">
</FRAMESET>
</HTML>


LeftFrame1 is the name of the pageA, that shld be PageA in this example.

Dawn.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.