Solved

Javascript / HTML problem

Posted on 2014-02-07
12
234 Views
Last Modified: 2014-02-13
Hello,

See attached. This is a RADICALLY cut down version of the real page.

You can view it at rkassoc.org/FWLSCO/test_scrh.htm.

Try entering a value (anything) into the text field & click Go.

In FireFox, I get the attached error message. In IE, I get nothing. Chrome won't even open the page. Crazy!

Note that the form has onSubmit=return chk_vals().

Note the VERY first thing in chk_vals is an alert, which never displays.

I'm almost SURE there is something wrong with the Javascript, but I can't see it.

Can someone help?

Thanks
test-scrh.htm
ffmsg.jpg
0
Comment
Question by:Richard Korts
  • 7
  • 5
12 Comments
 

Author Comment

by:Richard Korts
ID: 39842730
I realized AFTER I posted the source that the Javascript variable was not defined; I added that in.

Thanks
0
 
LVL 38

Expert Comment

by:Tom Beck
ID: 39842757
The problem seems to be with the php file called on submit, custs_wo2.php.

When called directly, Chrome spits out this:

The webpage at http://rkassoc.org/FWLSCO/installation/installation/installation/installation/installation/installation/installation/installation/installation/installation/installation/installation/installation/installation/installation/installation/installation/installation/installation/installation/installation/index.php has resulted in too many redirects. Clearing your cookies for this site or allowing third-party cookies may fix the problem. If not, it is possibly a server configuration issue and not a problem with your computer.
Learn more about this problem.
Error code: ERR_TOO_MANY_REDIRECTS
0
 
LVL 38

Accepted Solution

by:
Tom Beck earned 500 total points
ID: 39842775
Also, your onSubmit call seems to have an errant single quote:

onSubmit="return chk_vals()'"
0
 

Author Comment

by:Richard Korts
ID: 39842863
To Tommyboy,

I fixed the extra ', no change.

So I ripped out ALL the Javascript except the function chk_vals. It works perfectly.

That tells me there is some issue with the OTHER Javascript I took out, meaning starting with chk_vals_cd().

rkorts
0
 

Author Comment

by:Richard Korts
ID: 39842873
I gradually (one at a time) put back the other Javascript functions, testing each time until they were all back. That one (attached) works, but the original STILL fails. Both files have the SAME number of lines.

There must be some difference I cannot see.
test-scrh1.htm
0
 
LVL 38

Expert Comment

by:Tom Beck
ID: 39842937
original STILL fails.

Have you posted the original or are you referring to the one at this link?
http://rkassoc.org/FWLSCO/test_scrh.htm

The one at the link seems to work, at least in Chrome on a Mac.
0
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 

Author Comment

by:Richard Korts
ID: 39842960
The one in the link you posted is the original. It DOES NOT work in FF on a Win 7 PC.

The one I last attached (test_scrh1.htm) DOES work (for me).

I know this is all crazy, seems like magic.

I will probably just copy the javacsript out of the one that works & paste it into the "real" program. But with magic going on, I doubt that will work either.
0
 

Author Comment

by:Richard Korts
ID: 39842966
For me, the one with the 1 at then end works in Chrome; the other DOES NOT
0
 
LVL 38

Expert Comment

by:Tom Beck
ID: 39843177
Tried in Firefox v18 on Windows 7. Could not see any problem.
0
 

Author Comment

by:Richard Korts
ID: 39857565
No solution provided.
0
 
LVL 38

Expert Comment

by:Tom Beck
ID: 39857715
I was unable to recreate the problem in Firefox v18 on Windows 7 with the live link you provided, http://rkassoc.org/FWLSCO/test_scrh.htm. Are you on a different version of Firefox?

The code provided only tests one function, chk_vals(). The other functions are not being called. As long as there are no console errors, the presence of the other javascript code does not affect the chk_vals() function.

Not likely any other experts are looking at this question. You can try the "Request Attention" link if you would like other members to look at the question.
0
 

Author Comment

by:Richard Korts
ID: 39857768
To TommyBoy,

You are right, it does work.  Somewhere I got confused with all the variations.

rkorts
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
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…
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

743 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

12 Experts available now in Live!

Get 1:1 Help Now