0

hi, i create a web lan application, here my code:

        function Init_Form7()
        {   
        $("#i_b_name").val(''); 
        $("#i_b_last").val('');
        $("#i_b_prob option:first-child").attr("selected", "selected");
        $('#i_b_to   option:first-child').attr("selected", "selected");
        $("#i_b_acti").val('');
        $("#i_b_date"   ).val(''); 
        $("#i_b_le_date").val('');
        $('#i_b_wil option:first-child').attr("selected", "selected");
         }

on the "reset button" i call this function onclick="Init_From7();"
the problem is , when i click on server machine the "reset button" all text-inpput get empty and the selects got the first child,
and if im on the client the input-text goes empty, but no first child is selected anymore, note that the values of option is selected to 1rst child , but not the graphic anyone can help me thank you.

Edited by younes.keraressi

2
Contributors
1
Reply
4
Views
2 Years
Discussion Span
Last Post by AleMonteiro
0

I didn't understand what you saying about server and client machine, jQUery is always client.

Anyway, try like this:

    $("#i_b_prob")
        .children()
            .removeProp("selected")
            .first()
            .prop("selected", true);

Edited by AleMonteiro

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.