HELP!!!! style="display:none" not working in Safari Browser

S

scott

Hello all,

I created some javascipt triggered by an onclick that will display a
section based on a toggle switch. Please view
https://chimatravel.net/travel_auth.cfm and look all the way down at
the bottom at Multiple Cities. If you select on YES, a field should be
displayed below that allows you to enter how many cities.

For some reason it is not working in safari, but works in every other
browser (even Konqueror in Linux). Here is the code....

<tr>
<td align="right" vAlign="center" width="220"><font
face="Verdana" size="2" color="red">*</font><font face="Verdana"
size="2" color="0000FF">Multiple Cities?:</font></td>
<td vAlign="center" width="388" align="left"><font
face="Verdana" size="2" color="0000FF">
&nbsp;Yes:&nbsp;<input type="radio" name="multiple" <cfif
#URL.travel_id# neq ""><cfif #trim(get.multiple)# eq
"YES">checked</cfif></cfif>
onclick="document.all.displaymultiple.style.display ='';" value="YES">
&nbsp;No:&nbsp;<input type="radio" name="multiple" <cfif
#URL.travel_id# neq ""><cfif #trim(get.multiple)# eq
"NO">checked</cfif><cfelse>checked</cfif>
onclick="document.all.displaymultiple.style.display='none';"
value="NO">
</td>
</tr>



<tr id="displaymultiple" style="display:none">
<td align="right" vAlign="center" width="220"><font
face="Verdana" size="2" color="red">*</font><font face="Verdana"
size="2" color="0000FF">How many Cities?:</font></td>
<td vAlign="center" width="388" align="left"><font
face="Verdana" size="2" color="0000FF"><input style="font-size:10px"
name="number_cities" value="<cfif #URL.travel_id# neq
"">#get.number_cities#</cfif>" size="51"></td>
</tr>





This is driving me crazy. Has anyone ever see something like this??
Thanks
 
A

ASM

(e-mail address removed) a écrit :
Hello all,

I created some javascipt triggered by an onclick that will display a
section based on a toggle switch. Please view
https://chimatravel.net/travel_auth.cfm and look all the way down at
the bottom at Multiple Cities. If you select on YES, a field should be
displayed below that allows you to enter how many cities.

For some reason it is not working in safari, but works in every other
browser (even Konqueror in Linux). Here is the code....

what a non clean (to do not say uggly) code ...

[snip]
onclick="document.all.displaymultiple.style.display ='';"

document.all is not JavaScript (it is IE language)

if displaymultiple is the name (not id) of what you have to display :

document.forms['mameOfYourForm'].displaymultiple.style.display ='';"

or (not compatible with NC4) using id of what you have to display :

document.getElementById('id_Of_displaymultiple').style.display='';
 
S

scott

Stephane, thank you so much!!! It worked perfectly. Sorry about the
code. It looked fine in my resolution(high) but when I reduced it, it
was all messed up.

Thanks again!!!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,014
Latest member
BiancaFix3

Latest Threads

Top