Solved

Javascript / HTML Error?

Posted on 2015-02-17
3
82 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 83

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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
This article discusses how to implement server side field validation and display customized error messages to the client.
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

751 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