Wrox Programmer Forums
|
HTML Code Clinic Do you have some HTML code you'd like to share and get suggestions from others for tweaking or improving it? This discussion is the place.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the HTML Code Clinic section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 29th, 2006, 10:51 PM
Registered User
 
Join Date: Nov 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default HTML combo box

I have a combo box in html, and with the following code:

Code:
<select NAME="Testing" onchange ="frmDisplay.submit()">
        <option>AAA</option>
        <option>BBB</option>
        <option>CCC</option>
</select>
So, after i change my selection, the form will be submitted.
I hope the combo box can show my selection as the default value after the frmDisplay.submit() instead of the first option.
Can someone help me on that?

 
Old December 18th, 2006, 08:19 AM
Friend of Wrox
 
Join Date: Oct 2003
Posts: 479
Thanks: 0
Thanked 3 Times in 3 Posts
Send a message via MSN to surendran Send a message via Yahoo to surendran
Default

hi,
if you are using asp try with following code

<form name="frmDisplay">
<select NAME="Testing" onchange ="frmDisplay.submit()">
<option>select</option>
<option value="1">AAA</option>
 <option value="2">BBB</option>
 <option value="3">CCC</option>
</select>
<%
Testing=REQUEST("Testing")
%>
<script language="javascript">
document.frmDisplay.Testing.selectedIndex='<%=Test ing%>'
</script>
</form>

surendran
(Anything is Possible)
http://ssuren.spaces.msn.com





Similar Threads
Thread Thread Starter Forum Replies Last Post
Populate a text box from a combo box value dnf999 Access VBA 7 February 6th, 2012 02:24 PM
Combo box to display items from parent combo box Gini Visual Studio 2008 0 June 18th, 2008 12:30 AM
Count in combo box(display results in text box) mboyisis Access 4 April 4th, 2008 07:08 AM
Combo box choice creating filtered combo box stevensj5 Access 11 September 13th, 2007 11:33 AM
Populate List Box by Combo Box Selection mmcdonal Access 2 June 15th, 2004 12:08 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.