Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 09-25-2003, 07:00 PM   PM User | #1
tweetie37
Regular Coder

 
Join Date: Sep 2003
Posts: 107
Thanks: 0
Thanked 0 Times in 0 Posts
tweetie37 is an unknown quantity at this point
order form

Hi everyone:
I am new to JS so I'll appreciate any help I can get. I want an order form to do this:
First customers enter their name & address, etc. Then, when they click on a flyer they want to buy, their info automatically will show up on the flyer (to show them as a sample of how their flyer whould look like).
Also, I want to do a type of shopping cart that when they enter the # of flyers, the total would show the actual total (ex: 5000 flyers X $.37 each = $1850) which is $1850 and so on down the line.
I'll be grateful for any help,
Thanks
tweetie37 is offline   Reply With Quote
Old 09-25-2003, 08:14 PM   PM User | #2
lavalamp
Regular Coder

 
Join Date: Aug 2003
Location: Loughborough University
Posts: 427
Thanks: 0
Thanked 0 Times in 0 Posts
lavalamp is an unknown quantity at this point
Well the shopping cart thing I can help you with straight away because I have one already made, even though client side JavaScript would not be the best tool for the job.

The flyer, you could just have the text displayed on the page with the background for the text as the image for the flyer. JavaScript cannot create files other than cookies so if you want the preview to be all an image rather than text on top of an image I would suggest learning PHP.

In any case, here's the shopping cart for starters, although for some reaon it doesn't work for Opera so I'll work on a fix for that:
Attached Files
File Type: zip widget price calculator.zip (2.3 KB, 259 views)
__________________
AMD Athlon "Barton" XP 3200+ (11*200.5MHz = 2.2GHz)
BFG GeForce 6800 Ultra OC 256Mb
3 * Kingston 256Mb PC3200 DDR400
Seagate Barracuda 120Gb Ultra ATA-100 and Seagate Barracuda 160Gb, SATA-150
lavalamp is offline   Reply With Quote
Old 09-26-2003, 02:23 PM   PM User | #3
tweetie37
Regular Coder

 
Join Date: Sep 2003
Posts: 107
Thanks: 0
Thanked 0 Times in 0 Posts
tweetie37 is an unknown quantity at this point
Thanks for the shopping cart!!!!
tweetie37 is offline   Reply With Quote
Old 09-26-2003, 02:27 PM   PM User | #4
tweetie37
Regular Coder

 
Join Date: Sep 2003
Posts: 107
Thanks: 0
Thanked 0 Times in 0 Posts
tweetie37 is an unknown quantity at this point
order form

How about if I want to do this:
I have 3 or 4 flyers (or brochures) lined up and customers will click on the one they want to order and VOILA the flyer's number will show up on the line indicated! Is this possible in JS?
Or should I just put radio buttons besides each flyer and they can just select which flyer they want? Is that just a regular radio button code or is it more complicated? If it is, can someone please help me with the code................
Thanks a bunch!
tweetie37 is offline   Reply With Quote
Old 09-26-2003, 02:50 PM   PM User | #5
lavalamp
Regular Coder

 
Join Date: Aug 2003
Location: Loughborough University
Posts: 427
Thanks: 0
Thanked 0 Times in 0 Posts
lavalamp is an unknown quantity at this point
I'm going to work on an Opera friendly version, and possibly add extra fetures like including how many of each item they have selected in the text boxes when they go back to the first page.

Happy to help.
__________________
AMD Athlon "Barton" XP 3200+ (11*200.5MHz = 2.2GHz)
BFG GeForce 6800 Ultra OC 256Mb
3 * Kingston 256Mb PC3200 DDR400
Seagate Barracuda 120Gb Ultra ATA-100 and Seagate Barracuda 160Gb, SATA-150
lavalamp is offline   Reply With Quote
Old 09-26-2003, 07:07 PM   PM User | #6
lavalamp
Regular Coder

 
Join Date: Aug 2003
Location: Loughborough University
Posts: 427
Thanks: 0
Thanked 0 Times in 0 Posts
lavalamp is an unknown quantity at this point
Hows this, it stores the values in an array and displays them in a textarea for the customer to see:
Attached Files
File Type: txt ordering flyers.txt (1.1 KB, 157 views)
__________________
AMD Athlon "Barton" XP 3200+ (11*200.5MHz = 2.2GHz)
BFG GeForce 6800 Ultra OC 256Mb
3 * Kingston 256Mb PC3200 DDR400
Seagate Barracuda 120Gb Ultra ATA-100 and Seagate Barracuda 160Gb, SATA-150
lavalamp is offline   Reply With Quote
Old 09-30-2003, 02:26 PM   PM User | #7
tweetie37
Regular Coder

 
Join Date: Sep 2003
Posts: 107
Thanks: 0
Thanked 0 Times in 0 Posts
tweetie37 is an unknown quantity at this point
Thanks lavalamp:
I'll appreciate all your help. Your flyer thing might work. I am going to try it with a flyer and see. I'll let you know......
tweetie37 is offline   Reply With Quote
Old 09-30-2003, 03:37 PM   PM User | #8
tweetie37
Regular Coder

 
Join Date: Sep 2003
Posts: 107
Thanks: 0
Thanked 0 Times in 0 Posts
tweetie37 is an unknown quantity at this point
Hi lavalamp:
If you didn't get my email, here what I need help me(more help!!!) Is it possible to total the flyers right there. What I mean is for example: They buy 500 flyer for $1.00 each. Can the form calculate the total right there? Is it possible? I'll appreciate any help you can give me....
Thanks
tweetie37 is offline   Reply With Quote
Old 09-30-2003, 03:44 PM   PM User | #9
tweetie37
Regular Coder

 
Join Date: Sep 2003
Posts: 107
Thanks: 0
Thanked 0 Times in 0 Posts
tweetie37 is an unknown quantity at this point
Lavalamp:
I forgot to tell you that the customers order a large amount. Can we modify the code for a large amount instead of one at a time? They buy 500 or more at one time.
I hope I am not confusing you. This is what I originally had in mind. If it can't be done, just something they can click on and they can order 500 of flyer (say #1). Is this possible?
In other words, they can select a flyer and buy 500 of it and get a total price in the page.
Thanks
tweetie37 is offline   Reply With Quote
Old 09-30-2003, 08:39 PM   PM User | #10
lavalamp
Regular Coder

 
Join Date: Aug 2003
Location: Loughborough University
Posts: 427
Thanks: 0
Thanked 0 Times in 0 Posts
lavalamp is an unknown quantity at this point
I think I remember getting an e-mail that mentioned something about tweetie, but if I don't recognize the name I tend to just delete it, sorry. Ask me in a private message next time and then I can't ignore it.

Anyway, I went away and modified it beyond all recognition. It's become at least 100 times more complicated so if you get lost I don't blame you, I get lost in it and I wrote it.
I've used some CSS and div tags to arrange the content on the page in a suitable way, although you'll probably be more interested in the JavaScript section. If you need help wading through it, ask me and I'll be happy to figure it out for myself and then explain.
Attached Files
File Type: txt ordering flyers 2.txt (3.9 KB, 134 views)
__________________
AMD Athlon "Barton" XP 3200+ (11*200.5MHz = 2.2GHz)
BFG GeForce 6800 Ultra OC 256Mb
3 * Kingston 256Mb PC3200 DDR400
Seagate Barracuda 120Gb Ultra ATA-100 and Seagate Barracuda 160Gb, SATA-150
lavalamp is offline   Reply With Quote
Old 09-30-2003, 09:00 PM   PM User | #11
tweetie37
Regular Coder

 
Join Date: Sep 2003
Posts: 107
Thanks: 0
Thanked 0 Times in 0 Posts
tweetie37 is an unknown quantity at this point
Thanks lavalamp. I am going to read through your code and see if I can understand it and let you know.
tweetie37 is offline   Reply With Quote
Old 09-30-2003, 09:05 PM   PM User | #12
lavalamp
Regular Coder

 
Join Date: Aug 2003
Location: Loughborough University
Posts: 427
Thanks: 0
Thanked 0 Times in 0 Posts
lavalamp is an unknown quantity at this point
Just before you go off and read through that one, read trough this one instead. I forgot to include a unit of currency in that one, but in this version I have included it. To find out where, just search the source for a £ sign, (there's 2 of them).
Attached Files
File Type: txt ordering flyers 2.txt (3.9 KB, 114 views)
__________________
AMD Athlon "Barton" XP 3200+ (11*200.5MHz = 2.2GHz)
BFG GeForce 6800 Ultra OC 256Mb
3 * Kingston 256Mb PC3200 DDR400
Seagate Barracuda 120Gb Ultra ATA-100 and Seagate Barracuda 160Gb, SATA-150
lavalamp is offline   Reply With Quote
Old 09-30-2003, 09:45 PM   PM User | #13
tweetie37
Regular Coder

 
Join Date: Sep 2003
Posts: 107
Thanks: 0
Thanked 0 Times in 0 Posts
tweetie37 is an unknown quantity at this point
Thanks for the code. I'll really appreciate this. Can I ask something else? How do I add postage to this. If they want to order 1st class postage say @ $.10 and Tax. After that , how do I total everything and give the customer a final Total?
Thanks again
tweetie37 is offline   Reply With Quote
Old 09-30-2003, 10:03 PM   PM User | #14
lavalamp
Regular Coder

 
Join Date: Aug 2003
Location: Loughborough University
Posts: 427
Thanks: 0
Thanked 0 Times in 0 Posts
lavalamp is an unknown quantity at this point
It just keeps getting better:

Edit: You don't have to PM me if I'm online, I get an e-mail notification every time that a post I'm subscribed to gets a reply. Even when I'm offline I can still view the e-mails from when people replied. It's just that if the thread is a couple of days or weeks old that I need a reminder about it.

By the way, that postage seems a bit low. Did you mean £0.10 per 100 flyers or something?
Attached Files
File Type: txt ordering flyers 3.txt (4.6 KB, 124 views)
__________________
AMD Athlon "Barton" XP 3200+ (11*200.5MHz = 2.2GHz)
BFG GeForce 6800 Ultra OC 256Mb
3 * Kingston 256Mb PC3200 DDR400
Seagate Barracuda 120Gb Ultra ATA-100 and Seagate Barracuda 160Gb, SATA-150

Last edited by lavalamp; 09-30-2003 at 10:06 PM..
lavalamp is offline   Reply With Quote
Old 09-30-2003, 10:26 PM   PM User | #15
tweetie37
Regular Coder

 
Join Date: Sep 2003
Posts: 107
Thanks: 0
Thanked 0 Times in 0 Posts
tweetie37 is an unknown quantity at this point
Lavalamp:
How do I give them the option of adding the postage (1st class or standard) or even tax ? ( like a check box or something). Since I have you here, I am going on the asking rampage!!!!!!!!!!!
I am still adding other stuff to this form. Such as some gifts that they can add to their order. I want to put some image such as an umbrella (as a gift) and they can choose their gift by either clicking on the image or just check it. Do I add the sumbit button at the very end after </form>? Please do not KILL me with all these questions. I am just new to JS.
Thanks again!
tweetie37 is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

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

Forum Jump


All times are GMT +1. The time now is 04:14 PM.


Advertisement
Log in to turn off these ads.