Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Javascript & SSL

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hi
Wondering if anyone can help! I am running a javascript shopping cart and want to make the checkout page secure. However on the checkout page I need to call the javascript so as to show the order the customer has made. This works fine without using SSL but when running the page through a SSL the code calling the script dosen't seem to work and the order info dosen't get drawn onto the page. As this is the page that is submitted to the shopkeeper as thr final order it is imperative that the order info is captured on this page.
Any answers? Hope this is written clearly!
 
Hi Wullie, thanks for the reply
The Javascript lies in the root directory along with the pages. It isn't on the secure server. I don't get a message about non-secure items the page basically gets compiled without the order info when passing through the SSL whereas when running without passing through the SSL the order info is fine.
In case i'm not making this clear, I have 3 pages.
1) Product page with 'add to cart' button.
2) Cart page which compiles the order and allows you to remove items.
3) The checkout which has the order info again plus a form for name,address,card No etc.
It's page 3 that is linked from page 2 through the SSL but will not display the order info that is on page 2 even though the page 3 calls the script.

hope you can help!

Russ
 
Having the script etc on the secure server I think is probably my way forward although I only have a URL which points pages to a SSL. I will need to get in touch with my server admin I think and gain access to the secure server or choose another way to implement the cart.
Thanks very much for your help! I may be back!

Russ Clarke
 
you will have problems if you have absolute path defined in an SSL page as some browser in certain settings will not download elements which are not themselves being encrypted.

<script src=&quot;
will cause an error on a site with URL starting with https://

Instead use relative path :

<script src=&quot;/myJs.js&quot;></script>

Hope this is your problem and not something more complicated. Gary Haran
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top