Text Replacement w/Link Not working

Greetings.

This script has proven to work when I’ve tested it outside of the web page. When I implement it within the page, I do not see it working (I’ve removed the text from the page because the code didn’t work). Chrome Console doesn’t display any error messages in regards to this. Suggestion?

 <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.2/jquery.min.js"></script>
	<script>
		jQuery( document ).ready(function() {
			jQuery('.boxcast-description').html(function(i, v) {
				return v.replace(/Download May 8 Program/g, '<a href="images/programs/May-8-2016.pdf">Download May 8 Program</a>');    
			});
		});
		</script>

The link shows a 403 error and also on the home page?

I’m sorry.

Please try again. If it still doesn’t work, PM me your IP.

Does this mean anything to you that might be helpful?

{“code”:4,“message”:“No compatible source was found for this video.”}

No. That’s in regards to the streaming service we use.

I get the same thing here too.

True perhaps. But it looks like the widget failing there results in there not being a “boxcast-description” for the script to find and replace.

I think you will need to solve that error before you can continue.

Done.

PM me your IP.

I’m not too sure I can find out, as I’m sitting inside a company connection - can’t say I know what our public IP is, but I’m guessing being in Saudi Arabia, you might have an easier time picking it out of your logs - can’t be too many looking from over here I’d have thought.

Still the same error and also no home page.

I would be tempted to try a minimum “test.html” and “test.php” files to ensure your .htaccess file is working correctly.

I’m in the UK and I’m not having any problems accessing the site. (Not much use, as unfortunately I can’t answer your question.)

I’m using a component to block certain IP regions. That’s why you are experiencing the error.

Sounds like a few of us are going to have a hard time making any concrete suggestions unfortunately.

Well I’ve removed it, so there shouldn’t be any more problems.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.