You should look into a CGI script. Since you're still a small operation, the overhead incurred using CGI won't be an issue. Perl does a great job with these things, and you could almost certainly find a script you could adapt.
Of course, this all assumes you're hosting the site yourself or have a service provider willing to let you run CGI scripts. Many charge a bit extra for this "privalege"
ok first the code.
in the <head> of your page put:
var totecakes = tote * 24.95;
var carrall = tote * 7.95;
give your form a name ie:change this-
<form method="post" action="/cgi-common/mailmerge.pl">
<form method="post" name="cake" action="/cgi-common/mailmerge.pl">
then add the result bit - in your existing table wherever you want it:
<tr><td>Total amount for cakes: $<input type="text" name="tcakes" value="" size="5"></td>
<td>Total carriage: $<input type="text" name="tcarr" value="" size="5"></td>
which includes almost all surfers - even the latest version of AOL understands this script, even DIY browsers normally run on the back of IE or NS - even OPERA understands this code.
I feel that you are giving some pretty dodgy advice on this issue - for more serious coding server side or CGI is fine but for simple validation or mouseovers etc !
This may not be the answer you are loking for because it is not a php script. There are some free shopping carts on the net that will serv your purpose. Try one or two they may work for you. In any event you will get an idea of what you realy need before you start trying to write any code. Plus you are taking orders while you are wrighting and testing.
Daft or not, the point is I turn it off. Many people I know turn it off, at least part of the time. You need to weigh the risk of blocking out users vs. a quick-fix solution to your problem. If it were my money, I know what I would do.
This of course, is my opinion. Certainly the trend these days is to use JS for these things. But then, someone out there also thought that the blink tag would be a good idea... Agggghhh...
Dr_E_lectric I do not think that Longhorn was looking for a PHP answer , nor a real shopping cart at this point.
Joe - ok I was a bit harsh maybe - but....
Where do you draw the line? If you allow for users that
or worse c)use Mosaic v1 , then as suppliers of interesting content we are buggered.
Not every client will have access to PHP etc and moving them to different servers etc is not always an option.
I think that most of the surfers who visit my or any pages are using IE or NS4+ untouched apart from turning off cookies because a friend told them that 'cookies can eat up your hard drive'(I have heard this one twice!) ,Although AOL does not quite have the hold here in Oz as it does elsewhere. So I will stick with my theory and hope I am right!.
Shutting up .......now.
Forgot to mention
'But then, someone out there also thought that the blink tag would be a good idea... Agggghhh...'
can not argue with that one!.
Choosing a "baseline browser" for your site is important, and rather than talking in general terms about what you feel users are using, it's better to be scientific and find out!
http://websnapshot.mycomputer.com/browsers.html is one site that tracks what people are actually using, and at the moment it appears that only a tiny fraction of users have non-JS compatible browsers.
For this particular application JS is probably the most appropriate, though if the server supports it, a CGI script could be used to accomplish the same thing for those users that don't have JS.
Who *are* these 0.7% using IE2? Masochists?
On a more unscientific note, the idea that any significant number of users turn off JS in their browsers seems to me to be unlikely. This may be the case for a few techies, but I would imagine most users would be unaware what JS is, let alone that it is something that could be turned off.
These are good points. It's not my intention to keep new technology out of the picture, just to try to ensure some stability out there.
Dunno - I guess working for the phone company squelches any desires one might have to use 'cutting edge' (read: less than 10-year-old ) technology.
I'll quit wailing now...
errrrrr - your gonna love this, after all that - I forgot to include the call to the script in the code I posted!! - yes I have punished myself severely.
I forgot to add - onchange="addit()" to the 'how many cakes' input.
Off to hide in the corner....
June 19th, 2000, 02:52 PM
Can you give us the references?
<BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">quote:</font><HR>Originally posted by Dr_E_lectric:
This may not be the answer you are loking for because it is not a php script. There are some free shopping carts on the net that will serv your purpose. Try one or two they may work for you. In any event you will get an idea of what you realy need before you start trying to write any code. Plus you are taking orders while you are wrighting and testing. [/quote]
June 29th, 2000, 09:16 AM