Installed javascript stops me from editing the page

  • 1
  • Problem
  • Updated 10 years ago
  • Acknowledged
Archived

This conversation was archived and is no longer visible to community members. The community moderator provided the following reason for archiving: out of date

How do you access the source code of a web page in sitebuilder? I added a javascript and now I see that the sitebuilder doesn't let me edit my page. It says 'opening page..' all the while. I tried clearing cache, restarted browser but still no use. I want to delete the script, but don't know how. The published site works fine though http://chquotes.synthasite.com

Incase you want to know..here is the code that I added..

//<![CDATA[
var m3_u = (location.protocol=='https:'?'https://www.emptyspaceads.com/user/ww...;
var m3_r = Math.floor(Math.random()*99999999999);
var esa_version = 2.0;
if (!document.MAX_used) document.MAX_used = ',';
document.write ("<scr"+"ipt type='text/javascript' src='"+m3_u);
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>");
//]]>

--------------------------------------------------------------
"i inserted the * at the beginning of the
Photo of Krack

Krack

  • 43 Posts
  • 0 Reply Likes
  • sad

Posted 10 years ago

  • 1
Photo of UK Duke

UK Duke, Champion

  • 3321 Posts
  • 213 Reply Likes
unless a staff member can somehow get it back theres nothing that can be done, same thing happened to me a while back - i would highly recommend you use the save page as function to make a copy of your important pages.
Photo of UK Duke

UK Duke, Champion

  • 3321 Posts
  • 213 Reply Likes
and dont delete the index page and republish till you have saved what you can from the published page.
Photo of Krack

Krack

  • 43 Posts
  • 0 Reply Likes
Could some one from yola look at the code and tell me which part of the above code is interfering with sitebuilder?
Photo of UK Duke

UK Duke, Champion

  • 3321 Posts
  • 213 Reply Likes
possibly its the way the scrpt is closed - but thats just a guess.
Photo of Emmy

Emmy

  • 5892 Posts
  • 299 Reply Likes
Hi Kracksmack,

I'm not sure what part of the code exactly is interfering with the site builder, the best thing to do is delete the chunk of code, and if you are unable to do that, to recreate the page.

You can either delete the page if it is not your home/index page and start fresh, or you can create a new page, name it index and choose to overwrite the current index page; then you will be able to start fresh on the index page.

We suggest to first try out any code you would like to use in the site builder on a test page first to make sure it doesn't interact negatively with the site builder.

Kind Regards,
Emmy
Photo of Krack

Krack

  • 43 Posts
  • 0 Reply Likes
Hi Emmy,
Thanks for the reply.
I am trying it on a test page, but this is the javascript for ads that I would like to place, so I want it to work.
I think the problem is because of the source of the script ,"ajs.php".. is it true that yola doesnt support php ?
The code runs perfectly fine when i publish it http://chquotes.synthasite.com/test
try hovering your mouse in the right side of the page, you will see an ad.

But only the sitebuilder has a problem once I save the file and reload it. Is there anyway that I can make sitebuilder ignore this piece of code? or is there anyway to look at the source code, so that i can comment it out each time i want to edit the page?
Photo of Emmy

Emmy

  • 5892 Posts
  • 299 Reply Likes
It isn't possible to upload .php files into the site builder, is that what you needed to do? You can put snippets of javascript or html on your site using an html widget, but uploading .php, .js or .html files cannot be done. Does that answer your question on why this isn't working for you.
Photo of Krack

Krack

  • 43 Posts
  • 0 Reply Likes
Not exactly Emmy. I have added the above javascript through the html widget. I dont need to upload any php code, I was just referring to the source location of the script being called. Would that be a problem with the sitebuilder? If I can't get the sitebuilder to work I need to move the site to another place...but i really liked yola :(
Photo of Krack

Krack

  • 43 Posts
  • 0 Reply Likes
Is there any way I can access the source code of a webpage ?
Photo of Emmy

Emmy

  • 5892 Posts
  • 299 Reply Likes
Hi,
The code you have would work, but there is something invalid in it. One of our engineers is looking at it to see what the problem might be. He will post back here when he has had a chance to look at it. It is not possible to access the source code of the site. Is there something you were wanting to do, possibly we have an alternative for you.
Photo of Krack

Krack

  • 43 Posts
  • 0 Reply Likes
All I want is to place ads on my site..Let me insert the code once again
<!--

<script type='text/javascript'>
//<![CDATA[
var m3_u = (location.protocol=='https:'?'https://www.emptyspaceads.com/user/ww...;
var m3_r = Math.floor(Math.random()*99999999999);
var esa_version = 2.0;
if (!document.MAX_used) document.MAX_used = ',';
document.write ("<scr"+"ipt type='text/javascript' src='"+m3_u);
document.write ("?clientid=14&campaignid=15&bannerid=27");
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><script>esa_finalize(esa_version);</script>

-->
Photo of Krack

Krack

  • 43 Posts
  • 0 Reply Likes
Thanks for the reply. It would be great if you can fix the issue.
Photo of Christo

Christo

  • 95 Posts
  • 13 Reply Likes
Hi Kracksmack

I have been looking into your problem. It looks like EmptySpace uses phpAdsNew to deliver their ads. phpAdsNew should support a number of methods for embedding your code.

Ideally, you may be able to het html embed code for a remote site. If you can, then that might be an easier option.

It also appears that their ad delivery hides ads from domains which are not the one you registered with (do you know if that is the case?)

Another thing you can try is this:

If you get this invocation code:


&lt;!--/* EmptySpaceAds Javascript Tag v2.6.3 */--&gt;

&lt;script type='text/javascript'&gt;
//&lt;![CDATA[
var m3_u = (location.protocol=='https:'?'https://www.emptyspaceads.com/user/www/delivery/ajs.php':'http://www.emptyspaceads.com/user/www/delivery/ajs.php');
var m3_r = Math.floor(Math.random()*99999999999);
var esa_version = 2.0;
if (!document.MAX_used) document.MAX_used = ',';
document.write (&quot;&lt;scr&quot;+&quot;ipt type='text/javascript' src='&quot;+m3_u);
document.write (&quot;?clientid=16&amp;amp;campaignid=17&amp;amp;bannerid=33&quot;);
document.write ('&amp;amp;cb=' + m3_r);
if (document.MAX_used != ',') document.write (&quot;&amp;amp;exclude=&quot; + document.MAX_used);
document.write (document.charset ? '&amp;amp;charset='+document.charset : (document.characterSet ? '&amp;amp;charset='+document.characterSet : ''));
document.write (&quot;&amp;amp;loc=&quot; + escape(window.location));
if (document.referrer) document.write (&quot;&amp;amp;referer=&quot; + escape(document.referrer));
if (document.context) document.write (&quot;&amp;context=&quot; + escape(document.context));
if (document.mmm_fo) document.write (&quot;&amp;amp;mmm_fo=1&quot;);
document.write (&quot;'&gt;&lt;
<!--/* EmptySpaceAds Javascript Tag v2.6.3 */-->

<script type='text/javascript'>
//<![CDATA[
var m3_u = (location.protocol=='https:'?'https://www.emptyspaceads.com/user/ww...;
var m3_r = Math.floor(Math.random()*99999999999);
var esa_version = 2.0;
if (!document.MAX_used) document.MAX_used = ',';
document.write ("<scr"+"ipt type='text/javascript' src='"+m3_u);
document.write ("?clientid=16&amp;campaignid=17&amp;bannerid=33");
document.write ('&amp;cb=' + m3_r);
if (document.MAX_used != ',') document.write ("&amp;exclude=" + document.MAX_used);
document.write (document.charset ? '&amp;charset='+document.charset : (document.characterSet ? '&amp;charset='+document.characterSet : ''));
document.write ("&amp;loc=" + escape(window.location));
if (document.referrer) document.write ("&amp;referer=" + escape(document.referrer));
if (document.context) document.write ("&context=" + escape(document.context));
if (document.mmm_fo) document.write ("&amp;mmm_fo=1");
document.write ("'><\/scr"+"ipt>");
//]]>
</script><script>esa_finalize(esa_version);</script><noscript><a href='http://www.emptyspaceads.com/user/www...' target='_blank'><img src='http://www.emptyspaceads.com/user/www...' border='0' alt='' /></a></noscript>
#47;scr&quot;+&quot;ipt&gt;&quot;);
//]]&gt;
&lt;/script&gt;&lt;script&gt;esa_finalize(esa_version);&lt;/script&gt;&lt;noscript&gt;&lt;a href='http://www.emptyspaceads.com/user/www/delivery/ck.php?bannerid=33&amp;amp;zoneid=&amp;amp;cb=INSERT_RANDOM_NUMBER_HERE' target='_blank'&gt;&lt;img src='http://www.emptyspaceads.com/user/www/delivery/avw.php?clientid=16&amp;amp;campaignid=17&amp;amp;bannerid=33' border='0' alt='' /&gt;&lt;/a&gt;&lt;/noscript&gt;


You can try leaving out the javascript part and just use the noscript part. e.g.:


&lt;a href='http://www.emptyspaceads.com/user/www/delivery/ck.php?bannerid=33&amp;amp;zoneid=&amp;amp;cb=INSERT_RANDOM_NUMBER_HERE' target='_blank'&gt;&lt;img src='http://www.emptyspaceads.com/user/www/delivery/avw.php?clientid=16&amp;amp;campaignid=17&amp;amp;bannerid=33' border='0' alt='' /&gt;&lt;/a&gt;


These aren't perfect solutions I am afraid, but I would like to work through this with you and see if we can find a solution.
Photo of Krack

Krack

  • 43 Posts
  • 0 Reply Likes
Thank you for looking into this Christo. I was thinking emptyspaceads was using OpenX for ads, not sure if phpAdsNew and OpenX are same.

I tried the no script part and it doesn't work. But I noticed an interesting thing, when I tried to show a Adsense 'link' unit through emptyspaceads, I had no problem with the sitebuilder. All other type of ads freeze the sitebuilder, only when the page is reloaded/ refreshed in the sitebuilder.
I did not see other options for invocation code in emptyspaceads but I'll try contacting them to get a different one. I'll let you know how that goes.

When emptyspaceads will work with sitebuilder, it will be wonderful..

Thanks again Christo, I really appreciate it.
Photo of Christo

Christo

  • 95 Posts
  • 13 Reply Likes
Hey Kracksmack, any reply from empytyspaceads yet?

Some more questions, which will help me debug for you:

1.) you mentioned that you had the ad working on a published site? If you could send me that url, I can try see the html generated by the ad, and try reverse engineer some new javascript so that it will work in the sitebuilder.

Thanks,
Christo
Photo of Krack

Krack

  • 43 Posts
  • 0 Reply Likes
Hi Christo,
I haven't contacted them yet. But here is the page on which only "adsense link unit ad" works
http://chquotes.synthasite.com/chstri...
just above the first comic strip you can find the empty space where the ad will be visible if you bring your mouse over that area

Thanks
kracksmack
Photo of UK Duke

UK Duke, Champion

  • 3321 Posts
  • 213 Reply Likes
remeber only 3 google adverts per page - maybe those empty space ads dont follow that rule. Ive never seen them before . nice,
Photo of Christo

Christo

  • 95 Posts
  • 13 Reply Likes
Hi Kracksmack. Thanks for that, I will try look into it today and get back to you with some possible solutions ..
Photo of Krack

Krack

  • 43 Posts
  • 0 Reply Likes
Hi Christo,



Whenever the sitebuilder shows me this sort of text when i insert the html invocation code(in html widget), the sitebuilder hangs when the page is refreshed/ opened next time