Solved

Javascript / HTML problem

Posted on 2014-02-07
12
248 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
ScreenConnect 6.0 Free Trial

Discover new time-saving features in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI, app configurations and chat acknowledgement to improve customer engagement!

 

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
 

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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
CSS: How do I override in-line styling 11 17
innerHTML 7 23
Make Session back to empty 9 17
VBScript on Html 15 25
Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
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 add a scalable full-width header using CSS3. Create a new HTML document with an internal stylesheet. Set a tiled background.:  Create a new div and name it Header. Position it with position:absolute at the top…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

825 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