HTML Tutorial


 /help/HTML Help Forum   FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
RegisterRegister - Not registered yet? Got something to say? Join HTML Code Tutorial!
is my code wrong
Post new topic   Reply to topic    HTML Help Forum -> DHTML
View previous topic :: View next topic  
Author Message
mbp024



Joined: 19 Oct 2005
Posts: 10

PostPosted: Tue Oct 25, 2005 7:57 am     is my code wrong Reply with quote

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

PostPosted: Tue Oct 25, 2005 11:11 am     Reply with quote

Code:
documnet


code is good, spelling not so good.
mbp024



Joined: 19 Oct 2005
Posts: 10

PostPosted: Tue Oct 25, 2005 3:05 pm     Reply with quote

hey thanks i would never seen that
degsy



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

PostPosted: Tue Oct 25, 2005 4:03 pm     Reply with quote

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.
Display posts from previous:   
Post new topic   Reply to topic    HTML Help Forum -> DHTML All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
HTML Help Archive
Powered by phpBB © 2001, 2005 phpBB Group
HTML Help topic RSS feed 

 
DARFUR
HOSTING / DESIGN
MAKE MONEY

Home
  |   Tutorials   |   Forum   |   Quick List   |   Link Directory   |   About
Copyright ©1997-2002 Idocs and ©2002-2007 HTML Code Tutorial