Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Javascript / HTML problem

Posted on 2014-02-07
12
Medium Priority
?
266 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 2000 total points
ID: 39842775
Also, your onSubmit call seems to have an errant single quote:

onSubmit="return chk_vals()'"
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 

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

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

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

This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
This article discusses how to implement server side field validation and display customized error messages to the client.
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.
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).
Suggested Courses

971 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