Solved

How to populate a field_B with selected items from field_A on the web

Posted on 2004-09-13
8
187 Views
Last Modified: 2013-12-18
I have a form with several fields, two of them are listboxes field_A and field_B.  Field_A is populated with a lookup formula in the "Use formula for choices" No problem with that.  Can anyone help me with a javascript code to populate field_B with selected items ifrom field_A so that it stays there after submit ?
0
Comment
Question by:saemundurs
8 Comments
 
LVL 31

Accepted Solution

by:
qwaletee earned 125 total points
ID: 12048597
I don't see why you can't just use a formula for choices for field B, and use the following formula: field_A

The values selected in field A will save when submitted, so when you open the doc again, field B will evaluate field A for choices, and come up with the same list that was present last time.
0
 
LVL 2

Expert Comment

by:kalios
ID: 12049057
Is field B currently computed field.

in the submit button put this code:

var f = window.document.forms[0];    
f.field_B.options[f.field_B.selectedIndex].text =  f.field_A.options[f.field_A.selectedIndex].text;

Kalios
0
 
LVL 14

Expert Comment

by:p_partha
ID: 12049209
Qwal is right, but if you are strictly looking out for javascript solution, here is one:

http://codestore.net/store.nsf/unid/DFOU-4PRG6V?OpenDocument

Partha
0
 
LVL 63

Expert Comment

by:Zvonko
ID: 12049427
Put this in the onChange event of Field field_A:

this.form.field_B.value=this.options[this.selectedIndex].text;


Also be aware that field names are case sensitive in JavaScript.

0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 

Author Comment

by:saemundurs
ID: 12053322
Thank you all for your time.  athough not the ideal solution to my problem I can use theaccepted answere as a temp solution.
0
 
LVL 63

Expert Comment

by:Zvonko
ID: 12058478
And why do you give a grading B??? Don't you know that the experts get less points with a grading B?

Hello to qwaletee <|;-)

0
 

Author Comment

by:saemundurs
ID: 12059637
I am actually new to this site and I didn't know that points get multiplied by the grading.  So doing some reading on grading.  Maybe you can give me a hint on how to grade.  When to use B and when A or do you always use A because it gives the most points ?

Anyway, thank you for your input.
s
0
 
LVL 63

Expert Comment

by:Zvonko
ID: 12059681
Yes please. Give only grade A as an Thank You, and grade B when you are disappointed. (at least that is my View of grading :)
If you want to correct your grading, then post a request in this topic area:
http://www.experts-exchange.com/Community_Support/

Cheers,
Zvonko
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

For Desktop Techs: How to retain a user's Notes configuration data when swapping out the end user's computer. (Assuming that you are not upgrading to a completely different version of Notes client) All you need to do is: 1) install Notes o…
I thought it will be a good idea to make a post as it will help in case someone else faces these issues. I trust this gives an idea how each entry in Notes.ini can mean a lot for the Domino Server to be functioning properly. This article discusses t…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now