Solved

Javascript / HTML problem

Posted on 2014-02-07
12
252 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
[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
  • 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
asp.net, radiobuttonlist, c# 3 69
object method as an event handler 8 77
Can't Find the Homepage on my site 4 46
Different Javascript on iPhone than Win 10 desktop? 7 53
Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
This article discusses how to implement server side field validation and display customized error messages to the client.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

734 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