$('#prim').click(function(){
if (sr==17)
{
$('#prim').attr("value","try again");
$('#prim').click(window.location.reload());
};
)};
it's always automaticly reloading my page, but I want that it's work when I clicked this button?
JavaScript+JQuery!? How to disable automatic reload function for my button!?
Started by Stasonix, Apr 15 2011 05:10 PM
1 reply to this topic
#1
Posted 15 April 2011 - 05:10 PM
when I use this code:
|
|
|
#2
Posted 19 April 2011 - 07:47 AM
Try the following adjustment. By adding return false to the onClick event it should tell the browser to stop any browser related tasks after running your script.
$('#prim').click(function(){
if (sr==17)
{
$('#prim').attr("value","try again");
$('#prim').click(window.location.reload());
};
return false;
)};
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users


Sign In
Create Account


Back to top









