display nonsecure items on a secure page

I am trying to add a snippet of code from

<script language="JavaScript" src="https://www.nsc.org/syndy/weeklytip/safetytip.js"></script>

(the code i am using is in the code section)

the issue i am facing is that when my page is loading a trigger for the non secure items prompts and that is not good.

the html code inside safety.js (i retrieve only the text) contains also two urls from nsc to a couple of images, i don't want the images, just the text, but it seems that since the request is made to the https://www.nsc.org/syndy/weeklytip/safetytip.js url, and in there those urls exist, i keep getting the prompt.

is it possible to find a way to place this safety tip in my https page without the images and without getting the prompt?

many thanks.
<div class="nodeContents-shaded">
			<div id='remote' style='position:absolute;display:none;left:-100em;'>
				<script language="JavaScript">document.write('<scr'+'ipt type="text/javascript" src="https://www.nsc.org/syndy/weeklytip/safetytip.js"></scr'+'ipt>');</script>
		</div>
		<script  language="JavaScript">
			window.onload=function(){
  		document.getElementById('tip').innerHTML = document.getElementById('remote').innerHTML.replace(/<[^>]+>/g,'').replace(/\r?\n/g,'');
			document.getElementById('remote').innerHTML='';
			}
		</script>
		<div id='tip'></div>

Open in new window

itortuAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

hieloCommented:
use the current location protocol:
<div class="nodeContents-shaded">
                        <div id='remote' style='position:absolute;display:none;left:-100em;'>
                                <script type="text/javascript">document.write('<scr'+'ipt type="text/javascript" src="'+location.protocol+'//www.nsc.org/syndy/weeklytip/safetytip.js"></scr'+'ipt>');</script>
                </div>
                <script  type="text/javascript">
                        window.onload=function(){
                document.getElementById('tip').innerHTML = document.getElementById('remote').innerHTML.replace(/<[^>]+>/g,'').replace(/\r?\n/g,'');
                        document.getElementById('remote').innerHTML='';
                        }
                </script>
                <div id='tip'></div>

Open in new window

0
itortuAuthor Commented:
i do that, and for some reason the text shows but this way

document.write('');While April showers bring May flowers, they also can  cause floods. Avoid vehicle submersion and never drive across a flooded  roadway. For more safety tips, visit nsc.org.
0
hieloCommented:
are you sure you copied correctly? It seems to work OK for me. Copy and paste the attached code onto a new file as save it as tip.html then try it:
<div class="nodeContents-shaded">
                        <div id='remote' style='position:absolute;display:none;left:-100em;'>
                                <script type="text/javascript">document.write('<scr'+'ipt type="text/javascript" src="'+location.protocol+'//www.nsc.org/syndy/weeklytip/safetytip.js"></scr'+'ipt>');</script>
                </div>
                <script  type="text/javascript">
                        window.onload=function(){
                document.getElementById('tip').innerHTML = document.getElementById('remote').innerHTML.replace(/<[^>]+>/g,'').replace(/\r?\n/g,'');
                        document.getElementById('remote').innerHTML='';
                        }
                </script>
                <div id='tip'></div>

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Scripting Languages

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.