PDA

View Full Version : refresh and go to the same section


sramesh
11-10-2003, 09:42 PM
Hi,

I have a very long form and to edit the information in the long form, I open small windows. After the editing, I want the small window to close and go back to the refreshed main long form and also to the same section of the form that I was editing. This so the user need not scroll down again to reach that section.

For example, with the script here I am able to close the child window, go back to the main form called test_try.cfm and to the section financial info, but the form is not refreshed, so I am not seeing the new edited information. If I remove the #financialinfo, then the main form is refreshed, but the user has to scroll down all the way to get the financialinfo section of the form. Any suggestions ?

<script> opener.document.location.href=
test_try.cfm#financialinfo';self.close();
</script>

thanks

Willy Duitt
11-11-2003, 07:04 AM
Unfortunetly your post does not provide enough
information regarding your form structure. Therefore....
You need to insure the values in red
correctly reference your form and input names.

<script> opener.document.location.href=
test_try.cfm#financialinfo';self.close();
parent.document.test_try.finacialinfo.focus();
</script>

.....Willy

sramesh
11-11-2003, 04:06 PM
Thanks for your response.

But, the main form still does not get refreshed with this script.

Thanks

A1ien51
11-11-2003, 04:08 PM
Why don;t you show us what you are doing!

glenngv
11-12-2003, 11:18 AM
try:

<script>
if (opener && !opener.closed)
opener.location.replace("test_try.cfm#financialinfo");
self.close();
</script>


if that doesn't work, try:

<script>
if (opener && !opener.closed) {
opener.name="openerWindow";
window.open("test_try.cfm#financialinfo",opener.name);
}
self.close();
</script>


using location.href will not reload the page if the url contains hash (#) and the page specified is the same as the target page