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 :)

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

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

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  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.

×
×
  • 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.