Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 7 of 7
  1. #1
    New Coder
    Join Date
    Jul 2004
    Posts
    23
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Exclamation URGENT HELP NEEDED with shopping cart web page

    Hi Everyone

    My friend asked me to post this question. (It is attached at the bottom)

    He does not have internet (Kinda weird) and so he asked me to help him with this question.

    He asked me to post his question and said any code or help with the question will help him. I don't think he has started with this question.

    Any help will be VERY MUCH APPRECIATED!!!

    Hoping to here from someone?
    Attached Thumbnails Attached Thumbnails URGENT HELP NEEDED with shopping cart web page-question6.jpg  

  • #2
    Kor
    Kor is offline
    Red Devil Mod Kor's Avatar
    Join Date
    Apr 2003
    Location
    Bucharest, ROMANIA
    Posts
    8,478
    Thanks
    58
    Thanked 379 Times in 375 Posts

    Cool He

    It looks like your friend wants to do that for a customer or for a job apply. If so, he should not expect us to to his entire job, should he?

    There lays a sort of task he must achieve. But we see nothing of his work. We could help him solve a local code problem, give him a clue, check for errors. But we are not to work in his place, no Sir!
    KOR
    Offshore programming
    -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

  • #3
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,033
    Thanks
    0
    Thanked 249 Times in 245 Posts
    It looks like an assignment. Posting assignments is not allowed here.

    MUST READ- How to post a JavaScript question!

  • #4
    Regular Coder
    Join Date
    Jul 2002
    Posts
    698
    Thanks
    0
    Thanked 0 Times in 0 Posts
    looks like a school assignment from one bored teacher to me.

  • #5
    New Coder
    Join Date
    Jul 2004
    Posts
    23
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Smile

    I will tell him to work on his code. And when he gets stuck then he must bring me the code that he does not understand then I will post it and you guys can have a look at it.

    Thanx for your trouble

    Cheers

  • #6
    New Coder
    Join Date
    Jul 2004
    Posts
    23
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Arrow

    My friend gets the error message "object expected" when he clicks on the add to shopping cart link.

    What is he doing wrong

    Please Help???


    Here is the code for the order page:

    Code:

    <html>
    <head>
    <title>Easy Credit Online Shopping</title>
    <SCRIPT LANGUAGE = Javascript>

    </SCRIPT>

    </head>

    <body bgcolor="#FFFFFF" text="#000000">
    <div align="center">
    <p><font size="5"><b>Welcome to the Easy Credit Online Shopping Site</b></font>
    </p>
    <p>&nbsp;</p>
    </div>
    <hr>
    <p align="center">Press 'V' to view your Shopping cart or click <a href="cart.htm">here</a></p>
    <table width="70%" border="1" align = "center">
    <tr>
    <td width="24%" height="37">T-Shirt</td>
    <td width="66%" height="37" align="left" valign="middle">
    <p align="left">Lime Green T-Shirt with Orange Easy Credit Logo - Small</p>
    <p ><a href="javascriptlace('T-Shirt - Small')" align="left">Add to Shopping Cart</a></p>
    </td>
    <td width="10%" height="37">R29.50</td>
    </tr>
    <tr>
    <td width="24%" height="37">T-Shirt</td>
    <td width="66%" height="37" align="left" valign="middle">
    <p align="left">Lime Green T-Shirt with Orange Easy Credit Logo -Medium</p>
    <p ><a href="javascriptlace('T-Shirt - Medium')"align="left">Add to Shopping Cart</a></p>
    </td>
    <td width="10%" height="37">R34.50</td>
    </tr>
    <tr>
    <td width="24%" height="37">T-Shirt</td>
    <td width="66%" align="left" valign="middle">
    <p align="left">Lime Green T-Shirt with Orange Easy Credit Logo - Large</p>
    <p ><a href="javascriptlace('T-Shirt - Large')"align="left">Add to Shopping Cart</a></p>
    </td>
    <td width="10%">R39.50</td>
    </tr>
    <tr>
    <td width="24%" height="37">Capp</td>
    <td width="66%" align="left" valign="middle">
    <p align="left">Adjustable Lime Green Cap with Orange Easy Credit Logo</p>
    <p ><a href="javascriptlace('Lime Green Cap')"align="left">Add to Shopping Cart</a></p>
    </td>
    <td width="10%">R18.75</td>
    </tr>
    <tr>
    <td width="24%" height="37">Capp</td>
    <td width="66%" align="left" valign="middle">
    <p align="left">Adjustable Orange Cap with Lime Green Cap Easy Credit Logo</p>
    <p ><a href="javascriptlace('Orange Cap')"align="left">Add to Shopping Cart</a></p>
    </td>
    <td width="10%">R18.75</td>
    </tr>
    <tr>
    <td width="24%" height="37">Easy Credit Teddy Bear</td>
    <td width="66%" align="left" valign="middle">
    <p align="left">25cm Tall Lime Green Teddy Bear with Orange T-shirt</p>
    <p ><a href="javascriptlace('Teddy Bear')"align="left">Add to Shopping Cart</a></p>
    </td>
    <td width="10%">R66.50</td>
    </tr>
    </table>
    <p align="center">E-mail us for more information: <a href="mailto:easycredit@hotmail.com">easycredit@hotmail.com</a></p>
    </body>
    </html>

    Here is the code for the viewing of the shopping cart page:

    Code:

    <html>
    <head>
    <title>Easy Credit Online Shopping</title>
    <SCRIPT LANGUAGE = Javascript>

    var items_string = "";

    function place(new_item)
    {
    items_string = items_string + "xxx" + new_item;
    document.cookie = "items=" + escape(items_string);
    }

    "items=xxxT-Shirt - Small;xxxT-Shirt - Medium;xxxT-Shirt - Large;xxxLime Green Cap;xxxOrange Cap;xxxTeddy Bear;"
    whole_items_cookie = "items=xxxT-Shirt - SmallxxxT-Shirt - MediumxxxT-Shirt - LargexxxLime Green CapxxxOrange CapxxxTeddy Bear";

    if (whole_items_cookie !="")
    {
    items_array = whole_items_cookie.split("xxx");
    items_array[0] = "items=";
    items_array[1] = "T-Shirt - Small";
    items_array[2] = "T-Shirt - Medium";
    items_array[3] = "T-Shirt - Large";
    items_array[4] = "Lime Green Cap";
    items_array[5] = "Orange Cap";
    items_array[6] = "Teddy Bear";

    }

    </script>


    </head>

    <body bgcolor="#FFFFFF" text="#000000">

    <SCRIPT LANGUAGE = Javascript>

    if(items_array != "")
    {
    for (i=1; i < items_array.length; i++)
    {
    document.write("<h3>" + items_array[i] + "</h3>");
    }
    }
    </script>

    </body>

    </html>
    Last edited by HiEverybody; 07-12-2004 at 03:21 PM.

  • #7
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,033
    Thanks
    0
    Thanked 249 Times in 245 Posts
    He's calling the place() function that's located in another page? You can't do that if the page that has the place() function is not also loaded. You can call a function from another page if that page is in another frame, iframe or new window. In other words, both pages must be loaded.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •