Results 1 to 3 of 3
- 03-23-2012, 04:58 PM #1
Member
- Join Date
- Mar 2012
- Posts
- 2
- Rep Power
- 0
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>
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>
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
DannyLast edited by azonicds2; 03-23-2012 at 05:03 PM.
- 03-23-2012, 05:03 PM #2
Senior Member
- Join Date
- Feb 2011
- Location
- Georgia, USA
- Posts
- 122
- Rep Power
- 0
Re: Safari & Chrome Problem - Please Help! New to Java
Java is not JavaScript. I suggest you find a JavaScript forum.
- 03-23-2012, 05:06 PM #3
Member
- Join Date
- Mar 2012
- Posts
- 2
- Rep Power
- 0
Similar Threads
-
Java Applet is not working in Google Chrome
By AsoInfo in forum Java AppletsReplies: 2Last Post: 01-28-2012, 06:56 AM -
Safari browser not logging off
By satyan in forum Java AppletsReplies: 1Last Post: 08-09-2011, 10:40 AM -
IE9 and Chrome
By turboscrew in forum Suggestions & FeedbackReplies: 2Last Post: 05-19-2011, 04:34 PM -
JxBrowser 2.0 now integrates Java with Mozilla Gecko, Internet Explorer and Safari
By TeamDev in forum Java SoftwareReplies: 0Last Post: 12-24-2009, 01:37 PM -
Chroma chrome key
By lambeau86 in forum New To JavaReplies: 0Last Post: 03-19-2008, 01:41 AM
Bookmarks