Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: My script ran under IE7 but won't under IE8 -- please help  (Read 2895 times)

0 Members and 1 Guest are viewing this topic.

JustMe

  • Guest
My script ran under IE7 but won't under IE8 -- please help
« on: July 02, 2009, 05:25:07 AM »
I have a very simple javascript that I was running with every success.  I couple of days ago I uploaded IE8, and now it won't run   :(   Can anyone tell me how to modify my program to work??   When I click the login button (operated by a onClick) nothing happens.   HELP!!

<html>
<head>
<script language="text/javascript">
<!--//
function pasuser(form) {
   if (form.id.value=="user") {
      if (form.pass.value=="password") {             
         location="page1.html"
      } else {
         alert("Invalid Password")
      }
   } else if (form.id.value=="user2") {
      if (form.pass.value=="password2") {             
         location="page2.html"
      } else {
         alert("Invalid Password")
      }
   } else {  alert("Invalid UserID")
   }
}
//-->
</script>
</head>

<body>

<center>

<table bgcolor="white" cellpadding="12" border="2" style="border: 0px dashed #FF0000">
<tr><td colspan="2" bordercolor="grey" style="border: 2px solid #FF0000"><center><h1>
   <font size="4">Members Login</font>
</h1></center></td></tr>
 
<tr><td height="30" bordercolor="#FFFF00" style="border: 2px solid #FF0000" align=middle><h1>
   <font size="4">UserID:</font>
</h1></td>
   <td height="64" bordercolor="#FFFF00" style="border: 2px solid #FF0000"><form name="login"><input
   name="id" type="text"></td></tr>
<tr><td bordercolor="#FFFF00" style="border: 2px solid #FF0000" valign="middle"><h1>
   <font size="4">Password:</font>
</h1></td>
   <td bordercolor="#FFFF00" style="border: 2px solid #FF0000"><input name="pass"
type="password"></td></tr>
 
<tr><td bordercolor="#FFFF00" style="border: 2px solid #FF0000" height="51"><center>
   <input type="button" value="Login" onClick="pasuser(this.form)"></center></td>
   <td bordercolor="#FFFF00" style="border: 2px solid #FF0000" height="51"><center>
   <input type="Reset"></form></td></tr>
 
</table></center>

</body>
</html>


Many thanks,
Donna

Rob Pomeroy



    Prodigy

  • Systems Architect
  • Thanked: 124
    • Me
  • Experience: Expert
  • OS: Other
Re: My script ran under IE7 but won't under IE8 -- please help
« Reply #1 on: July 03, 2009, 03:07:56 AM »
Donna, it seems to me that most people in the industry feel that IE8 is not ready for prime time.  I have yet to hear of someone who's successfully installed it without experiencing problems.  I would concentrate on downgrading your software back to IE7 rather than making your script work in IE8.
Only able to visit the forums sporadically, sorry.

Geek & Dummy - honest news, reviews and howtos

trevorpe



    Beginner

    Thanked: 3
    • Yes
  • Computer: Specs
  • Experience: Experienced
  • OS: Linux variant
Re: My script ran under IE7 but won't under IE8 -- please help
« Reply #2 on: July 05, 2009, 11:04:33 AM »
Your code seems to  be good.

If you still have IE 8, try clicking the Compatibility button.  It's right next to the "GO" button at the top of the window.  Try opening your page again.

If if still doesn't work, I agree with Rob.
IE 8 is full of problems and is out for windows update, but I
still don't trust it.  It really screwed up my computer a while ago, so I use Firefox.

Speaking of Firefox, if you're going to test HTML, I recommend testing in both browsers to make sure it works.

Trevor
Trevor P.