We help IT Professionals succeed at work.

replacing inline javascript with jquery

Newton21205
Newton21205 asked
on
208 Views
Last Modified: 2017-04-17
im relaxing the inline javascript by jquery.
I have attached two files one is having code with inline javascript.
The other file is having code with the jquery.

I want to verify if the query i have written is correct and would work as expected.
inline-javsacript-replaced-by-jquery
Inline-javascript
Comment
Watch Question

Commented:
greetings Newton21205 , , , the code in your javascript is way too OLD, and out of date, as you have tests for things that in year 2017, that do not even exist any more -

        else if (navigator.appName=="Netscape"){
            NS6=parseInt(navigator.appVersion)>=5;
            NS4=4>=parseInt(navigator.appVersion);

these tests for "Netscape" are not valid, as "Netscape" no longer exists, , . .

In my view, Your best bet is to abandon that old javascript code, and start over with code that is more current, and corresponds to the HTML and Javascript standards used in browsers today.

Also, you can use non-Jquery, plain javascript to eliminate the "Inline" HTML javascript used.
CERTIFIED EXPERT
Most Valuable Expert 2017
Distinguished Expert 2019

Commented:
Also your code seems incomplete - as you have it it does not make sense. You have script that refers to checkboxes in MainForm but the checkboxes exist outside of any form - there is also "onlick" code wandering about by itself outside of an element.
IT Expert
CERTIFIED EXPERT
Top Expert 2009
Commented:
This problem has been solved!
(Unlock this solution with a 7-day Free Trial)
UNLOCK SOLUTION

Author

Commented:
done

Gain unlimited access to on-demand training courses with an Experts Exchange subscription.

Get Access
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Empower Your Career
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions