Jump to content

Force Java to load in Ajax

Recommended Posts

Hello! (First Time Here)

I'm running into issues with a javascript not loading in a code block for a video player I am trying to implement. The scripts work and load on a local implementation  and on a non-squarespace hosted implementation. 

Here is the code in question:

<meta charset="UTF-8">
		<script src="https://www.mysite.xyz/vendome/js/jquery-3.1.0.min.js"></script>
		<script src="https://www.mysite.xyz/vendome/js/jquery.cookie.js"></script>
		<script src="https://www.mysite.xyz/vendome/webrtc.js"></script>

		<div class="div-section">

				<td><input type="hidden" id="sdpURL" size="50" value=""/></td></tr>
				<td><input type="hidden" id="applicationName" size="25" value=""/></td></tr>
				<td><input type="hidden" id="streamName" size="25" value=""/></td></tr>



		<div class="div-section">
			<video id="remoteVideo" autoplay playsinline controls muted style="width:1000px;"></video>

		<td><input type="button" id="buttonGo" onclick="start()" value="" /></td>
		<input type="button" id="buttonCheckStream" onclick="getAvailableStreams()" value="Get Available Streams" />

		<script type="text/javascript">

			<span id="sdpDataTag"></span>

jquery.cookie.js will not load causing the next scripts to not function. When you load the page we get "Uncaught TypeError: $.cookie is not a function".

I'm fairly certain that the jquery scripts aren't loading twice and over writing eachother like other posts have suggested. 

I've tried renaming the the cookie.js as well but no luck. 

Could this have something to do with AJAX? Is there anything we could do to force the scripts to load?

Any advice is appreciated! 


(Excuse the bad HTML, I'm from a python background.)


EDIT: The template is AJAX compatible and the option is enabled.


Link to comment
  • Replies 5
  • Views 605
  • Created
  • Last Reply
On 7/3/2020 at 12:13 PM, rwp said:

Please provide a link to your page.

Where did that code come from?

The js links in the first block are not actual links, so if you are using that code exactly, that is part of the problem.

The code is a front end for a streaming service we are building for our clients. The links were changed for privacy reasons. 


I can PM you the actual page if you'd like to take a look. 


Let me know.


Link to comment


This topic is now archived and is closed to further replies.

  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.