Help with form

Not sure if this is the correct area as it is html embedded into a perl script.

Anyway, I have this form in my page:

<table cellpadding="1" cellspacing="1" width="100%" class="border">
<tr>
<form action="$surl\" name="newonly" method="POST">
<td align="left" style="padding: 5px" class="catbg"><span class="smalltext">Your current settings are: $current - Choose how you would like to view posts</span>&nbsp;<select name="newonly"><option value="">Select Post View</option><option value="unread">View Unread</option><option value="all">View All</option</select> <input type="submit" class="button" value="Select">
</td>
</form>
</tr>
</table>


Everything works OK and the user file is updated etc etc but I have to click the Select button twice.

Does anyone know a way around this.

Many Thank's

Martin
hatapAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Ryan ChongCommented:
>>Everything works OK and the user file is updated etc etc but I have to click the Select button twice.
I think you mean select the drop down option and click the Select button need 2 actions? So if you want to make the changes once the user changed their drop down option, you may try like this:

<table cellpadding="1" cellspacing="1" width="100%" class="border">
<tr>
<form action="$surl\" name="newonly" method="POST">
<td align="left" style="padding: 5px" class="catbg"><span class="smalltext">Your current settings are: $current - Choose how you would like to view posts</span>&nbsp;<select name="newonly" onChange="document.forms[0].submit();"><option value="">Select Post View</option><option value="unread">View Unread</option><option value="all">View All</option</select> <input type="submit" class="button" value="Select">
</td>
</form>
</tr>
</table>

?
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
hatapAuthor Commented:
Worked like a charm ryancys, thanx very much.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
HTML

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.