Click here to Skip to main content
15,886,362 members
Home / Discussions / JavaScript
   

JavaScript

 
QuestionListBox Dropdown is displaying items only after blur Pin
indian14328-Jan-15 8:27
indian14328-Jan-15 8:27 
GeneralRe: ListBox Dropdown is displaying items only after blur Pin
jkirkerx29-Jan-15 7:51
professionaljkirkerx29-Jan-15 7:51 
GeneralRe: ListBox Dropdown is displaying items only after blur Pin
indian1433-Feb-15 14:48
indian1433-Feb-15 14:48 
GeneralRe: ListBox Dropdown is displaying items only after blur Pin
jkirkerx4-Feb-15 6:33
professionaljkirkerx4-Feb-15 6:33 
Question(Solved) How to convert Microsoft Word smart tags to normal tags? Pin
samflex23-Jan-15 14:39
samflex23-Jan-15 14:39 
AnswerRe: How to convert Microsoft Word smart tags to normal tags? Pin
Richard Deeming26-Jan-15 2:33
mveRichard Deeming26-Jan-15 2:33 
GeneralRe: How to convert Microsoft Word smart tags to normal tags? Pin
samflex26-Jan-15 12:49
samflex26-Jan-15 12:49 
QuestionDisplay an InnertDiv when outer Div is hidden Pin
indian14320-Jan-15 8:03
indian14320-Jan-15 8:03 
Hi,

I have couple of divs and spans are inserted within one another, but in a particular situation I want to make inner div visible or show when outer div is hidden or invisible. Please help me with this regard. Here is the code snippet for it.

Where the condition if (event.target.checked) outer div WaitListDiv is hidden and then I want to show the OptOutDiv inner div, but it is not showing up, please let me know if there is anyway to resolve this issue. I have tried all those options which are commented and un-commented. When I tried with the code OptOutDiv.show("fast"); then it gave me error "uncaught typeerror undefined is not a function" on the browser debugging.
Thanks in advance.

Here is the element
<div class="my-section" id="WaitListDiv">
    <p>
        It is recommended that this child be placed on a waiting list as soon as possible.  This allows all ELMS
        users at the Waiting List site(s) the ability to provide services to the child in a more timely fashion.
    </p>
    <div id="OptOutDiv">
        <asp:CheckBox ID="chkOptOut" runat="server" Text="Parent Does Not Wish to Add Child to Waiting List" AutoPostBack="true" />
        <span id="spnOptOutReason" runat="server">
        <asp:Label ID="lblOptOutReason" runat="server" AssociatedControlID="txtOptOutReason" Text="Reason:" />
        <asp:TextBox ID="txtOptOutReason" runat="server" DataField="OptOutOfWaitListReason" DataType="PrescreenData" />
        <asp:Button ID="btnSaveReason" runat="server" Text="Save Opt Out Reason" />
        </span>
    </div>

    <elms:AvailableWaitingLists runat="server" ID="waitList" />
</div>


Here is javascript/jquery code
optOut: function (event) {
    var waitListDiv = $("[id$='grdWaitList']").closest("div.my-container");

    if (event.target.checked) {
        waitListDiv.hide("fast");
        //OptOutDiv.show("fast");

        var j = jQuery.noConflict();
        j('#OptOutDiv').show("fast");

        //$("[id$='spnOptOutReason']").show("fast");
        j('#spnOptOutReason').show("fast");
    } else {
        waitListDiv.show("fast");

        $("[id$='spnOptOutReason']").hide("fast");

        //If they didn't set a reason, no need to save anything ...
        if ($("[id$='txtOptOutReason']")[0].value != "") {
            $("[id$='txtOptOutReason']")[0].value = "";
            ELMS.Common.sneakySave($("[id$='chkOptOut']")[0].name, true, ELMS.Page.sneakySave_Callback, ELMS.Page._originalOptOutCallback);
        }
    }
},

Thanks & Regards,

Abdul Aleem Mohammad
St Louis MO - USA

NewsHow to improve Angular performance using delegated events (iv-on-cmd directives) Pin
Michael Collins - Intervalia20-Jan-15 5:09
professionalMichael Collins - Intervalia20-Jan-15 5:09 
GeneralRe: How to improve Angular performance using delegated events (iv-on-cmd directives) Pin
Richard MacCutchan20-Jan-15 5:47
mveRichard MacCutchan20-Jan-15 5:47 
QuestionOnclick event inside loop/fast clicking Pin
Member 1137830215-Jan-15 10:23
Member 1137830215-Jan-15 10:23 
AnswerRe: Onclick event inside loop/fast clicking Pin
jkirkerx15-Jan-15 10:34
professionaljkirkerx15-Jan-15 10:34 
GeneralRe: Onclick event inside loop/fast clicking Pin
Member 1137830215-Jan-15 11:32
Member 1137830215-Jan-15 11:32 
GeneralRe: Onclick event inside loop/fast clicking Pin
jkirkerx16-Jan-15 6:57
professionaljkirkerx16-Jan-15 6:57 
QuestionTooltip is not closing after the window is closed Pin
indian14314-Jan-15 5:41
indian14314-Jan-15 5:41 
AnswerRe: Tooltip is not closing after the window is closed Pin
jkirkerx15-Jan-15 10:19
professionaljkirkerx15-Jan-15 10:19 
AnswerRe: Tooltip is not closing after the window is closed Pin
jkirkerx15-Jan-15 10:25
professionaljkirkerx15-Jan-15 10:25 
GeneralRe: Tooltip is not closing after the window is closed Pin
indian14320-Jan-15 7:54
indian14320-Jan-15 7:54 
Questionhow do i put an uploaded image in a folder Pin
websource11-Jan-15 12:57
websource11-Jan-15 12:57 
AnswerRe: how do i put an uploaded image in a folder Pin
marmo1211-Jan-15 22:00
marmo1211-Jan-15 22:00 
QuestionJSON data not giving the wanted output Pin
Member 113621248-Jan-15 7:52
Member 113621248-Jan-15 7:52 
AnswerRe: JSON data not giving the wanted output Pin
borchef11-Jan-15 22:00
borchef11-Jan-15 22:00 
QuestionSimple Calculation Question Pin
Ryan McElveen2-Jan-15 11:08
Ryan McElveen2-Jan-15 11:08 
SuggestionRe: Simple Calculation Question Pin
Richard MacCutchan2-Jan-15 22:08
mveRichard MacCutchan2-Jan-15 22:08 
Questionneed source code for advance cricket game? Pin
Member 113164161-Jan-15 17:11
Member 113164161-Jan-15 17:11 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.