This topic is locked
[SOLVED]

 button after clicked not disabled

3/16/2012 9:33:29 AM
PHPRunner General questions
D
danaci author

hi,
page button after clicked In the javascript onload event:
$("input[type='button'][id^='savebutton']").click(function(e){
$(this).attr("disabled","disabeld");

});
savebutton still enable.

I want disable savebutton after click.

what is the correct code please?
best regards.

C
cgphp 3/16/2012

There is a typo in your code: disabeld instead of disabled. Fixed:

$("input[type='button'][id^='savebutton']").click(function(e){



$(this).attr("disabled","disabled");

});
D
danaci author 3/16/2012

dear cristian,

phpr b7113
$("input[type='button'][id^='savebutton']").click(function(e){
$(this).attr("disabled","disabled");

});
but still not working.

what is id savebutton on editpage.

[id^='save_button'] or [id^='saveButton'] or [id^='save_Button'] not working.
best regards.

C
cgphp 3/17/2012

Check firebug for errors.

C
cgphp 3/18/2012

Check the input type. It might be a submit type not button type. Check also the input id viewing the HTML source code of the html page.

$("input[type='submit'][id^='savebutton']").click(function(e){

$(this).attr("disabled","disabled");

});
D
danaci author 3/19/2012

hi,

$("input[type='submit'][id^='savebutton']").click(function(e){

$(this).attr("disabled","disabled");

});

not working dear christian.
Could we make it invisible? on clicked.

best regards.

C
cgphp 3/19/2012

Check the button properties with the "element inspector" option of firebug to know the id value and much more.

D
danaci author 3/20/2012

dear cristian,

button properties with the "element inspector" option of firebug

<span class="buttonborder">

<input id="savebutton" class="button" type="submit" onmouseover="this.focus();" value="Kaydet" name="submit1">

</span>
and my code

$("input[type='submit'][id^='savebutton']").click(function(e){

$(this).attr("disabled","disabled");

});
best regards.

Sergey Kornilov admin 3/20/2012

Try something like this:

$('#savebutton').click(function(e){

$(this).attr("disabled","disabled");

});


If this doesn't help post your application to Demo Account and open a ticket at http://support.xlinesoft.com sending your Demo Account URL. 'Demo Account' button can be found on the last screen in the program.

D
danaci author 3/20/2012

thnx admin. it's worked.

best regards.