Jump to content

Resetting a chained select list


chipowski

Recommended Posts

Hi all.

Apologies if this has been answered before but I've searched the forums and spent hours on the net going through every site listed to find out how to do this and come up with nothing so far.

 

Does anyone have some code to refresh the content of a div based on an onChange event from a form?

All I can find is a time based refresh - listed below - which does work fine. But I need the event to be user controlled rather than time based.

 

Any help will be greatly appreciated.

 

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.0/jquery.min.js"></script> 
<script> 
var auto_refresh = setInterval(
function()
{
$('#loaddiv').load('data_page.php');
}, 20000);
</script>

Link to comment
Share on other sites

well thats easy...  onchange="runthis();"

 

function runthis() {

$('TransMsgDisplay').innerHTML='<img src="../templates/admin/img/indicator.gif" align="center">';

}

 

this of course has sno real ajax involved but you should be able to figure out the rest ;)

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.