HTML Help Forum Index HTML Help
Please Search for the answer to your question before asking it! Thanks.
 

is my code wrong
Post a Reply to this Topic Ask a New Question
Click here to go to the original topic
       HTML Help Forum Index -> DHTML
View previous topic :: View next topic  
Author Message
mbp024



Joined: 19 Oct 2005
Posts: 10

Posted: Tue Oct 25, 2005 7:57 am     is my code wrong  

can someone tell me if my code is wrong here

<script>
function CheckSelection(selObj)
{
if(selObj.value == "Lyrics1"){
documnet.getElementById("txtOther2").style.display = "none"
document.getElementById("txtOther1").style.display = ""}
else
if (selObj.value == "Lyrics2"){
documnet.getElementById("txtOther1").style.display = "none"
document.getElementById("txtOther2").style.display = ""}
}
</script>

<table>
<tr>
<td valign=top>
<SELECT ID="Select1" NAME="Select1" onchange="CheckSelection(this)">
<OPTION value="None">None</OPTION>
<OPTION value="Lyrics1">Lyrics</OPTION>
<OPTION value="Lyrics2">Lyrics2</OPTION>
</SELECT>
</td>
<td>
<input type=text id=txtOther1 style="display:none" value="Hey">
<input type=text id=txtOther2 style="display:none" value="Hey Again">
</td>
</tr>
</table>
degsy



Joined: 23 Feb 2005
Posts: 2440
Location: North East, UK

Posted: Tue Oct 25, 2005 11:11 am      

Code: documnet

code is good, spelling not so good.
mbp024



Joined: 19 Oct 2005
Posts: 10

Posted: Tue Oct 25, 2005 3:05 pm      

hey thanks i would never seen that
degsy



Joined: 23 Feb 2005
Posts: 2440
Location: North East, UK

Posted: Tue Oct 25, 2005 4:03 pm      

Test out editors that colour code supported elements, tags or reserved words.

e.g.
Within a <script> tag Dreamweaver will colour code the word document because it is a reserved word in the scripting language. Very easy to spot if you have a misspelling.
 
 
HOSTING / DESIGN
MAKE MONEY

       HTML Help Forum Index -> DHTML
Page 1 of 1


Powered by phpBB Search Engine Indexer
Powered by phpBB 2.0.19 © 2001, 2002 phpBB Group