codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:
Search Forums:
  Get selected value from value list  allyson212 at 15:25 on Thursday, March 11, 2004
 

I am trying to get a selected value from a value list from one form and enter it into a value in a second form for submission. I have accomplished this when the first field is a text field, but when I change it to a value list I cannot seem to get the selected value.

1st form name = example
2nd form name = form1

From form "example" select name="pichoice"

function setTokens(){
var selectone = document.example.pichoice;
var name1 = selectone.options[selectone.selectedIndex].value;
document.form1.elements ["profiles::pi_full_name"] .value = name1;
document.form1.submit();
}

Can anyone see what I am doing wrong?


  Re: Get selected value from value list  Troy Wolf at 16:37 on Thursday, March 11, 2004
 

I provided a complete code sample in this thread:
http://www.codetoad.com/forum/15_22701.asp
Just copy the code into Notepad, then save as SomeFileName.html, then run it in your browser.

You have an element named "profiles::pi_full_name"? That seems odd. Or is that some notation I've not seen before? (I learn something new at least once a week!)
Troy Wolf: site expert
Shiny Solutions


  Re: Get selected value from value list  allyson212 at 17:04 on Thursday, March 11, 2004
 

Thank you, I will take a look at it.

the "profiles::pi_full_name" is the field name from the FileMaker database I have including the relationship name of "profiles".

  Re: Get selected value from value list  Troy Wolf at 14:01 on Wednesday, March 17, 2004
 

allyson212, don't forget to follow up here in the forum with your solution. Without feedback, future forum readers are left wondering if the "expert" answer was accurate.

Thanks for using codetoad.com forums! :)
Troy Wolf: site expert
Shiny Solutions









CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums








Recent Forum Threads
•  Testing file for type of data
•  Running VB6 application as a ASP.NET application
•  login system with asp.net
•  Re: Help: Trouble with z-Index and SELECT lists
•  What is wrong with this ASP codes? It don`t seem to work???
•  Need help with ListBox control
•  Re: Good Javascript/DHTML Reference
•  Re: scrolling table
•  Re: simulation of road traffic


Recent Articles
Communicating with the Database (Using ADO)
MagicGrid
Simple Thumbnail Browsing Solution
Type Anywhere
A Better Moustrap: FmtDate to replace FormatDateTime
ASP.NET Forum Source Code
Internal Search Engine
Javascript Growing Window
Simple date validation
Search engine friendly URLs using ASP.NET (C#.NET)


Site Survey
Help us serve you better. Take a five minute survey. Click here!

© Copyright codetoad.com 2001-2004