troubleshooting Question

Javascript navigation not working 100% after AJAX scripts added to page

Avatar of Mark B
Mark BFlag for United States of America asked on
JavaScriptAJAX* htl
2 Comments1 Solution176 ViewsLast Modified:
Hi- I am reworking an email form that was using server side script to client side. The issue, is that the Javascript navigation does not working correctly with the new Ajax scripts added to page, but if you hit refresh in browser, then the navigation seems to work ok. I am thinking perhaps there is a need to force reload the javascript after the new ajax based scripts load.

The page is here: http://dev.alphagraphicsseattle.com/contact.aspx

The new Ajax code added to the page is here (and we should not alter this vendor supplied code:

<!-- XMPL library -->
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<link type="text/css" href="https://ajax.xmcircle.com/ajax/libs/xmpl/1.9.1/xmp/css/xmp.css" rel="stylesheet" media="screen" />
<script type="text/javascript" src="https://ajax.xmcircle.com/ajax/libs/xmpl/1.9.1/xmp/js/xmp.min.js"></script>
<script type="text/javascript" src="https://cdn.121.ag/sem/ag/skin2/xmpcfg/2gagsemhttps/xmpcfg.js"></script>
<link rel="stylesheet" type="text/css" href="https://cdn.121.ag/sem/ag/skin2/css/xmpl.css" />
<!-- XMPL library -->

The javascript that manages the navigation style is here:

http://dev.alphagraphicsseattle.com/js/main092718.js

Attached are two screens. One shows how the navigation is not wide enough on page load / before refresh. The other screen shows how the navigation should look / after refresh.

I've tried moving the scripts around in the header, putting them after the body, added defer or async to the javascript lines. If there is a change to main092718.js, that is possible for us to add, but the other ajax scripts, we cannot change.

Is there some way to force the main092718.js to re initialize after ajax scripts or is there something to change in main092718.js? main092718.js has been working forever ok, but the addition of the new scripts has caused issues. Thank you for any direction.  Mark
before-refresh-notworking.png
after-refresh-working.png
ASKER CERTIFIED SOLUTION
lenamtl

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 2 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros