Professional Web Applications Themes

Newbie question: Is Javascript compatible with PHP? - PHP Development

Hi, I would like to build a basic e-commerce site with PHP and MySQL (i'm waiting on a shipment from amazon to get started....). I would, however, like to use some Javascript within the shopping cart pages (like to automatically calculate the price of an item based on how many the customer orders, the size, even the color, etc...). Can I mix & match Javascript with PHP? Thanks in advance! Ron...

  1. #1

    Default Newbie question: Is Javascript compatible with PHP?

    Hi,

    I would like to build a basic e-commerce site with PHP and MySQL (i'm
    waiting on a shipment from amazon to get started....). I would, however,
    like to use some Javascript within the shopping cart pages (like to
    automatically calculate the price of an item based on how many the customer
    orders, the size, even the color, etc...). Can I mix & match Javascript
    with PHP?

    Thanks in advance!
    Ron


    Me Guest

  2. #2

    Default Re: Newbie question: Is Javascript compatible with PHP?

    > I would like to build a basic e-commerce site with PHP and MySQL (i'm
    > waiting on a shipment from amazon to get started....). I would, however,
    > like to use some Javascript within the shopping cart pages (like to
    > automatically calculate the price of an item based on how many the customer
    > orders, the size, even the color, etc...). Can I mix & match Javascript
    > with PHP?
    I see no problem in that.
    You're aware of one is running on the server and the other on the
    client's side (ie in the browser)?
    You can f.ex. use PHP to initialise variables in Javascript on the
    server-side.
    Pay attention that any essential thing is running even without
    JavaScript (so f.ex. to see the total prices only after a reload for
    those having it disabled).

    I would implement the shopping cart with a Session with php but I once
    realised such a thing by misusing the window.name-Property in Javascript
    with a manual (de)serialzing.

    As far as I know they do not share the same cookies.

    success!
    david
    David Geissler Guest

Similar Threads

  1. Newbie help on Javascript required
    By taupirho in forum Adobe Acrobat SDK
    Replies: 0
    Last Post: October 6th, 03:38 PM
  2. newbie javascript help
    By cpanon in forum Macromedia Dynamic HTML
    Replies: 1
    Last Post: October 17th, 09:23 AM
  3. Newbie Javascript issue
    By Winston2 in forum Coldfusion - Getting Started
    Replies: 3
    Last Post: May 17th, 10:57 PM
  4. Newbie Question: Flash and JavaScript
    By jmarkmorale webforumsuser@macromedia.com in forum Macromedia Flash Sitedesign
    Replies: 1
    Last Post: September 20th, 03:32 AM
  5. Javascript Newbie
    By splendorx webforumsuser@macromedia.com in forum Macromedia Dreamweaver
    Replies: 1
    Last Post: July 16th, 06:09 PM

Bookmarks

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139