Results 1 to 3 of 3
  1. #1
    azonicds2 is offline Member
    Join Date
    Mar 2012
    Posts
    2
    Rep Power
    0

    Question Safari & Chrome Problem - Please Help! New to Java

    Hi All

    Im creating a web form and have a bit of an issue with some Java that I have placed in the aspx page. It works perfectly in both Internet explorer, Firefox and Opera but not in Chrome or Safari.

    Basically I have a checkbox, that upon ticking, makes a fieldset containing a drop down box and a mutli line text box appear.

    I have 3 funtions, 1 for the show/hide of the field set and then one for each of the form elements. Im new to Java so there may be a better way to do this...? Anyway, the show/hide works perfectly but the enabling of the 2 new form elements just don't work in chrome or safari, theres no errors, it just seems to get ignored.

    Code below:
    Java Code:
    <script language="javascript" type="text/javascript"> 
           
    	    function nowillClicked(sender) { 
    			 
    		document.getElementById('adminset').style.display = sender.checked ? 'block' : 'none';
    	
            } 
    		
    		function enableTextBox() {
            var textBoxID = "<%= Administrators_Explanation.ClientID %>";
            if (document.getElementById("<%= Administrators_TheEstateHasNoWill.ClientID %>").checked == true)
                document.getElementById(textBoxID).disabled = false;
            else
                document.getElementById(textBoxID).disabled = true;
     	   }
    	   
    	   function enableDropBox() {
            var dropBoxID = "<%= Administrators_Priority.ClientID %>";
            if (document.getElementById("<%= Administrators_TheEstateHasNoWill.ClientID %>").checked == true)
                document.getElementById(dropBoxID).disabled = false;
            else
                document.getElementById(dropBoxID).disabled = true;
     	   }
    		
        </script>
    ASP.Net Code:

    Java Code:
    <asp:CheckBox id="Administrators_TheEstateHasNoWill" 
    name="Administrators_TheEstateHasNoWill" Text=" The Estate Has No Will" TabIndex="23"
    Checked="false" OnChange="javascript:enableTextBox();enableDropBox();" onClick="nowillClicked(this)"
     CausesValidation =false runat="server"  />
    
    
    <div id="adminset" style="display: none;" >
    	<fieldset>
        	<legend>Administrators</legend>
          <asp:DropDownList id="Administrators_Priority" name="Administrators_Priority" Enabled="false"
     TabIndex="24" AutoPostBack="False" runat="server">
                      <asp:ListItem Value="Brother/Sister"> Brother/Sister </asp:ListItem>
                      <asp:ListItem Value="Children"> Children </asp:ListItem>
                      <asp:ListItem Value="Parents"> Parents </asp:ListItem>
                      <asp:ListItem Selected="True" Value="Spouse"> Spouse </asp:ListItem>
                   </asp:DropDownList>
    
          <asp:Label ID="Label78" runat="server" CssClass="FormHeader" AssociatedControlID="Administrators_Explanation" >
    Explain why the people in the categories above are not applying (Unless Spouse is selected above):
    </asp:Label>
            <asp:TextBox ID="Administrators_Explanation" name="Administrators_Explanation" 
    Enabled="false" runat="server" Width="100%" Rows=5 TabIndex="25"
     TextMode=MultiLine></asp:TextBox>
        </fieldset>
        </div>
    Tried to trim as much of the none relevant parts of that code out.

    But this has been driving me mad, I cannot get the Re-Enabling two functions to work in Chrome or Safari.

    Thanks very much in advance for any help anyone can offer.

    Regards
    Danny
    Last edited by azonicds2; 03-23-2012 at 04:03 PM.

  2. #2
    yellowledbet is offline Senior Member
    Join Date
    Feb 2011
    Location
    Georgia, USA
    Posts
    122
    Rep Power
    0

    Default Re: Safari & Chrome Problem - Please Help! New to Java

    Java is not JavaScript. I suggest you find a JavaScript forum.

  3. #3
    azonicds2 is offline Member
    Join Date
    Mar 2012
    Posts
    2
    Rep Power
    0

    Default Re: Safari & Chrome Problem - Please Help! New to Java

    oh right sorry. my bad, ill be on my way.

Similar Threads

  1. Java Applet is not working in Google Chrome
    By AsoInfo in forum Java Applets
    Replies: 2
    Last Post: 01-28-2012, 05:56 AM
  2. Safari browser not logging off
    By satyan in forum Java Applets
    Replies: 1
    Last Post: 08-09-2011, 09:40 AM
  3. IE9 and Chrome
    By turboscrew in forum Suggestions & Feedback
    Replies: 2
    Last Post: 05-19-2011, 03:34 PM
  4. Replies: 0
    Last Post: 12-24-2009, 12:37 PM
  5. Chroma chrome key
    By lambeau86 in forum New To Java
    Replies: 0
    Last Post: 03-19-2008, 12:41 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •