Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Pass a form value that is different from selected value

Reply
Thread Tools

Pass a form value that is different from selected value

 
 
Iceman
Guest
Posts: n/a
 
      01-07-2004
I have a form set up that includes pull down menus that are sent to a
shopping cart Basket page. It works fine whenever the "code" being passed
is the same as the prompt. However I have a problem in that the code in my
shopping cart does not allow any spaces. I have the following example for a
color selection:

The form option is "As Shown"
That passes to the Basket Page as "As Shown"
Since there is a space it causes an error - I need to pass it to the Basket
as "As_Shown" which is how the "code" is set up in the Basket.

I can certainly change things so my prompt and code are the same, but it
looks unprofessional to present the user an option of
"As_Shown_in_Blue_Extra_Large_Add_$5.00".

I don't know too much about forms so any pointers are appreciated! Thanks.


 
Reply With Quote
 
 
 
 
Steve Pugh
Guest
Posts: n/a
 
      01-07-2004
"Iceman" <icedoggydogAThotmail.com> wrote:

>I have a form set up that includes pull down menus that are sent to a
>shopping cart Basket page. It works fine whenever the "code" being passed
>is the same as the prompt. However I have a problem in that the code in my
>shopping cart does not allow any spaces. I have the following example for a
>color selection:
>
>The form option is "As Shown"
>That passes to the Basket Page as "As Shown"
>Since there is a space it causes an error - I need to pass it to the Basket
>as "As_Shown" which is how the "code" is set up in the Basket.


Sounds like the shopping basket script could have been written better.
Are you really not able to fix that, rather than mucking about with
underscores?

>I can certainly change things so my prompt and code are the same, but it
>looks unprofessional to present the user an option of
>"As_Shown_in_Blue_Extra_Large_Add_$5.00".


Unless there's something you're not telling us I don't see what the
problem is.
<option value="As_Shown">As Shown</option>

The user sees a space, the shopping basket script sees an underscore,
everyone is happy.

Steve

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <(E-Mail Removed)> <http://steve.pugh.net/>
 
Reply With Quote
 
 
 
Reply

Thread Tools

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to pass selected item from listbox of one form to text box of other form chintan Software 0 12-19-2007 11:38 AM
how to pass value from first form to second form? =?Utf-8?B?YzY3NjIyOA==?= ASP .Net 2 01-11-2006 11:15 PM
Pass input Array value to function to calc different input value Susan Cranford Javascript 2 07-05-2005 02:53 AM
How to pass the selected row of a datagrid to another form ALI-R ASP .Net Datagrid Control 14 02-16-2005 06:26 PM
pass the control value from one web form to another form tom ASP .Net 4 11-13-2003 06:16 PM



Advertisments