Jump to content

Using JS to add a flashing update to a textbox on change


scotchegg78

Recommended Posts

HI Guys

 

I have a text box that uses JQUERY/ajax to update the database field on change at the moment.

It works great the only draw back been there is no visual indication to the user it has changed.

 

How do i modify this code to add a flashing "updating" in teinput box value for a few seconds then display the value again.

 

the input box is...

 

<input autocomplete="off" id="inputString" onChange="updateMood(this.value);" type="text" class="pal_search long_search" type="text" name="vMood" value="<?php if($mood ==""){$mood = "Update your Status...";} echo $mood;?>"/>

 

the update modd function is simply..

 

function updateMood(newMood)
{

if(newMood==""){newMood = ".";};

jQuery.post("/pals/ajax_interface.php", {newMood: newMood});

}

 

thanks for any details :)

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.