IE5 location.reload() "type mismatch error", but works under IE6 
Author Message
 IE5 location.reload() "type mismatch error", but works under IE6

Ok... I give up.

Why does this simple HTML INPUT line work fine under IE6... but gives a
"type mismatch error" under IE5?

... or do I have something else set differently/wrong somewhere?  (Both are
W2K machines.)

input id=cmdReturn type=button value="<=Return to Main Menu"
style="font-weight:bold;" onclick="location.reload('MyMain.asp')"

Is there a work-around?

Thanks.



Mon, 18 Jul 2005 11:05:27 GMT  
 IE5 location.reload() "type mismatch error", but works under IE6


Fri, 19 Jun 1992 00:00:00 GMT  
 IE5 location.reload() "type mismatch error", but works under IE6
surely reload() doesn't take arguments??

shouldn't it be self.location.href = 'whatever.asp';  ?

here you go

"location.reload([force])

where force is an optional boolean value indicating whether the document
should be reloaded even if it hasn't changed since last reload."

so obviously a type mismatch. surprised you can get away with this in
IE6, though.

________________________________________
I got bored with my old signature,
so I changed it

Atrax. MVP, IIS
http://rtfm.atrax.co.uk/

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



Mon, 18 Jul 2005 12:21:23 GMT  
 IE5 location.reload() "type mismatch error", but works under IE6


Fri, 19 Jun 1992 00:00:00 GMT  
 IE5 location.reload() "type mismatch error", but works under IE6
I'm using IE5.5 (Win98) and the following works:

<html>
<head>
<title>reload.htm</title>
<script language="javascript" type="text/javascript">
<!--
 alert(location);
// -->
</script>
</head>
<body>
<form method="post">
<input type="button" value="<=Return to Main Menu" style="font-weight:bold;"
onclick="location.reload()">
</form>
</body>
</html>

I added the JavaScript "Alert()" to let you know when the page reloads.



Mon, 18 Jul 2005 13:39:16 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. VBScript "type mismatch" error

2. "Type mismatch" error

3. VBScript "Type Mismatch" error

4. DAO code "Type Mismatch" error

5. "Type mismatch" Error

6. Handling "Type mismatch" error

7. "Type mismatch" error

8. Runtime error "13" - Type Mismatch

9. "Run-time error 13: Type Mismatch"

10. "Runtime Error 13 Data Type mismatch"

11. Run Time Error "13" Type Mismatch

12. "Type mismatch"

 

 
Powered by phpBB® Forum Software