Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 03-13-2013, 01:39 AM   PM User | #1
nickmattiacci
New to the CF scene

 
Join Date: Mar 2013
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
nickmattiacci is an unknown quantity at this point
Programming Help

Hi I am new to programming and looking for some help. I want to create a program to automatically choose a size and add a pair of shoes to the cart on nike.com. I am willing to do it myself; I just need to know if I would use Java or what type of program I need to learn how to learn.
nickmattiacci is offline   Reply With Quote
Old 03-13-2013, 02:06 AM   PM User | #2
Old Pedant
Supreme Master coder!

 
Old Pedant's Avatar
 
Join Date: Feb 2009
Posts: 23,248
Thanks: 59
Thanked 3,999 Times in 3,968 Posts
Old Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to all
First of all, if you want to use Java, you are in the wrong forum. This is the JavaSCRIPT forum. About the only thing Java and JavaScript have in common are the first 4 letters of their names.

Assuming you meant JavaScript:

You probably can't do it.

You can't use JavaScript from your own pages/site to affect *ANYTHING* on some other site.

What you *MIGHT* be able to do is to clone the <form> on the Nike site to your own site, making sure that the action= of the <form> still points to the Nike site. Then you could use your own JS code on your own site to fill in the <form> and submit it to the Nike site. More than likely, that won't work. And that's because, of course, to Nike you look like somebody trying to hack their site and submit bogus orders. So, like most modern sites, they will have all sorts of code in place to detect attempts to do this very thing. Just for example, and the most obvious thing to check and the easiest for even a beginner in server-side programming to implement: Whan any <form> is submitted (or any page is linked to another, for that matter), the receiving site can check something called the HTTP_REFERER, which tells it what site *AND PAGE* the <form> or other link came from. And if the REFERER is not what the site is expecting, it rejects the attempt.

Now, HTTP_REFERER isn't too terribly hard to spoof. Though you won't do it with just JavaScript code. You would need some server-side knowledge to do that, albeit not too much. But that's just the very first line of defense that a *GOOD* eCommerce site will erect against people like you who want to hack them.

SO... If you are truly a newbie, I'd say you are very very unlikely to succeed at this. And if you aren't a newbie, your changes of success are still pretty darned small.
__________________
An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.
Old Pedant is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 12:46 AM.


Advertisement
Log in to turn off these ads.