By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,474 Members | 1,343 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,474 IT Pros & Developers. It's quick & easy.

Object error in function

P: n/a
I keep getting "Object does not support property or method". Help
appreciated. Thanks.
<html>
<head>
<SCRIPT LANGUAGE="JavaScript">
function showtable(){
var myform1 = document.form1
if(myform1.T1.value=="Size Mix")
{
document.getElementByid "Table1").style.visibility="hidden"
}
}

</script>

</head>

<body onLoad= "showtable()">
<form name="form1"><input type="text" name="T1" value="Size Mix">
<table border="1" id="Table1" width="100%">

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 20 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
On 09 Feb 2004 19:09:32 GMT, Steve Bishop <st****@viper.com> wrote:
I keep getting "Object does not support property or method". Help
appreciated. Thanks.
<html>
<head>
<SCRIPT LANGUAGE="JavaScript">
The 'type' attribute is required (and sufficient); 'language' is not. This
should read

<script type="text/javascript">
function showtable(){
var myform1 = document.form1
End statements with a semi-colon (;).
if(myform1.T1.value=="Size Mix")
{
document.getElementByid "Table1").style.visibility="hidden"


If this is a direct copy, your problem is two-fold:

1) The method name is "getElementById". Remember that case is significant
in JavaScript.
2) You missed the opening parenthesis in the method call.

The missing semi-colon appies here, too.

[snip]

Mike

--
Michael Winter
M.******@blueyonder.co.invalid (replace ".invalid" with ".uk" to reply)
Jul 20 '05 #2

P: n/a
"Steve Bishop" <st****@viper.com> wrote in message
news:40*********************@news.frii.net...
I keep getting "Object does not support property or method". <snip>document.getElementByid "Table1").style.visibility="hidden"

^
I
Case sensitivity, it should be an upper case I in getElementById.

Richard.
Jul 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.