Page 1 of 1

Help. How to strip <script> from Javascript

Posted: 07 Aug 2010, 13:29
by kurdi
This is driving me crazy.
I want to add the following Javascript in the header
<script type="text/javascript" src="ImageFlowSource/imageflow.js"></script>

except Suffusion requires that you strip the <script></script> tags (in blog features > custom includes)
(Why oh why is this the case anyway?)
and I cannot seem to remove them and get the code to work. I tried numerous variations.

Please help, thanks.
mys site: www.freewaregenius.com

Re: Help. How to strip <script> from Javascript

Posted: 07 Aug 2010, 14:03
by sayontan
Not sure what you are trying to say. All you need to do is to put in the entire path to the imageflow.js file in Blog Features -> Custom Includes -> First External JavaScript file. That's all.

Re: Help. How to strip <script> from Javascript

Posted: 07 Aug 2010, 16:01
by kurdi
@ Sayontan: that, I already did. However, I need to add that bit of code into the header. How do I do that.

Re: Help. How to strip <script> from Javascript

Posted: 07 Aug 2010, 17:14
by sayontan
If you have done that you don't need to add anything else. The code automatically adds what you want to put

Re: Help. How to strip <script> from Javascript

Posted: 07 Aug 2010, 18:18
by sayontan
Can you paste a screenshot of your Custom Includes page? I want to see your JS settings.

Re: Help. How to strip <script> from Javascript

Posted: 08 Aug 2010, 11:43
by kurdi
Sayontan: what I am trying to do is insert into the sidebar an image carousel that someone coded for me, and having a very hard time at it.
I started this thread simply because I needed to insert some code into the header, and wished that I didn't need to strip the <script> tag because the tag had the code in it that I didn't know what to do in that situation (I am a non coder)
This is what I mean: <script type="text/javascript" src="ImageFlowSource/imageflow.js">

But you know what, I think there might be something wrong in the code or CSS that they provided, because it was messing up the site's look and feel.

I have now gone back to the coder for a fix. Thanks for your input.

Re: Help. How to strip <script> from Javascript

Posted: 08 Aug 2010, 16:44
by sayontan
I started this thread simply because I needed to insert some code into the header, and wished that I didn't need to strip the <script> tag because the tag had the code in it that I didn't know what to do in that situation (I am a non coder)
This is what I mean: <script type="text/javascript" src="ImageFlowSource/imageflow.js">
As I mentioned, this is really easy. Let's say you wanted to insert this: <script type="text/javascript" src="http://www.freewaregenius.com/wp-conten ... ageflow.js"> (note the full path of the file). All you would need to do was to put http://www.freewaregenius.com/wp-conten ... ageflow.js in the location of the first JS file include option, not in the custom JS code option. That's all - Suffusion would take care of writing the script tags out by itself.

Re: Help. How to strip <script> from Javascript

Posted: 10 Mar 2013, 04:20
by Liquid
Hi everyone. I have a similar problem with my site. I think it's an easy fix but I just need to be pointed in the right direction.

I am in the process of adding a banner to my site. But it requires me to integrate two different scripts. Here are the specific instructions given to me by the banner agency (between the dotted lines below)
----------------------------------------------------

This page contains all the information you need to show banners on your website. Please follow the instructions carefully and ensure that you copied the scripts exactly as shown below.
Header Script:
Insert the following script at the top of every page on the http://www.freedomthirtyfiveblog.com website. This code goes between the <head> and </head> tags, before any other banner scripts on the page:
<!-- Generated by OpenX 2.8.7 -->
<script type='text/javascript' src='http://www.example.com/delivery/spcjs.p ... '></script>

Banner Script:
Copy the following script and place it in the site where you want the banner to display:
<script type='text/javascript'><!--// <![CDATA[
/* [id80] http://www.freedomthirtyfiveblog.com - 300X250 */
OA_show(80);
// ]]> --></script><noscript><a target='_blank' href='http://www.example.com/delivery/ck.php?n=y26dj71'><img border='0' alt='' src='http://www.example.com/delivery/avw.php ... &n=y26dj71' /></a></noscript>

-------------------------------------------------------

I have tried using "custom includes" by typing "http://www.example.com/delivery/spcjs.php?id=85" without the quotes into the First External JavaScript file space like sayontan mentioned. Then I copy/pasted the entire contents of the Banner Script into a "text" widget on the side bar. But it doesn't seem to be working. The banner doesn't show up and the widget is a compressed line because there's nothing in it. Any suggestions would be appreciated.

Thanks, and great theme by the way :D

ps. I should also point out that I was given a banner code but I'm not sure what I should do with it. The code is below in case it has important information.

<script type='text/javascript'><!--//<![CDATA[
var m3_u = (location.protocol=='https:'?'https://www.example.com/delivery/ajs.ph ... ry/ajs.php');
var m3_r = Math.floor(Math.random()*99999999999);
if (!document.MAX_used) document.MAX_used = ',';
document.write ("<scr"+"ipt type='text/javascript' src='"+m3_u);
document.write ("?zoneid=80");
document.write ('&cb=' + m3_r);
if (document.MAX_used != ',') document.write ("&exclude=" + document.MAX_used);
document.write (document.charset ? '&charset='+document.charset : (document.characterSet ? '&charset='+document.characterSet : ''));
document.write ("&loc=" + escape(window.location));
if (document.referrer) document.write ("&referer=" + escape(document.referrer));
if (document.context) document.write ("&context=" + escape(document.context));
if (document.mmm_fo) document.write ("&mmm_fo=1");
document.write ("'><\/scr"+"ipt>");
//]]>--></script><noscript><a href='http://www.example.com/delivery/ck.php? ... UMBER_HERE' target='_blank'><img src='http://www.example.com/delivery/avw.php ... &n=y26dj71' border='0' alt='' /></a></noscript>