These are notes about what's going right and wrong on this site:

<% JavaScript %> and <script language=JavaScript> are NOT the same and canNOT be mixed. They can how ever work side by side. Beware that the syntax is slightly different and when using ASP additional tools are available that are not offered by JavaScript alone.

Using "LocalHost" receives the need to type in the computer local address.

I am now having trouble with the cookies as they are writing ASPSESSIONID number to my cookies and they don't work properly. This started after I used Ed's dynamically driven catalogue page and also after used "LocalHost" to view page.

TODO list:

  • Search feature
  • CART
  • CHECKOUT
  • CONFIRM
  • SECURE TRANSACTION
  • PERSONAL ASSISTANT
  • Header as <incluedes>
  • Dynamically driven colors and sizes
  • Kill cart
  • encrypted transaction
  • Check OUT + math
  • CASH OUT
  • CONFIRM order
  • GUESTBOOK (10x entries)
  • Personal Assistant
  • shoeDesigner/shoeType/shoeColor/shoeSize/priceRange/Keyword/ Search +Advanced Search


Index.htm (view this page)

The front door, splash page just plain old HTML and links to all pages on the site. There is a button to allow user to log in and a hidden field counts the number of visits


Index1.htm (view this page)

This page check for JavaScripts by using JavaScript ReDirection method.

If Java fails the page doesn't refresh and the viewer gets a message telling them they will need to enable JavaScripts.(view index11.htm)

index11.htm is a none forwarding page to show this example


Index2.cgi (view this page)

This page has dynamic content. It checks for a cookie, and if none. Prompts them for their name.
The cookie keeps theirs name and number of visits.

There is a unique one time message after log then:

On return to this page the user gets a new center picture with a corresponding link, and a new message with a new link depending on the visitCounter. Images that are used have an ANCHOR that is used to find the place on the corresponding page. The ANCHOR are the same as the fileName field in DB.

Therefore, not only do the IMAGES change but the corresponding LINKS and ANCHOR TAGS REFERENCE, while the ANCHOR TAGS them self are dynamic. PRODUCTS, LINKS and ANCHOR exist MANY TIMES (on several pages) because they appear ONCE in a text file

IN DESIGN TIME:
The
I am Not logic is a simple test. Because the sessionid can corrupte the cookie espically in development, "I am not" allow the cookie to be deleted and you start over. But the test is automate, on entry to the index2.htm the function tests for field[0]. If field[0] in not userName, then the whole cookie is invalad and thrown away as though it had been deleted by expiration date. Also it is a useful flag in development. If the first two fields are corrupt the page displays " I AM NOT 831723088395712351". Development should stop until the cookie refired.


Home.htm (view this page)

Home contains mostly html.
The Heading is a table and the content is a table underneath that.

The heading is actually a template for following pages but each page contains unique pictures to stylize somewhat.

There is an Image Map Navigation and redundant text links.

The heading (which repeats on every page) has a script that :

Tests for the presence of a cookie.
Reads the cookie and displays the users name.
Has a KillCookie as "I am not" + usersName
A dynamic link that reads the file name
A link to About This Page
And a Dynamic Search Button

The read your name and "I am not" functions are a more attractive way to signal that the cookie is working correctly durning design time. If this function dissapears while working on the cookie. simply go back to the first signin page and reform the cookie.
I have found that sometimes when the cookie and session ID are messed up, the page reload (F5 , Reload + shift, and the reload button) may not reflect change made in note pad or other edits.I


Catalogue.cgi (view this page)

There is an Image Map Navigation and redundant text links.

The heading has a script that :

Tests for the presence of a cookie.
Reads the cookie and displays the users name.
Has a KillCookie as "I am not" + usersName
A dynamic link that reads the file name
A link to About This Page
And a Dynamic Search Button

The table of selection is created dynamically from a text file.

It creates the links dynamically from the shoeName and Dynamically crates and ADD TO CART page that uses the shoeName to read the text file and build it's self. The page dynamically searches for all items that are not "NEW" or "SPECIALS".

the drop down box that allows selection of colors and sizes are dynamically driven from the data base.

When added to cart the cookie is tested for duplication and then appended.

tmp.cgi is a hidden page that shows the constrruction of the tables and field locations.s



New Arrivals.cgi (view this page)

There is an Image Map Navigation and redundant text links.

The heading has a script that :

Tests for the presence of a cookie.
Reads the cookie and displays the users name.

Has a KillCookie as "I am not" + usersName
A dynamic link that reads the file name
A link to About This Page
And a Dynamic Search Button

The table of selection is created dynamically from a text file.

It creates the links dynamically from the shoeName and Dynamically crates and ADD TO CART page that uses the shoeName to read the text file and build it's self. The page dynamically searches for all items that are "NEW" .

When added to cart the cookie is tested for duplication and then appended.



Specials.cgi (view this page)

There is an Image Map Navigation and redundant text links.

The heading has a script that :

Tests for the presence of a cookie.
Reads the cookie and displays the users name.
Has a KillCookie as "I am not" + usersName
A dynamic link that reads the file name
A link to About This Page
And a Dynamic Search Button

The table of selection is created dynamically from a text file.

It creates the links dynamically from the shoeName and Dynamically creates and ADD TO CART page that uses the shoeName to read the text file and build it's self. The page dynamically searches for all items that are "SPECIALS".

When added to cart the cookie is tested for duplication and then appended.



Add to Cart.htm (view this page)

When an item is selected 3 parameters are sent to AddToCart:

  • fileName
  • productName
  • DBfileName

The page uses the paramaters to build it's self getting information:

  • productName
  • price
  • colors
  • sizes
  • fileName
  • shortDiscritpion + extendedDiscription
  • shoeBigPic
  • shoeDesigner
  • Validation is done for shoe color and size selection,
    the cookie is checked for duplication
    if not a duplication append to cookie shoeName|shoeColor|shoeSize|BDname

    When your are at the catalog page, if you click on the IAMGE you are sent to an "addToCart.cgi" that allows you to see the development of the cookie before and after and during append cookie. And see all the parts get parsed and reassembled.

    There is a dynamically driven BACK button, that use the fileName rather that Javascript:History.Back In development the history back button often brought the user to the same page, and required the same amount of click as items order. This bug was removed by getting the shoeFile name and using it to create a dynamic anchor refferance and by using the saleName or catalgue name to create the HREF, this gave very predicable results.

    Because the are a lot of ASP dynamic refferances, the function call must appear on the addTpoCart.cgi page. In development the function was about 100 lines and final was compress to 26.

    There is alot of valadation in the ADD to CART:

        1. Is color picked - exit function.
        2. Is Size picked - exit function.
        3. Read the cookie
        4. Parse all bites of the cookie
        5. Get the New Selected Item Paramaters and construct as a string.
        6. Create an appended cookie
        7. Parse the preselected items and compare for duplication of New Selection
        8. If double is found exit function after alerting shopper to duplication.
        9. If end of file marker ("empty") exit compare and alert used of seccessful append.
        10. Write new cookin

    In design time the Hello userName - I am not userName function became indespencable in identifying when the cookie became corrupted and need to be refreshed/rebuildt.A corruptred cookie will prevent the developer from see changes made and while they might believe it is bad code preventing the code from working it might just as well be a good code reading fouled up cookie data.


     

    Cart.cgi (view this page)

    Opens in a new window with no status,links, address,standard and location bars.

    There is an Image Map Navigation and redundant text links.

    The heading has a script that :

    Tests for the presence of a cookie.
    Reads the cookie and displays the users name.
    Has a KillCookie as "I am not" + usersName
    A dynamic link that reads the file name
    A link to About This Page
    And a Dynamic Search Button.

    The cart reads the cookie and ...

    On other pages "killCookie" eliminates only the users name.

    On the cart page "killCart" empties the cart and preserves the users name and visits

     

    Then there is an encrypted credit card transaction

    Cookies and data are written to the server

    the server send a note to the billing and shipping departments, removes item(s) from inventory / reorder stock as necessary / and send a confirmation letter and a follow up message.


     

    Check Out.cgi (view this page)



    Cash Out.cgi
    (view this page)



    Confirm Order.cgi
    (view this page)


    Comments.cgi (view this page)

    There is an Image Map Navigation and redundant text links.

    The heading has a script that :

    Tests for the presence of a cookie.
    Reads the cookie and displays the users name.
    Has a KillCookie as "I am not" + usersName
    A dynamic link that reads the file name
    A link to About This Page

    Comment Page is a self acting dynamic page that becomes one of 3 types of pages
    View Comments
    Write Comments or
    Thank you for your comment.

    The most recent entry is shown at the TOP of the page.

    The Guest book counts 10 entries and makes a new Text File and creates the links to the archives,


    About Us.htm (view this page)

    About Us is an informational HTML page

    There is an Image Map Navigation and redundant text links.

    The heading has a script that :

    Tests for the presence of a cookie.
    Reads the cookie and displays the users name.
    Has a KillCookie as "I am not" + usersName
    A dynamic link that reads the file name
    A link to About This Page
    And a Dynamic Search Button

     


    Personal Assistant.htm (view this page)

    There is an Image Map Navigation and redundant text links.

    The heading has a script that :

    Tests for the presence of a cookie.
    Reads the cookie and displays the users name.
    Has a KillCookie as "I am not" + usersName
    A dynamic link that reads the file name
    A link to About This Page
    And a Dynamic Search Button

    This page is a basic form with field validation,
    and a mailto: script that is not dependent on POP3 softwares.

    Personal Assistant writes the user informational to a database and recalls the user parameter for e-mailing updating purposes

    There is a JavaScript "Print It Button" to make the online form into a postal order form for those who are not comfortable with online purchases.


    shoeDesigner/shoeType/ Search
    shoeDesigner/shoeType/ Search
      (view this page)       (view this page)

    shoeDesigner/shoeType/shoeColor/shoeSize/shoePrice/saleType/ - dropLists
    Advanced Search and Keys Words Search.



    Secure Transaction



    Java.js (view this page)

    This file acts like the engine or "kernal" of the web site. By using function calls many pages can be repaired and updated by making changes in one place. And the code needs to be written only once. And also separates the JavaScripts from the HTML and allows easier development .

    Active Server Pages

    Using an include tag <% =JavaScripts %>, scripts are excuted on THE SERVER SIDE, this protects the site in several ways.

      The code/scripts are excuted on the server and the client never sees, them this makes the page faster as lines of code don't need to be sent over the "net".

      The code are not viewed by the client, folder locations, encryption "methods" and the codes themselves are not given to the client and dosn't reveal certain "paths", "methods" and scripts. Making it more difficult for some hackers and crackers.

      The server side scripts can be DYNAMIC and One HTML web page can be used in Many instances of information. In this case One Add to cart Web Page displayes the information and writes the cookies for ALL the shoes selections on the site.

      When baking cookie it is more fluid an operation to have all the cookie writting pages in the same directory. Cookies made in subdirectorys are appended to the parent folder cookies. And cookies in different folder that are not parent/child relations are seperate unique cookies.



    SiteMap/About this site

    This "About" page is an explanation of the pages and is a "Site Map" because it reaveals all the the links on the site. In the Case of "addToCart.cgi" this page can only be reached after visiting a catalgue page. In usual and ideal conditions ALL pages should be no more than 3 clicks away from the home page. Still in some instances it can be difficult to remember the two intermediate pages. A site map allow a can to try to find the page. However when the site reaches 100s of pages, it will be necissary to create an interal seach engine for the site.



    FileNames Protocols

    The naming convention is:

    • All thumbnail (small) images are shoeName + ".gif".
    • All full sized images are shoeName + ".jpg".
    • textfiles are shoeName + ".txt".
    • Sale types are New / Sale / Cat (regular CATalogue)
    • achor tags are <A name="shoeName">
    • records start with shoeName
    • cookie is addToCart=shoeName:shoeSize:ShoeColor:saleType|;
    • cookie is userName=userName/visitCount/addToCart/empty;
    • cookie is ASPSESSIONID##=##;
    • cookie is expires=DATE()
    • DB is shoeName/price/designer/fileName/shoeType/sizes/colors/shortDiscription/extendDiscription




    Search function
    Built from include files
    Header

    Open Catalogue.txt
    find matchs / print
    Close Catalogue

    Catalogue loop

    Open New.txt
    find matchs / print
    Close New

    New Loop
    Open Specials.txt
    find matchs / print
    Close Specials
    Specials Loop
    Footer



    Header <!-- Includes -->
    Includes file 1
    Header

    Page Specific

    Header Images

    Includes file 2

    End Header
    Page Specific
    Body + Footer

     

    java.js functions:

    printName
    printJustName
    reDirect
    scrollIntro
    scrollPic
    printit
    printButton
    addToCart
    viewCart
    appendCookie
    findCookie
    setCookie
    readCookie
    killCookie
    toMoney
    searchShoeType
    searchShoeDesigner


    ASP
    CGI

    Windows
    VBScript
    JavaScript



    Unix
    Perl




    JSP
    ColdFusion
    PHP
    ChiliSoft

     

    Objects
    Request
    Response
    Server
    Session

    ASP ??

    JAVA Objects

    FileSystem
    ADODB
    CDONTS
    ODBC
    MS Script Objects

    Date
    Math

    JS Objects

    eewdgtco.cgi

    1)      Write HTML from file.txt

    2)      Arrays

    3)      Function toMoney

    4)      While loop

    5)      Put Name in Comments Line

    6)      Add 1 Item

    ·          Change discount amount

    7)      Add to cart Button / View Cart Button

    8)      Format the page HTML / bg colors font

     

    wdgtbuy.cgi

    1)      Writes cookies

    2)      Shows Cookies

    ·          dieDate

    ·          function cookIt

    ·          function killCookie     

    ·          if cookie =”” , or undefined

    3)      Cut Cookies

    ·          Separate forms to on cookieBaker

    4)      ToMoney

    5)      Use Hidden inputs

    6)      Send form to me

    ·          Add shipping and handling / perhaps form a file.txt

    ·          Add Sales tax

    ·          Flat fee for shipping

    ·          RUSH Service Fee

    ·          Weight to each product for shipping

     

     

    wdgtcook.cgi

    1)      Form – While Loop – Quantity – Multiply – add – shipping – tax – total

    ·          Remove Dups

    ·          Empty Cart

    ·          Place order button (check out)

    ·          Thanks for order

    ·          Sees if there are no selections condition

    2)      Breaks cookie

     

     

    guestbook.cgi

    1)      open as Guest Add to Guestbook / View Guestbook / thank you for your entry

    2)      Is one page that looks like 3

    3)      ActiveX Object

    4)      Server Variables

    5)      Change Path name

    6)      Open Close, Read ,Write, Append Close, Exsistes  txtx File

    7)      Add Phone and Address to Comments

    ·          Make a file.txt to store NumberOfVisits

    ·          NumberOfVisits seeds Random Number Generator

    ·          Append gbook.txt to hold all but comments

    ·          Comments lines are stored as var PhoneNumber.Txt   PhoneNumber= Visitors Phone #

    ·          Revise ShowComments to give all comments by visitor / or Just one visitors comments

    ·          How is this important in shopping carts?

    Encrypt 1#            Clients send key 1# to server , server gives key #2

                            Cc part1 + 1#     Cc part2 – 1#  Cc part3 +1#  2#