Yannie
asked on
Refresh page using ajax
Dear all,
I have a qn on how I can set it to refresh the page. Ajax doesn't do the refresh and awaits it to load. That's what I want.
However, on the main page, I have an iframe containing a page called pms_list.asp.
Upon clicking the item name in the list, another window will show up in this popup window page called maint_main.asp. If i want to submit a new record to the list, I will have to click a button on maint_main.asp and redirect to maint_new.asp.
Now if i submit maint_new.asp with the records inserted, how do I refresh the pms_list.asp which is not the parent page at all?
Anyone can help me with this asap?
I have a qn on how I can set it to refresh the page. Ajax doesn't do the refresh and awaits it to load. That's what I want.
However, on the main page, I have an iframe containing a page called pms_list.asp.
Upon clicking the item name in the list, another window will show up in this popup window page called maint_main.asp. If i want to submit a new record to the list, I will have to click a button on maint_main.asp and redirect to maint_new.asp.
Now if i submit maint_new.asp with the records inserted, how do I refresh the pms_list.asp which is not the parent page at all?
Anyone can help me with this asap?
Actually, it should be this:
<script type="text/javascript">
window.opener.frames['PMS_ LIST_IFRAM E_NAME_HER E'].locati on.reload( true);
</script>
Output the above script from the page called from your AJAX that updates the list database.
Regards...
<script type="text/javascript">
window.opener.frames['PMS_
</script>
Output the above script from the page called from your AJAX that updates the list database.
Regards...
Please remember that pasting responseText into a div using innerHTML will NOT execute any script.
ASKER
Actually
<script>opener.parent.loca tion.reloa d(true);</ script>
refreshes but i will have to wait for th page to refresh done.
I tot Ajax refreshes it alot faster and doesnt show obvious refresh in the background
<script>opener.parent.loca
refreshes but i will have to wait for th page to refresh done.
I tot Ajax refreshes it alot faster and doesnt show obvious refresh in the background
ASKER
Actually
<script>opener.parent.loca tion.reloa d(true);</ script>
refreshes but i will have to wait for th page to refresh done.
I tot Ajax refreshes it alot faster and doesnt show obvious refresh in the background
<script>opener.parent.loca
refreshes but i will have to wait for th page to refresh done.
I tot Ajax refreshes it alot faster and doesnt show obvious refresh in the background
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
OK thank you very much. Managed to get it solved in my own...thank you..
onClick="opener.parent.loc
But that will not help because the onClick will do the refresh imideately on link click not after the update was done on server side.
So your response to the link click should contain the refresh() call like this:
<script>opener.parent.loca
Send that snippet after update on server side to the popup and the iframe container page will be reloaded.