Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 105
  • Last Modified:

Javascript / HTML Error?

See attached.

Note the values of error and resp_code.

Note the alter on line 20.

The alert shows http://www.rain1.com/new-site/review-and-pay/ as the value, not what it was set to on line 13.

Why?
test.html
0
Richard Korts
Asked:
Richard Korts
1 Solution
 
Dave BaldwinFixer of ProblemsCommented:
0
 
Rainer JeschorCommented:
Hi,
because in the moment the script is run, the form does not yet exist, hence you get an "Undefined" error (e.g. just Chrome and the Developer extensions) when the following line is run:
document.st.captchae.value = "N";

Open in new window

So when you run this kind of script within the header, the DOM (where also the form is part of) is not yet loaded / available.
HTH
Rainer
0
 
Richard KortsAuthor Commented:
I thought of just that as I was driving to the Dentist.

Thanks!
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now