Solved

Javascript / HTML problem

Posted on 2014-02-07
12
259 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
PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

 

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

Independent Software Vendors: 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!

Question has a verified solution.

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

Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
In this tutorial viewers will learn how to position items using CSS's three positioning types Create a new HTML document with an internal stylesheet.: Create another div in CSS and name it Absolute : Type "position:absolute;" and "top:10px; left:50p…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
Suggested Courses

635 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