View Full Version : response.redirect to reload
ScottInTexas
06-28-2003, 06:42 PM
All the content after loading the header and menus is displayed in an iframe. When a user clicks on the Login button the login form is diplayed in the iframe. After submitting the form I want to reload the entire browser window so the menus can change to reflect an authorzed user.
As it is Response.redirect("default.asp") loads default into the iframe. The login page is called from a javascript that handles all menu clicks with iframe.location="....asp"
I do the check and verify in the login page so if the user fails to have a proper access level I just want to let them know and then they have to click on the Home or back button.
Should the login be a _top window? How can response.redirect be used to reload or is there a better way?
Thanks for the help.
Morgoth
06-28-2003, 07:52 PM
I am not to sure, but I doubt response.Redirect has targets to set.
What I think you should do is in the parent window, have Javascript that will be executed on command for refreshing the screen, and after submit on the form, it will execute the javascript in the parent window.
Understand?
A1ien51
06-28-2003, 10:59 PM
I would do what Morgoth said, but I would probably would add a slight delay to it to make sure that the the session is updated.
MY 2 cents
Eric
Morgoth
06-28-2003, 11:04 PM
Yes.. well, the javascript would be executed after the form is submited and checked...
A1ien51
06-29-2003, 03:20 AM
The only reason why I said it was I had this sort of hing and it would not log th user in, I realized that the page reload happened like a millisecond before the logged in variable took effect.
It bugged me for hours.....little things drive me insane!
ScottInTexas
06-29-2003, 12:26 PM
Thanks for responding.
I'm not following you exaactly. From my form after the user has clicked on submit I call a javscript function on my parent window to refresh?
the form blah blah blah
<input type="button" value="I'm Done" onClick="parent.refreshMe()" />
Like that?
Just my opinion:
--> do not use javascript for necessary/central operation, cause not everyone has javascript enabled
--> do not use iframes, since only clients that use IE will see them.
Use a regular frame and reload the framepage or a box and reload the framepage.
In the form tag, you can specify the target where the page from the action needs to be loaded. Like
<form name="FormName" action="proces.asp" method="post" target="_parent">
ScottInTexas
06-29-2003, 03:58 PM
Raf you came through again!
I really appreciate it. Now that I see it I recall from my HTML reference that is a few years old seeing this very syntax. Sometimes I get too caught up in thinking this is new and modern scripting and I forget the basics.
As far as the use of IFrames. I thought that since iframe was listed in the W3C HTML 4 standards that all compliant browsers would be compatible. Is this not true?
Thanks again.
Iframes --> i looked it up in the W3C manual and they do include <iframe> with mentioning restriction, so i guess my info from the previous post was incorect.
Users with Netscape 6 and Opera 4 should also be able to view them
Guess that i also didn't foow up on it like i should :o
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.