Cart for Multiple Merchants
When I demonstrated the small business version of the shopping cart to a firm in Seattle, they asked whether it would be possible to place multiple merchants, all hosted on the same site, onto one frame, so that all purchases could be updated at any time in the browsing experience, and finalized simultaneously. You can see the result at http://209.87.142.42/is2.
To handle multiple merchants, I rewrote class ShopPanel as follows:
Click here for the third .java code example
The boilerplate code for each HTML page was altered in the following way:
<APPLET code=app.class height=1 id=app name=app width=1 archive="app.zip" VIEWASTEXT>
<param name=start value="25">
<param name=length value="3">
</APPLET>
<SCRIPT LANGUAGE=javascript>function buy(a,b,c,d){document.app.prod(a,b,c,d)}</SCRIPT>
The <APPLET> tag of course would also need an appropriate CODEBASE="whatever" addition, as described previously, and demonstrated in the source code at http://209.87.142.42/is1.
The big change in ShopPanel was the addition of two applet parameters and their associated code, and the removal of the optional database. This resulted in code that was now only 13K in length.
NEXT ->
New on the Java Boutique:
New Review:
Time Management Made Easy with the Quartz Enterprise Job Scheduler
Why not just use the Java timer API? This open source scheduling
API boasts simplicity, ease-of-integration, a well-rounded feature
set, and it's free!
New Applet:
Reverse Complement
Reverse Complement is a simple applet that converts DNA or RNA
sequences into three useful formats.
Elsewhere on internet.com:
WebDeveloper Java
Lots of Java information on webdeveloper.com
WDVL Java
Thorough Java resource at the Web Developer's Virtual Library.
ScriptSearch Java
Hundreds of free Java code files to download.
jGuru: Your View of the Java Universe
Customizable portal with online training, FAQs, regular news updates, and tutorials.
|