Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Advanced Search
  • 0

Force Java to load in Ajax


OUTPOSTMTL

Question

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">
<html>
	<head>
		<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>

	</head>
	<body>
		<div class="div-section">
			<table>

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

			</table>

		</div>

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

		<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">
			pageReady();
		</script>

		<div>
			<span id="sdpDataTag"></span>
		</div>
	</body>
</html>

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.

 

Edited by OUTPOSTMTL
Link to post
  • Answers 5
  • Created
  • Last Reply

Top Posters For This Question

5 answers to this question

Recommended Posts

  • 0
Posted (edited)

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.

Edited by rwp
Link to post
  • 0
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 post

Create an account or sign in to comment

You need to be a member in order to leave a comment


×
×
  • Create New...