Pre-checking checkbox on an orderform

Discussion in 'HTML' started by Jim Van Abbema, Dec 9, 2004.

  1. 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
     
    Jim Van Abbema, Dec 9, 2004
    #1
    1. Advertising

  2. Jim Van Abbema

    Jan Faerber Guest

    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
     
    Jan Faerber, Dec 9, 2004
    #2
    1. Advertising

  3. Jim Van Abbema

    Mark Parnell Guest

    Previously in alt.html, Jim Van Abbema <> 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"
    <?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
     
    Mark Parnell, Dec 9, 2004
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Rocky Moore
    Replies:
    7
    Views:
    1,815
    mikeb
    Jan 14, 2004
  2. =?Utf-8?B?S2V2aW4gQnVydG9u?=

    Pre-Send Request Headers, Pre-Send Request Content

    =?Utf-8?B?S2V2aW4gQnVydG9u?=, Dec 31, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    1,130
    =?Utf-8?B?S2V2aW4gQnVydG9u?=
    Dec 31, 2004
  3. Wladimir Borsov
    Replies:
    7
    Views:
    514
    Raymond Loman
    May 5, 2004
  4. Replies:
    0
    Views:
    461
  5. Juha Nieminen
    Replies:
    3
    Views:
    1,211
    Juha Nieminen
    Feb 22, 2008
Loading...

Share This Page