|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
2 questions in ASP and HTML:
1) If I have a HTML page with one side frame and a main one, and in the side one there are 2 fields to fill in username and password and a login button:
<input type="Submit" value="Login"> The button leads to an ASP page that does a check and then writes "Welcome, username" or "Wrong username", the problem is that the messages are shown in the side frame, how do I do it so it will be shown in the main frame??? 2) How do I make it so when I click the login button, It will show a message in the main frame, for a few seconds, and then automatically return to homepage?? Thank you... |
|
#2
|
||||
|
||||
|
those are pure html/javascript issues, no ASP is involved.
1. have such form: <form action="login.asp" method="post" target="main_frame"> where "main_frame" is the name of the main frame as defined in the frameset. 2. have such button instead of submit button: Code:
<input type="button" value="submit" onclick="window.parent.frames[ 'main_frame' ].document.body.innerHTML = 'Redirecting, please wait...'; setTimeout('this.form.submit();', 5000);" />
not sure it would work, but hopefully it would show the message and submit after 5 seconds. |
|
#3
|
|||
|
|||
|
Thanks alot
![]() |
|
#4
|
||||
|
||||
|
if you have a form defined (something like this)
Code:
<form method="post" action="dosomething.asp"> you can use the target tag: Code:
<form method="post" action="dosomething.asp" target="_parent"> which tells the browser change the main page, not just the frame. _parent is an HTML constant. I prefer this method because it doesn't involve java script, which in my opinion is best kept to a minimum. |
|
#5
|
|||
|
|||
|
My opinion exactly...thanks
![]() |
|
#6
|
||||
|
||||
|
yep but such code won't cause any delay before submitting...
![]() |
|
#7
|
||||
|
||||
|
...Or just don't use (evil) frames and wait untill the XFrames specification is ratified and supported?
After all, with fairly consistent CSS2.1 support around thesedays, it renders frames obsolete anyway |
![]() |
| Viewing: ASP Free Forums > Programming > HTML, JavaScript And CSS Help > 2 questions in ASP and HTML: |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|