Jump to content

[SOLVED] When selecting from dropdown list automatically recalculates. How?


ghurty

Recommended Posts

Hi

I am pretty new to php coding so please bear with me.

I have a drop down list of locations, and then I have a calculate button to refresh the page using the new location.

How can I have it that as soon as you click on a location, it recalculates, and that you dont need to click on the calculate button at all?

 

Thanks

 

<form name="mainform" action="index.php" method="get">
<input type="hidden" name="option" value="com_luach" />
<select name="activelocation">
<?php fillLocationList($activelocation); ?>
</select>
<input name="Submit" type="submit" value="Calculate">

Thank you,

 

That did the trick

 

 

You just want to submit the form when someone selects an option in the dropdown menu yeah?

 

<select name="activelocation" onchange="this.submit();">

 

 

Why bring ajax into this at all?

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.