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

Discussion in 'Javascript' started by scott@dettcom.com, May 17, 2006.

  1. Guest

    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
    , May 17, 2006
    #1
    1. Advertising

  2. ASM Guest

    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='';



    --
    Stephane Moriaux et son [moins] vieux Mac
    ASM, May 17, 2006
    #2
    1. Advertising

  3. Guest

    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!!!
    , May 19, 2006
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Sue
    Replies:
    5
    Views:
    2,421
    Shawn Mehaffie
    Jan 22, 2004
  2. khinester

    Safari display:none in a list

    khinester, Jun 9, 2007, in forum: HTML
    Replies:
    7
    Views:
    1,037
  3. Adrienne Boswell
    Replies:
    8
    Views:
    847
    Bergamot
    Oct 18, 2008
  4. Foreman
    Replies:
    5
    Views:
    208
    Foreman
    Jan 25, 2005
  5. khinester

    Safari display:none in a list

    khinester, Jun 9, 2007, in forum: Javascript
    Replies:
    7
    Views:
    151
Loading...

Share This Page