Jump to content
php.lv forumi
  • 0

Jquery bez alert nestrada


Question

Posted (edited)

Kaut kada divainiba.

Šādi mans kods nestradā!

function moveObj(tableval, IDval, wayval){ 
   $.post("move.php", {table: tableval, idv: IDval, way: wayval});         
   window.location.reload();
}   

Bet šādi strādā

function moveObj(tableval, IDval, wayval){ 
   $.post("move.php", {table: tableval, idv: IDval, way: wayval});         
   window.location.reload();
   alert('strada');
}   

Kas par problēmu ka bez alert nestrādā?

 

Viss kārtībā tagad strādā! noņēmuu nost window.location.reload();

Edited by reiniger

2 answers to this question

Recommended Posts

  • 0
Posted

Ja gribi aizsūtīt ar ajax datus un pēc tam pārlādēt lapu, tad pārlādi taisi ajax post-a callback funkcijā.

$.post('lolat.php',{data:data},function(){
 window.location.reload();
},'text');

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...