PDA

View Full Version : Ok Noob Question


MrEnder
01-28-2009, 04:19 PM
I'm trying to make a forum in JSP and I'm having an issue...
This is my first time using JSP so bear with me. I do know Java and Javascript a bit though. I wanted to test it with an alert... It failed miserably. As well as my eclipse does not like when I put <%. I'm running it with tomcat so why?



<form id="loginForm">

<div class="loginFontBackground">
User Name:<input type="checkbox" name="remUserName" id="rememberUserName" class="textinput" /><span class="smallerFont"> Remember?</span>
<input type="text" value="" name="userName" id="userNameLogin" maxlength="20" class="textInput" />
Password:<input type="checkbox" name="remPassword" id="rememberPassword" class="textinput" /><span class="smallerFont"> Remember?</span>
<input type="password" value="" name="password" id="passwordLogin" maxlength="20" class="textInput" />
</div>
<input type="submit" value="Submit" id="submitLogin" style="margin-top: 5px;"/>


</form>
<%

if(request.getParameter("userName") && request.getParameter("password")) != "" {

%>

<script type="text/javascript"> alert("1"); </script>

<%

}

%>

abduraooft
01-28-2009, 04:38 PM
Please follow http://www.codingforums.com/postguide.htm especially #2
(You may edit your post to change the title)