Jump to content

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


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?

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.