Click here to Skip to main content
15,890,438 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionTrying to set fixed width with stringbuilder is not working correctly. Pin
samflex15-Nov-16 3:57
samflex15-Nov-16 3:57 
QuestionBest approach to avoid confusion in Configuration file when deploying an ASP.Net MVC application Pin
indian14314-Nov-16 13:48
indian14314-Nov-16 13:48 
AnswerRe: Best approach to avoid confusion in Configuration file when deploying an ASP.Net MVC application Pin
Nathan Minier15-Nov-16 1:33
professionalNathan Minier15-Nov-16 1:33 
GeneralRe: Best approach to avoid confusion in Configuration file when deploying an ASP.Net MVC application Pin
indian14315-Nov-16 5:54
indian14315-Nov-16 5:54 
AnswerRe: Best approach to avoid confusion in Configuration file when deploying an ASP.Net MVC application Pin
Richard Deeming15-Nov-16 2:21
mveRichard Deeming15-Nov-16 2:21 
AnswerRe: Best approach to avoid confusion in Configuration file when deploying an ASP.Net MVC application Pin
Dominic Burford17-Nov-16 2:41
professionalDominic Burford17-Nov-16 2:41 
QuestionNeed help with validation on image links Pin
Bootzilla3314-Nov-16 8:56
Bootzilla3314-Nov-16 8:56 
QuestionAssign a javascript or jQuery method to a button onClick event Pin
indian14314-Nov-16 6:24
indian14314-Nov-16 6:24 
Hi All,

I have a following jQuery function, I want this function to be added to a button that is being added along with the Divs, one after the other. I have the Div adding function also, I want to assign "onRemoveClick" function to each input button that is added along with the Divs
var onRemoveClick=function () {
                alert($(this).parent().attr('id'));
                $(this).parent().remove();
            };

Here is my Divs adding function:
var addNewDate = function ($wrapper) {
    count++;
    var tmpHTML = '<div class="parameterFieldResize parameterField" style="width: fit-content;" id="' + paramName + '_1_Div' + count + '">' +
       '<input class="parameterDateRangePicker clearable start" style="width:70px" placeholder="Start" type="text" name="' + paramName + '_1_StartDate' + count + '" id="' + paramName + '_1_Start' + count + '"  />' +
       '<input class="parameterDateRangePicker clearable end" style="width:70px" placeholder="End" type="text" name="' + paramName + '_1_EndDate' + count + '" id="' + paramName + '_1_End' + count + '"  />' +
       '<button type="button" style="height:5px; width:5px" id="' + paramName + '_1_Remove' + count + '" class="remove-field">x</button>' +
     '</div>';

    var $newField = $(tmpHTML).appendTo($wrapper);

    $newField.find('.parameterDateRangePicker.clearable.start').datepicker({
        changeMonth: true,
        changeYear: true,
        onSelect: onStartDateSelect
    });

    $newField.find('.parameterDateRangePicker.clearable.end').datepicker({
        changeMonth: true,
        changeYear: true,
        onSelect: onEndDateSelect
    });

    $newField.find('.remove-field').on({
        onClick: onRemoveClick
    });
};

I am trying as in the following way, but its not working, can you please suggest me something
$newField.find('.remove-field').on({
                    onClick: onRemoveClick
                });

any sort of help a code snippet, a link or even suggestion would be very helpful, thanks in advance.
Thanks,

Abdul Aleem

"There is already enough hatred in the world lets spread love, compassion and affection."

AnswerRe: Assign a javascript or jQuery method to a button onClick event - Resolved Pin
indian14314-Nov-16 6:27
indian14314-Nov-16 6:27 
Questionhow to bind two dropdownlists using jquery,C# from backend Pin
Member 1284531611-Nov-16 1:49
Member 1284531611-Nov-16 1:49 
Rant[REPOST] how to bind two dropdownlists using jquery,C# from backend Pin
Richard Deeming11-Nov-16 2:04
mveRichard Deeming11-Nov-16 2:04 
QuestionThe datepicker input items that are added at runtime using Jquery are not firing the datepicker event Pin
indian1439-Nov-16 13:19
indian1439-Nov-16 13:19 
AnswerRe: The datepicker input items that are added at runtime using Jquery are not firing the datepicker event Pin
Richard Deeming10-Nov-16 2:13
mveRichard Deeming10-Nov-16 2:13 
GeneralRe: The datepicker input items that are added at runtime using Jquery are not firing the datepicker event Pin
indian14310-Nov-16 5:53
indian14310-Nov-16 5:53 
GeneralRe: The datepicker input items that are added at runtime using Jquery are not firing the datepicker event Pin
Richard Deeming10-Nov-16 5:58
mveRichard Deeming10-Nov-16 5:58 
GeneralRe: The datepicker input items that are added at runtime using Jquery are not firing the datepicker event Pin
indian14310-Nov-16 6:30
indian14310-Nov-16 6:30 
GeneralRe: The datepicker input items that are added at runtime using Jquery are not firing the datepicker event Pin
Richard Deeming10-Nov-16 6:48
mveRichard Deeming10-Nov-16 6:48 
GeneralRe: The datepicker input items that are added at runtime using Jquery are not firing the datepicker event Pin
indian14310-Nov-16 6:51
indian14310-Nov-16 6:51 
Questiondiv controls outside of a repeater should be made invisible Pin
Scott529-Nov-16 5:17
Scott529-Nov-16 5:17 
AnswerRe: div controls outside of a repeater should be made invisible Pin
Richard Deeming9-Nov-16 5:42
mveRichard Deeming9-Nov-16 5:42 
GeneralRe: div controls outside of a repeater should be made invisible Pin
Scott529-Nov-16 7:59
Scott529-Nov-16 7:59 
GeneralRe: div controls outside of a repeater should be made invisible Pin
Scott529-Nov-16 9:57
Scott529-Nov-16 9:57 
GeneralRe: div controls outside of a repeater should be made invisible Pin
Richard Deeming9-Nov-16 10:38
mveRichard Deeming9-Nov-16 10:38 
QuestionMessage Closed Pin
9-Nov-16 2:00
Pk Fun Zone9-Nov-16 2:00 
AnswerRe: Design my Site?? Pin
Richard MacCutchan9-Nov-16 2:24
mveRichard MacCutchan9-Nov-16 2:24 

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.