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
https://forums.phpfreaks.com/topic/209173-resetting-a-chained-select-list/
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 ;)

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.