Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_web_howto thread: Not a name, not a value, not and id...what is?


Message #1 by "Marcelo" <cyborg@m...> on Sat, 24 Feb 2001 20:23:57 -0800
Hi!



suposse that I've:

<select name="sel">

<option value="arg">Argentina</option>

...

</select>



I need to take both, the value and "ARGENTINA"  the text between the

tags.....is there a way to get it?  I tried many ways, but without

result....I also put that text (it becomes from a database) in the ID

attribute, but I see it in the html code, but I can't request it using

document.form.sel.id



any suggestion?



Thanks

Marcelo





Message #2 by Shaun Steckley <SSTECKLEY@P...> on Sat, 24 Feb 2001 21:53:11 -0500
When I need to pass multiple values in a form element, I delimit a string

and place it in the value attribute.  I then parse the value when the form

is submitted...



<option value="arg|Argentina">Argentina</option>





strValue = Split(request.form("sel"), "|")





-----Original Message-----

From: Marcelo [mailto:cyborg@m...]

Sent: Saturday, February 24, 2001 11:24 PM

To: ASP Web HowTo

Subject: [asp_web_howto] Not a name, not a value, not and id...what is?





Hi!



suposse that I've:

<select name="sel">

<option value="arg">Argentina</option>

...

</select>



I need to take both, the value and "ARGENTINA"  the text between the

tags.....is there a way to get it?  I tried many ways, but without

result....I also put that text (it becomes from a database) in the ID

attribute, but I see it in the html code, but I can't request it using

document.form.sel.id



any suggestion?



Thanks

Marcelo

Message #3 by "Marcelo" <cyborg@m...> on Sun, 25 Feb 2001 20:46:54 -0800
Cool....you're very tricky...jajaja



Thanks....



----- Original Message -----

From: "Shaun Steckley" <SSTECKLEY@P...>

To: "ASP Web HowTo" <asp_web_howto@p...>

Sent: Saturday, February 24, 2001 6:53 PM

Subject: [asp_web_howto] RE: Not a name, not a value, not and id...what is ?





> When I need to pass multiple values in a form element, I delimit a string

> and place it in the value attribute.  I then parse the value when the form

> is submitted...

>

> <option value="arg|Argentina">Argentina</option>

>

>

> strValue = Split(request.form("sel"), "|")

>

>

> -----Original Message-----

> From: Marcelo [mailto:cyborg@m...]

> Sent: Saturday, February 24, 2001 11:24 PM

> To: ASP Web HowTo

> Subject: [asp_web_howto] Not a name, not a value, not and id...what is?

>

>

> Hi!

>

> suposse that I've:

> <select name="sel">

> <option value="arg">Argentina</option>

> ...

> </select>

>

> I need to take both, the value and "ARGENTINA"  the text between the

> tags.....is there a way to get it?  I tried many ways, but without

> result....I also put that text (it becomes from a database) in the ID

> attribute, but I see it in the html code, but I can't request it using

> document.form.sel.id

>

> any suggestion?

>

> Thanks

> Marcelo




  Return to Index