Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Javascript
Password Reminder
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Javascript General Javascript discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old November 23rd, 2005, 10:05 PM
Authorized User
Join Date: Jun 2003
Location: Marikina, , Philippines.
Posts: 71
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to rylemer Send a message via MSN to rylemer Send a message via Yahoo to rylemer
Default populating textboxes using list/Menu

Hi! to all I posted here in Javascipt forum below is the reply of Van. and it work in populating 1 textbox. now it requires 4 textboxes to be populated. I need your help


Below is the Code
================================================== ====================

I think there are several problems in your code.

First, an OPTION object has a VALUE property. Also, the carriage-return you want is not an HTML <br>, but rather an ASCII 13.

So your option constructor should be like this:

Response.Write "<option value='" & objRSt("email") & "'>" & objRSt("assign") & "</option>" & chr(13)

Then, you need to access your selected item. A SELECT object has a couple of properties you can use. I will give two examples of how to change PutEmail().

Since you are passing "this", you can use it as the object reference.

//IE 4.0+, Netscape 6.0+
document.form1.txtEmail.value = objThis.value;

//IE 3.02+, Netscape 2.0+
document.form1.txtEmail.value = objThis.options[objThis.selectedIndex].value;

The newer version is much simpler, but it doesn't work with older browsers.

Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Populating a list box VBAbeginner Access VBA 1 April 8th, 2008 09:24 AM
VBScript to list Textboxes on page Ron Howerton VB How-To 5 October 5th, 2007 08:28 AM
textboxes or list boxes with multiple fore color svharishtech Pro VB 6 5 April 20th, 2007 05:04 PM
Populating report or form textboxes Bosstone100 Access VBA 3 November 15th, 2004 03:53 PM

All times are GMT -4. The time now is 07:51 PM.

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