Don't pass Radio button Value (Full Version)

All Forums >> [Web Development] >> Expression Web Help



Message


shoky -> Don't pass Radio button Value (11/10/2007 11:56:51)

I have a form where users select from Radio buttons. The last selection is other. When you select other a text box appears for user input. How do I get just the text input passed? Say you type IT Company in the box. What I'm getting is Other, IT Company. How can I get rid of the word Other and the Comma? Also if I select one the named Radio Buttons - I get Contractor, How do I get rid of the Comma in this case?

Here's a link: http://efire.info/cust_service.aspx

Any Ideas?!




William Lee -> RE: Don't pass Radio button Value (11/10/2007 20:17:35)

The reason why you are getting the Comma is because the textbox is named the same as the Radio buttons. When you submit the form, they are sent over as array. eg Customer_Type(Other, IT Company) or Customer_Type( Contractor, ) The value in the textbox is sent as well even though it is empty.




shoky -> RE: Don't pass Radio button Value (11/10/2007 22:06:34)

Thanks! That was the Comma problem - I was just trying to send the 'Other' text as the Customer_Type - but I think I can work with it as is now.

Thanks again![:)]




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.03125