Jump to content

Dynamic page population with drop down


brob

Recommended Posts

If you want not to submit page neither on same page nor on any other page then the solution is AJAX.

A basic tutorial can be found here: http://www.w3schools.com/ajax/default.asp

 

If you want it to be submitted to the same page where the dropdown is located then you will need a javascript function.

This javascript function will take data 'id' i suppose from your dropdown and will refresh the page with the value from the dropdown in the url.

<script language="javascript">
function refresh_page(dropdown){
  var id = dropdown.options[dropdown.options.selectedIndex].value;
  location = 'pageurl.php?id='+id;
}
</script>

 

on your dropdown list you can use onchange event.

onchange="refresh_page(this);"

 

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.