Jump to content

HTMLweasel

Members
  • Posts

    11
  • Joined

  • Last visited

HTMLweasel's Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. Hi thereThrough looking at different source code I have notice some javascript statements as the one below.<script language=javascript src="ITzonen - Nyheder, tests og meget mere!_files/resizableViewer.js" type=text/javascript></SCRIPT>Does this mean that there is a sort of class (file that has all the methods) in the directory or location specified by src??Thanks:)
  2. Thanks so much it finally worksJust wanted to check - so if I put in an action in my button<input type="button" value="Login" name="B1" onclick = "accessValidation()">and type was submit it would link that to the action?Thanks again:)
  3. Hey man sorry this is my code and I can't get it to work. Have tried anything. <html><head><title>Military Web Portal</title></head><script type="text/javascript">var username1 = "ryan"var password1 = "ryanpassword"var username2 = "john"var password2 = "johnpassword"var username3 = "tim"var password3 = "timpassword"function accessValidation(){var tempName=document.getElementsByName('txtUsername').item(0).value;var tempPassword = document.getElementsByName('txtPassword').item(0).value;if(tempName == username1 && tempPassword == password1){document.location='http://www.google.com';}else if(tempName == username2 && tempPassword == password2){alert("User 2 access");}else if(tempName == username3 && tempPassword == password3){alert("User 3 access");}else {alert("Please enter the correct username and password");} document.location='http://www.google.com';}</script><body><table border="1" width="100%" id="table1" height="469"> <tr> <td height="110"> <img border="0" src="logo.png" width="892" height="105"></td> </tr> <tr> <td align="left" valign="top"> <form> <p>Username: <input type="text" name="txtUsername" size="20"></p> <p>Password: <input type="password" name="txtPassword" size="20"></p> <p><input type="submit" value="Login" name="B1" onclick = "accessValidation()"> <input type="reset" value="Reset" name="B2"></p> </form> </td> </tr></table></body></html> For some reason the same page is loaded. Any ideas?Please thanks
  4. Hey man I tried the code but I left out this stuff<form method="POST" action="--WEBBOT-SELF--"><!--webbot bot="SaveResults" U-File="C:\Documents and Settings\161470\Desktop\_private\form_results.csv" S-Format="TEXT/CSV" S-Label-Fields="TRUE" -->I just had <form>And obviously it doesn't work then. What does this stuff do and is it all necessary?Thanks
  5. Yeah I managed to find this but it is not exactly what I am looking for. I need a rectangle or table to pop up in which there is information and when you move the mouse on the picture it moves with the mouse:)Ryan
  6. Flip thanks lots man hehe you dominate at this stuff:)
  7. Hi there does anyone know how to make a rectangle with text in it appear over text or picture using that mouse hover over thing. If anyone could point me to an example or somewhere I would really appreciate it:)Thanks
  8. Hi thereAnyone know how to link a web page to another page based on a certain condition.So say for username and passowrd someone clicks on the submit button and if the conditions are met then the page closes and opens a new page. Any ideas?Thanks
  9. Thank you very much this is exactly what I needHowever I do not just want to copy paste:) HeheUserName=document.getElementsByName('UserName').item(0).value;I was wondering if you could explain what the .item(0).value; part means?I kind of understand that you are accessing the contents of the variable 'UserName', but I am unclear on what the second part is for.ThanksRyan
  10. Hi thanks for the suggestion - I fully agree. However I am not doing this out of pleasure:) I have a small assignment that requires it to be done in this manner (i.e. using hard coded usernames and passwords).I know of another way I could do it using prompt boxes. However I think this is kind of wrong. Please any help of getting data from text boxes on a click event and passing them into variables that I can manipulate or access would greatly be appreciated.Ryan
  11. Hi allI am fairly new to javascript however I have experience in other programming languages.I am trying to make a simple login screen. When I click accept I want the values in the name and password field (textboxes) to be compared to a hard coded name and password in code (html file).I know it has something to do with onclick and then call a method to test my hard coded variables with what is in the text boxes.I am lost for syntax on retrieving data from textboxes on an event.Please any help would appreciated.Ryan
×
×
  • Create New...