Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Login page (default.asp) keeps being displayed?!

Status
Not open for further replies.

computergeek

Programmer
May 23, 2001
193
CA
Hello,

I have setup a login page (default.asp) which takes a user name, and password. This initial test page checks to see if the username has been entered. 2 values are set within a hidden form (UserName and Password) and the form is submitted. (I use client javascript code to accomplish this. See line document.loginform.submit();). My expected outcome is that the loginform action="Navigation.asp" will be loaded but it is not?!#$ The default.asp page is simply refreshed and displayed again. Does anybody have any ideas on what to check or what the problem could be? Why isn't my "Navigation.asp" being loaded? (I cut all the code out of this page for test purposes, and all it does is display a header...)

PLEASE HELP?!

Default.asp Code:
----------------

<%@ LANGUAGE=&quot;VBSCRIPT&quot; %>

<HTML>

<HEAD>
<META NAME=&quot;GENERATOR&quot; CONTENT=&quot;Microsoft Visual InterDev 6.0&quot;>
<TITLE>Vendor Managed Inventory System Login</TITLE>

<script language=&quot;JavaScript&quot; >
<!--
function doSubmit() {
if (document.formUser.uid.value != &quot;&quot;) {
document.loginform.UserName.value = document.formUser.uid.value;
document.loginform.Password.value = document.formPassword.pw.value;
document.loginform.submit();
}
else {
window.alert(&quot;Please enter a user Name&quot;);
document.formUser.uid.focus();
}
}
//-->
</script>



</HEAD>

<body topmargin=&quot;0&quot; leftmargin=&quot;0&quot; bgcolor=&quot;#ffffff&quot;>

<table border=&quot;0&quot; width=&quot;100%&quot; height=&quot;100&quot; bgcolor=&quot;#008080&quot;>
<tr>
<td align=&quot;middle&quot; valign=&quot;center&quot;>
<font color=&quot;#ffffb0&quot; size=&quot;6&quot;>Vendor
Inventory Management </font><font size=&quot;4&quot; color=&quot;#ffffcc&quot;>for
the </font><font color=&quot;#ffffb0&quot; size=&quot;6&quot;> WEB </font></td>
</tr>
</table>

<br>

<table border=&quot;0&quot; width=&quot;95%&quot; align=&quot;center&quot;>
<tr>
<td>
<br>
<P align=center>
<b><font size=&quot;4&quot;
style=&quot;FONT-STYLE: normal; FONT-WEIGHT: normal&quot;
> Welcome to VMI. </font></b>
</P>
</td>
</tr>
</table>

<noscript>
<br><br>
<p align=&quot;center&quot;><font size=&quot;+1&quot; color=&quot;#cc0000&quot;>
JavaScript has not been enabled, or you are using a browser that does not support Javascript. <br>
Please enable JavaScript or use an appropriate browser, such as Microsoft Internet Explorer. <br>
</font></p>
<p align=&quot;center&quot;><font color=&quot;#cc0000&quot;> Thank You. <br>
</font>(reload this page
when JavaScript has been enabled) </FONT></p>
</noscript>

<br> <br>
<!-- form with hidden fields... form is never visible to the user -->
<form name=&quot;loginform&quot; action=&quot;Navigation.asp&quot; method=&quot;post&quot; id=&quot;loginform&quot;>
<input type=&quot;hidden&quot; name=&quot;UserName&quot;>
<input type=&quot;hidden&quot; name=&quot;Password&quot;>
</form>

<table border=&quot;0&quot; align=&quot;center&quot; cellpadding=&quot;5&quot; cellspacing=&quot;0&quot;>
<tr>
<td>

<table border=&quot;0&quot; cellpadding=&quot;5&quot; cellspacing=&quot;0&quot;>
<tr>
<form id=&quot;formUser&quot; name=&quot;formUser&quot; onSubmit=&quot;return doSubmit();&quot;>
<td align=&quot;right&quot;>
<font face=&quot;arial&quot; size=&quot;2&quot;><b> User Name </b></font>  
</td>
<td align=&quot;left&quot;>
<input type=&quot;text&quot; size=&quot;12&quot; name=&quot;uid&quot; value=&quot;&quot;>
</td>
</form>
</tr>

<tr>
<form id=&quot;formPassword&quot; name=&quot;formPassword&quot; onSubmit=&quot;return doSubmit();&quot;>
<td align=&quot;right&quot;>
<font face=&quot;arial&quot; size=&quot;2&quot;><b> Password </b></font>  
</td>
<td align=&quot;left&quot;>
<input type=&quot;password&quot; size=&quot;12&quot; name=&quot;pw&quot; value=&quot;&quot;>
</td>
</form>
</tr>

<tr>
<form id=&quot;formLogin&quot; name=&quot;formLogin&quot; onSubmit=&quot;return doSubmit();&quot;>
<td align=&quot;center&quot; colspan=&quot;2&quot;>
<br>    
<input type=&quot;submit&quot; value=&quot;Login&quot; width=&quot;100&quot; height=&quot;30&quot; border=&quot;0&quot; alt=&quot;Log In Now&quot; >


</td>
</form>
</tr>
</table>

</td>
</tr>
</table>


<SCRIPT LANGUAGE=&quot;javascript&quot;>
//document.loginform.UserName.focus();
//document.formUser.uid.focus();
</SCRIPT>




</body>

</HTML>
 
Hi,

Nevermind...

I have my problem figured it out... found a post within Javascript area that was VERY helpful.


Computergeek

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top