Jump to content

Script will not execute when called...


Aeolus

Recommended Posts

Maybe I'm a total noob, and if so then so be it, but I cannot figure out why the\is script won't run when called.

It can be found here http://aeoliankitesurfing.com/sp3.html and what I'm trying to do is apply a discount coupon to a paypal button.

What should happen is: 

- Enter coupon code "Aeolian" into box

Enter Coupon code [coup1] >
<input type = "text"
size = "10"
name = "coupcode"; />

- Click"Check It" Button which calls ChkCoup() to check if it's valid - Notification Pops Up

<input type="button" value="Check It"
onclick="coupval = this.form.coupcode.value;
ChkCoup();" />
 

-Coupon is applied and the Paypal Site opens

What actually happens - You Click "Check It" and nothing happens...

I places an alert at the beginning of the ChkCoup() script and this does not pop up. I think the script is never called.

Can someone please take a look and see what I missed? Why won't the script run?!

 

Eternally Grateful

Aeolus of Aeolia

-Ruler of the Aeolians and Master of the Wind

 

 

 

Link to comment
Share on other sites

You should check the Javascript console by pressing F12 in your browser. It has an error message "this.form is null". The reason for that is that these inputs are not between <form> tags.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...