close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Auto populate text field from list

Thread began 4/20/2010 8:21 pm by dave315749 | Last modified 4/21/2010 7:15 am by Jason Byrnes | 2470 views | 2 replies |

dave315749

Auto populate text field from list

I have a list and i want to show the value of the list in the text field next to it.

How do i go about doing this ?

Any webassist tools could help with it?

Thanks!

Sign in to reply to this post

CraigRBeta Tester

i did a test page with something like this a while ago, (a bit clunky to look at but it does the job)

depending on the option chosen, a label is updated by a javascript function.

it isn't a text box as you requested, but this may help.

you should be able to view the javascript if you have firebug.

gallerydetailstest.php?ImageID=17

Sign in to reply to this post

Jason ByrnesWebAssist

here is a sample script showing ho to pupulate a text box with the valu of the selected item and another with the lable of the selected itemL

<form id="form1" name="form1" method="post" action="">
<select name="selectList" id="selectList" onChange="document.form1.txtLable.value = document.form1.selectList[document.form1.selectList.selectedIndex].text; document.form1.txtValue.value = document.form1.selectList[document.form1.selectList.selectedIndex].value">
<option value="">Please make a selection</option>
<option value="1">one</option>
<option value="2">two</option>
<option value="3">three</option>
<option value="4">four</option>
<option value="5">five</option>
</select>
Lable
<input type="text" name="txtLable" id="txtLable" />
Value
<input type="text" name="txtValue" id="txtValue" />
</form>
Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...