Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Pre-checking checkbox on an orderform

Reply
Thread Tools

Pre-checking checkbox on an orderform

 
 
Jim Van Abbema
Guest
Posts: n/a
 
      12-09-2004
I am working on an artist's site where visitors are most likely to order
only a single item. I would like the visitor to check the item of their
choice and be redirected to the appropriate position on an order form with
the item's checkbox pre-checked. Is there a JavaScript solution for this?

Thanks,
Jim Van Abbema



 
Reply With Quote
 
 
 
 
Jan Faerber
Guest
Posts: n/a
 
      12-09-2004
Jim Van Abbema wrote:

> I am working on an artist's site where visitors are most likely to order
> only a single item. I would like the visitor to check the item of their
> choice and be redirected to the appropriate position on an order form with
> the item's checkbox pre-checked. Is there a JavaScript solution for this?
>
> Thanks,
> Jim Van Abbema


JavaScript is for free - you can do anything with it.
But I think your javascript is more important than you 'articles'. I will
give you an example: A sculptor is working many hours, many days or even
weeks or longer on one single figure. He is trying to find a buyer for this
piece of art to get money for living. He tells you the price for one
'article': 6.000.- Dollar - ok? And you have got a problem with it if a
checkbox is marked or not?



--
Jan

http://linux.janfaerber.com
 
Reply With Quote
 
 
 
 
Mark Parnell
Guest
Posts: n/a
 
      12-09-2004
Previously in alt.html, Jim Van Abbema <(E-Mail Removed)> said:

> I am working on an artist's site where visitors are most likely to order
> only a single item. I would like the visitor to check the item of their
> choice and be redirected to the appropriate position on an order form with
> the item's checkbox pre-checked.


Best done in your favourite flavour of server-side programming. E.g. in
PHP (off the top of my head, not tested):

<a href="orderform.php#picture204?item=picture204">Or der Picture
#204</a>

orderform.php:

<input type="checkbox" name="picture204" id="picture204" value="204"
<?php if($_GET['item']="picture204") { ?>checked<?php } ?>>

> Is there a JavaScript solution for this?


Why use Javascript (which won't work for everyone), when you can do it
server-side (which will work for everyone)?

--
Mark Parnell
http://www.clarkecomputers.com.au
 
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
ASPNET CheckBox and a CheckBox in a TemplateField Jason Huang ASP .Net 0 06-29-2007 12:35 AM
DataGrid and embeded Checkbox..How to find if checkbox clicked =?Utf-8?B?RG90TmV0RGV2?= ASP .Net 1 10-06-2006 04:11 PM
Accessing COM object in Commerce Server orderform using C# dougelderz@gmail.com ASP .Net 0 04-28-2006 04:44 PM
disable checkbox list checkbox Vikram ASP .Net 1 01-25-2006 02:59 PM
Text on Checkbox below the checkbox tshad ASP .Net 0 04-14-2005 11:26 PM



Advertisments