Jump to content

Help with php and Javascript


jbwebdesign

Recommended Posts

Hello, I have a problem with my php script. I'm pretty sure its a javascript error and I don't know much javascript so i don't have any clue what needs to be done.

 

You see i had the script created a while back and I just decided to add some form validation to it but I think i messed something up in the process of doing this.

 

When i run the script through mozilla error console it says that I have the following error on Line 1: document.forms.paypal_form is undefined

 

here is the main script followed by the included php file that i am using:

Link to comment
Share on other sites

Somewhere in your Javascript files ( probably ac_activex.js as it's the only javascript file in your page ) you have a line that says:

 document.forms.paypal_form 

 

This is NOT a standard way of calling forms by name. Internet explorer may understand this javascript, but Firefox doesn't because it complies to standards, unlike some other browsers I mentioned before it ;)

 

So all you need to do to get rid of this error is change the line to:

 

 document.forms['paypal_form'] 

 

Which is the standard way of calling forms by name.

 

BUT there is no

html element in your HTML code, So it would be safer to remove it. Edited by BeeDev
Link to comment
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.
Note: Your post will require moderator approval before it will be visible.

Guest
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.

Loading...
×
×
  • Create New...