Solved

Javascript / HTML Error?

Posted on 2015-02-17
3
68 Views
Last Modified: 2015-02-17
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
Comment
Question by:Richard Korts
3 Comments
 
LVL 82

Expert Comment

by:Dave Baldwin
ID: 40614896
0
 
LVL 44

Accepted Solution

by:
Rainer Jeschor earned 500 total points
ID: 40614985
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
 

Author Closing Comment

by:Richard Korts
ID: 40615267
I thought of just that as I was driving to the Dentist.

Thanks!
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Suggested Solutions

Use these top 10 tips to master the art of email signature design. Create an email signature design that will easily wow recipients, promote your brand and highlight your professionalism.
Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
In this tutorial viewers will learn how add a full-size background image to a webpage using CSS3. Create a new HTML document with an internal stylesheet.: In CSS, define the html element to have a background image. Use a high resolution image.: In t…
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now