Pre-checking checkbox on an orderform

J

Jim Van Abbema

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
 
J

Jan Faerber

Jim 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. 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?
 
M

Mark Parnell

Previously in alt.html 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">Order Picture
#204</a>

orderform.php:

<input type="checkbox" name="picture204" id="picture204" value="204"
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)?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,432
Messages
2,571,682
Members
48,796
Latest member
Greg L.

Latest Threads

Top