Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

where is the bug ?

Status
Not open for further replies.

tyris

Programmer
Nov 2, 2000
311
FR
hi all,
i have this code :

<SCRIPT event=onload for=window language=javascript>
radio_Company.style.visibility=&quot;hidden&quot;;
radio_People.style.visibility=&quot;hidden&quot;;

function sel_type() {
if (radio_Company.style.visibility==&quot;hidden&quot;){
radio_Company.style.visibility=&quot;visible&quot;;
}else{
radio_Company.style.visibility=&quot;hidden&quot;;
}
}
</SCRIPT>

<A class=&quot;TD&quot; href=&quot;&quot; onclick=&quot;sel_type(); return false&quot;>Company</a></div>
<div id=radio_Company>
<input type=&quot;radio&quot; name=&quot;sel_type&quot; value=&quot;customer&quot; >Customer<br>
<input type=&quot;radio&quot; name=&quot;sel_type&quot; value=&quot;freelance&quot; >Freelance<br>
<input type=&quot;radio&quot; name=&quot;sel_type&quot; value=&quot;agency&quot; >Agency<br>
<input type=&quot;radio&quot; name=&quot;sel_type&quot; value=&quot;vendor&quot; >Vendor<br>
<input type=&quot;radio&quot; name=&quot;sel_type&quot; value=&quot;other_comp&quot; >Other<br></div>


i can't see where is the bug.. it might be a stupid syntax problem or something like this but as laways, the stupidest error are the less visible ...
any help would be appreciated


Best regards X-),
Elise
 
Hey yo elise,

Whatchya trying to do?
I can see one major problem here, you have no radio_people!!
That is the primary fault remming that out with a // makes the script as you have posted it work.

As far as i can see the coding is making the radio button invisible. Can you give me something else to go on please.

Cheers.
DeltaFlyer ;-)

DeltaFlyer - The Only Programmer To Crash With Style.
 
I just moved your function into normal script tags. I'm thinking that using script tags with for=someevent may place all of the contents in an anonymous function so that once the event is done processing the contents are forgotten. jared@aauser.com -
 
well the radio_People i forgot to remove it, just awrong cut and paste :eek:)
all the hyperlink must hidde or show my radio boxes. if they a hidden it must show them and vice versa.

Jaredn : i don't understand all of what you say (i'm not english ;o) Best regards X-),
Elise
 
make it look like this instead:

<SCRIPT event=onload for=window language=javascript>
radio_Company.style.visibility=&quot;hidden&quot;;
radio_People.style.visibility=&quot;hidden&quot;;
</script>

<script>
function sel_type() {
if (radio_Company.style.visibility==&quot;hidden&quot;){
radio_Company.style.visibility=&quot;visible&quot;;
}else{
radio_Company.style.visibility=&quot;hidden&quot;;
}
}
</SCRIPT>
jared@aauser.com -
 
oohh kay ! well in fact i thought to do this ... i should have done this i gonna try :eek:)
thanks ! Best regards X-),
Elise
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top