Jump to content
Sign in to follow this  

Script will not execute when called...

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




Share this post

Link to post
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.

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Create New...