The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

Christmas Javascript Problem

View previous topic View next topic Go down

Solved Christmas Javascript Problem

Post by cougar30 on Sun Dec 09, 2012 5:22 pm

Hi all
I am trying to insert the following Javascript that has been recently posted into my forum;

$(function() {
$.getScript("http://sd-1.archive-host.com/membres/up/37821634957680146/deco/boule22.js");
});

This doesn't show at all. I have tried the snowflake code and this is working fine.

Any help would be much appreciated.

Many Thanks

Andy


Last edited by cougar30 on Mon Dec 10, 2012 4:33 pm; edited 1 time in total (Reason for editing : Problem solved)

cougar30
Forumember

Male Posts : 244
Reputation : 1
Language : English

http://nineelms.freeforum.me.uk/forum

Back to top Go down

Solved Re: Christmas Javascript Problem

Post by UnknownJoker on Sun Dec 09, 2012 6:17 pm

hmmmm have you try saving it?
if anything... it probably doesn't work for anyone!

UnknownJoker
New Member

Posts : 7
Reputation : 1
Language : english

Back to top Go down

Solved Re: Christmas Javascript Problem

Post by cougar30 on Mon Dec 10, 2012 3:00 am

Hi,
Yes I did try saving it as the code and not the Baubles show in my forum.

Hope this helps.

Andy

cougar30
Forumember

Male Posts : 244
Reputation : 1
Language : English

http://nineelms.freeforum.me.uk/forum

Back to top Go down

Solved Re: Christmas Javascript Problem

Post by Sanket on Mon Dec 10, 2012 5:23 am


Sanket
ForumGuru

Male Posts : 48766
Reputation : 2819
Language : English
Location : Mumbai

http://webartzforum.com

Back to top Go down

Solved Re: Christmas Javascript Problem

Post by Shek on Mon Dec 10, 2012 5:26 am

Hello!

In many cases, you can not use the $ symbol Octuturpi in Javascript codes. Unfortunately, some forums do not recognize the codes and finally end up not working. Please try using this code:
Code:
jQuery(function() {
jQuery.getScript("http://sd-1.archive-host.com/membres/up/37821634957680146/deco/boule22.js");
});
If possible, add in Control Panel > Modules > HTML and JavaScript > Create a new Script code >

If not, keep us informed! thumright

Regards,
Very Happy

Shek
Active Poster

Male Posts : 1092
Reputation : 31
Language : Portuguese and English
Location : Brazil

http://www.shiftactif.com/

Back to top Go down

Solved Re: Christmas Javascript Problem

Post by cougar30 on Mon Dec 10, 2012 5:38 am

@Shek wrote:Hello!

In many cases, you can not use the $ symbol Octuturpi in Javascript codes. Unfortunately, some forums do not recognize the codes and finally end up not working. Please try using this code:
Code:
jQuery(function() {
jQuery.getScript("http://sd-1.archive-host.com/membres/up/37821634957680146/deco/boule22.js");
});
If possible, add in Control Panel > Modules > HTML and JavaScript > Create a new Script code >

If not, keep us informed! thumright

Regards,
Very Happy

Hi
Thanks for the replies. Unfortunately I tried the code in the Javascript Management section under Modules and have also tried it Display>Generalitlies and HTML section, but it is still not working.
Here is all the code I currently have;

<marquee> Welcome to the Nine Elms forum...We hope you have fun catching up on times gone by.... </marquee>
</br>
</br>
jQuery(function() {
jQuery.getScript("http://sd-1.archive-host.com/membres/up/37821634957680146/deco/boule22.js");
});
<script type="text/javascript">
var speed=20; // Speed/From the less to the more speed
var flakes=20; // Number of flakes
var flake_image="http://i67.servimg.com/u/f67/15/17/71/53/nuevep10.png"; //URL of the image
var swide, shigh;
var dx=new Array();
var xp=new Array();
var yp=new Array();
var am=new Array();
var sty=new Array();
window.onload=function() { if (document.getElementById) {
var k, f, b;
b=document.createElement("div");
b.style.position="absolute";
b.setAttribute("id", "bod");
document.body.appendChild(b);
set_scroll();
set_width();
for (var i=0; i<flakes; i++) {
dx[i]=0;
am[i]=Math.random()*20;
xp[i]=am[i]+Math.random()*(swide-2*am[i]-25);
yp[i]=Math.random()*shigh;
sty[i]=0.75+1.25*Math.random();
f=document.createElement("div");
f.style.position="absolute";
f.setAttribute("id", "flk"+i);
f.style.zIndex=i;
f.style.top=yp[i]+"px";
f.style.left=xp[i]+"px";
k=document.createElement("img");
k.src=flake_image;
f.appendChild(k);
b.appendChild(f);
}
setInterval("winter_snow()", speed);
}}
window.onresize=set_width;
function set_width() {
if (document.documentElement && document.documentElement.clientWidth) {
swide=document.documentElement.clientWidth;
shigh=document.documentElement.clientHeight;
}
else if (typeof(self.innerHeight)=="number") {
swide=self.innerWidth;
shigh=self.innerHeight;
}
else if (document.body.clientWidth) {
swide=document.body.clientWidth;
shigh=document.body.clientHeight;
}
else {
swide=800;
shigh=600
}
}
window.onscroll=set_scroll;
function set_scroll() {
var sleft, sdown;
if (typeof(self.pageYOffset)=="number") {
sdown=self.pageYOffset;
sleft=self.pageXOffset;
}
else if (document.body.scrollTop || document.body.scrollLeft) {
sdown=document.body.scrollTop;
sleft=document.body.scrollLeft;
}
else if (document.documentElement && (document.documentElement.scrollTop || document.documentElement.scrollLeft)) {
sleft=document.documentElement.scrollLeft;
sdown=document.documentElement.scrollTop;
}
else {
sdown=0;
sleft=0;
}
document.getElementById("bod").style.top=sdown+"px";
document.getElementById("bod").style.left=sleft+"px";
}
function winter_snow() {
for (var i=0; i<flakes; i++) {
yp[i]+=sty[i];
if (yp[i]>shigh-30) {
xp[i]=am[i]+Math.random()*(swide-2*am[i]-25);
yp[i]=0;
sty[i]=0.75+1.25*Math.random();
}
dx[i]+=0.02+Math.random()/10;
document.getElementById("flk"+i).style.top=yp[i]+"px";
document.getElementById("flk"+i).style.left=(xp[i]+am[i]*Math.sin(dx[i]))+"px";
}
}
</script>
</br>
<center> <a href=http://www.southern-locomotives.co.uk target="_blank"><img src="http://i60.servimg.com/u/f60/13/90/74/08/southe17.gif" alt="" /></a> </center>
</br>
<embed src="http://cp35005.podbean.com/mf/web/88tjqr/Bulleid.mp3"autostart="true" loop="False" hidden="true">
<style type="text/css">
img {border:none;
}
</style><div style="position:absolute; Top: 380%; left: 14px;">
<script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script><fb:like href="http://www.facebook.com/pages/Nine-Elms-Dedication-Forum/174359172589342" show_faces="true" width="200"></fb:like></div><script type=text/javascript></script>
<meta http-equiv="refresh" content="600">

Hopefully this will give you some idea as to what the problem may be?

Thanks once again

Andy

cougar30
Forumember

Male Posts : 244
Reputation : 1
Language : English

http://nineelms.freeforum.me.uk/forum

Back to top Go down

Solved Re: Christmas Javascript Problem

Post by Shek on Mon Dec 10, 2012 5:53 am

Hello my dear author! Hello

Wow, I'm surprised. Anyway, erase everything! Crying or Very sad Instead of using codes Scripts, use their JS pages. I put the script that I edited for you again, and it worked. I wanted to know one thing, the second script is snow Question

If it is, replace it with this:
Code:
jQuery(function() {
jQuery.getScript("http://illiweb.com/rs4/10/frm/snow.js");
});

Use in Control Panel > Modules > HTML and JavaScript > Create a new Script code >. In "Inestiment", select "All pages".

EDIT: Delete the code
Code:
jQuery(function() {
jQuery.getScript("http://sd-1.archive-host.com/membres/up/37821634957680146/deco/boule22.js");
});
<script type="text/javascript">
var speed=20; // Speed/From the less to the more speed
var flakes=20; // Number of flakes
var flake_image="http://i67.servimg.com/u/f67/15/17/71/53/nuevep10.png"; //URL of the image
var swide, shigh;
var dx=new Array();
var xp=new Array();
var yp=new Array();
var am=new Array();
var sty=new Array();
window.onload=function() { if (document.getElementById) {
var k, f, b;
b=document.createElement("div");
b.style.position="absolute";
b.setAttribute("id", "bod");
document.body.appendChild(b);
set_scroll();
set_width();
for (var i=0; i<flakes; i++) {
dx[i]=0;
am[i]=Math.random()*20;
xp[i]=am[i]+Math.random()*(swide-2*am[i]-25);
yp[i]=Math.random()*shigh;
sty[i]=0.75+1.25*Math.random();
f=document.createElement("div");
f.style.position="absolute";
f.setAttribute("id", "flk"+i);
f.style.zIndex=i;
f.style.top=yp[i]+"px";
f.style.left=xp[i]+"px";
k=document.createElement("img");
k.src=flake_image;
f.appendChild(k);
b.appendChild(f);
}
setInterval("winter_snow()", speed);
}}
window.onresize=set_width;
function set_width() {
if (document.documentElement && document.documentElement.clientWidth) {
swide=document.documentElement.clientWidth;
shigh=document.documentElement.clientHeight;
}
else if (typeof(self.innerHeight)=="number") {
swide=self.innerWidth;
shigh=self.innerHeight;
}
else if (document.body.clientWidth) {
swide=document.body.clientWidth;
shigh=document.body.clientHeight;
}
else {
swide=800;
shigh=600
}
}
window.onscroll=set_scroll;
function set_scroll() {
var sleft, sdown;
if (typeof(self.pageYOffset)=="number") {
sdown=self.pageYOffset;
sleft=self.pageXOffset;
}
else if (document.body.scrollTop || document.body.scrollLeft) {
sdown=document.body.scrollTop;
sleft=document.body.scrollLeft;
}
else if (document.documentElement && (document.documentElement.scrollTop || document.documentElement.scrollLeft)) {
sleft=document.documentElement.scrollLeft;
sdown=document.documentElement.scrollTop;
}
else {
sdown=0;
sleft=0;
}
document.getElementById("bod").style.top=sdown+"px";
document.getElementById("bod").style.left=sleft+"px";
}
function winter_snow() {
for (var i=0; i<flakes; i++) {
yp[i]+=sty[i];
if (yp[i]>shigh-30) {
xp[i]=am[i]+Math.random()*(swide-2*am[i]-25);
yp[i]=0;
sty[i]=0.75+1.25*Math.random();
}
dx[i]+=0.02+Math.random()/10;
document.getElementById("flk"+i).style.top=yp[i]+"px";
document.getElementById("flk"+i).style.left=(xp[i]+am[i]*Math.sin(dx[i]))+"px";
}
}
</script>
Regards,
Very Happy

Shek
Active Poster

Male Posts : 1092
Reputation : 31
Language : Portuguese and English
Location : Brazil

http://www.shiftactif.com/

Back to top Go down

Solved Re: Christmas Javascript Problem

Post by cougar30 on Mon Dec 10, 2012 6:13 am

@Shek wrote:Hello my dear author! Hello

Wow, I'm surprised. Anyway, erase everything! Crying or Very sad Instead of using codes Scripts, use their JS pages. I put the script that I edited for you again, and it worked. I wanted to know one thing, the second script is snow Question

If it is, replace it with this:
Code:
jQuery(function() {
jQuery.getScript("http://illiweb.com/rs4/10/frm/snow.js");
});

Use in Control Panel > Modules > HTML and JavaScript > Create a new Script code >. In "Inestiment", select "All pages".

EDIT: Delete the code
Code:
jQuery(function() {
jQuery.getScript("http://sd-1.archive-host.com/membres/up/37821634957680146/deco/boule22.js");
});
<script type="text/javascript">
var speed=20; // Speed/From the less to the more speed
var flakes=20; // Number of flakes
var flake_image="http://i67.servimg.com/u/f67/15/17/71/53/nuevep10.png"; //URL of the image
var swide, shigh;
var dx=new Array();
var xp=new Array();
var yp=new Array();
var am=new Array();
var sty=new Array();
window.onload=function() { if (document.getElementById) {
var k, f, b;
b=document.createElement("div");
b.style.position="absolute";
b.setAttribute("id", "bod");
document.body.appendChild(b);
set_scroll();
set_width();
for (var i=0; i<flakes; i++) {
dx[i]=0;
am[i]=Math.random()*20;
xp[i]=am[i]+Math.random()*(swide-2*am[i]-25);
yp[i]=Math.random()*shigh;
sty[i]=0.75+1.25*Math.random();
f=document.createElement("div");
f.style.position="absolute";
f.setAttribute("id", "flk"+i);
f.style.zIndex=i;
f.style.top=yp[i]+"px";
f.style.left=xp[i]+"px";
k=document.createElement("img");
k.src=flake_image;
f.appendChild(k);
b.appendChild(f);
}
setInterval("winter_snow()", speed);
}}
window.onresize=set_width;
function set_width() {
if (document.documentElement && document.documentElement.clientWidth) {
swide=document.documentElement.clientWidth;
shigh=document.documentElement.clientHeight;
}
else if (typeof(self.innerHeight)=="number") {
swide=self.innerWidth;
shigh=self.innerHeight;
}
else if (document.body.clientWidth) {
swide=document.body.clientWidth;
shigh=document.body.clientHeight;
}
else {
swide=800;
shigh=600
}
}
window.onscroll=set_scroll;
function set_scroll() {
var sleft, sdown;
if (typeof(self.pageYOffset)=="number") {
sdown=self.pageYOffset;
sleft=self.pageXOffset;
}
else if (document.body.scrollTop || document.body.scrollLeft) {
sdown=document.body.scrollTop;
sleft=document.body.scrollLeft;
}
else if (document.documentElement && (document.documentElement.scrollTop || document.documentElement.scrollLeft)) {
sleft=document.documentElement.scrollLeft;
sdown=document.documentElement.scrollTop;
}
else {
sdown=0;
sleft=0;
}
document.getElementById("bod").style.top=sdown+"px";
document.getElementById("bod").style.left=sleft+"px";
}
function winter_snow() {
for (var i=0; i<flakes; i++) {
yp[i]+=sty[i];
if (yp[i]>shigh-30) {
xp[i]=am[i]+Math.random()*(swide-2*am[i]-25);
yp[i]=0;
sty[i]=0.75+1.25*Math.random();
}
dx[i]+=0.02+Math.random()/10;
document.getElementById("flk"+i).style.top=yp[i]+"px";
document.getElementById("flk"+i).style.left=(xp[i]+am[i]*Math.sin(dx[i]))+"px";
}
}
</script>
Regards,
Very Happy

Thats great! Thankyou so much. It works fine in Firefox, but for whatever reason it isn't in IE. Will have to look into why it isn't working in IE??

Thanks once again

Best Wishes

Andy

cougar30
Forumember

Male Posts : 244
Reputation : 1
Language : English

http://nineelms.freeforum.me.uk/forum

Back to top Go down

Solved Re: Christmas Javascript Problem

Post by Shek on Mon Dec 10, 2012 9:29 am

Hello my dear! Hello

Unfortunately I believe it does not work in IE same. The IE is old, so do not know any code that work for this browser. Sad Sorry.

Regards,
thumright

Shek
Active Poster

Male Posts : 1092
Reputation : 31
Language : Portuguese and English
Location : Brazil

http://www.shiftactif.com/

Back to top Go down

Solved Re: Christmas Javascript Problem

Post by cougar30 on Mon Dec 10, 2012 10:24 am

@Shek wrote:Hello my dear! Hello

Unfortunately I believe it does not work in IE same. The IE is old, so do not know any code that work for this browser. Sad Sorry.

Regards,
thumright

Thanks for the reply. I am using IE V9 and it may appear to be an issue with IE9? Can anyone confirm that this is the case please and if so, is there a fix?
Many Thanks
Andy

cougar30
Forumember

Male Posts : 244
Reputation : 1
Language : English

http://nineelms.freeforum.me.uk/forum

Back to top Go down

Solved Re: Christmas Javascript Problem

Post by cougar30 on Mon Dec 10, 2012 2:22 pm

I have just tested IE 9 and it seems to work okay with the snow and Baubles before I login. But once I login as Administrator of the forum, it doesn't work what so ever.
Does anybody have any ideas please?
Thanks in advance
Andy

cougar30
Forumember

Male Posts : 244
Reputation : 1
Language : English

http://nineelms.freeforum.me.uk/forum

Back to top Go down

Solved Re: Christmas Javascript Problem

Post by SLGray on Mon Dec 10, 2012 2:30 pm

Please don't double/triple post. Your post need to be separated by 24 hours before bumping, replying or adding more information. Please use the edit button instead!

{Second Reminder}


When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.


SLGray
Administrator
Administrator

Male Posts : 35636
Reputation : 2372
Language : English
Location : United States

http://fmthemes.forumotion.com/

Back to top Go down

Solved Re: Christmas Javascript Problem

Post by Shek on Mon Dec 10, 2012 2:39 pm

Hello! Very Happy

Unfortunately I think there is no solution for IE9 because few know it. I myself have not had the opportunity until now to see IE9 and I do not know how it works. silent

Excuse me for my inexperience. Crying or Very sad

Shek
Active Poster

Male Posts : 1092
Reputation : 31
Language : Portuguese and English
Location : Brazil

http://www.shiftactif.com/

Back to top Go down

Solved Re: Christmas Javascript Problem

Post by cougar30 on Mon Dec 10, 2012 4:32 pm

I have just installed IE 10 and this has resolved the problem. This thread can now be locked.
Thanks Shek and apologies slg. It was a moment of posting my findings. I forgot to Edit the post.

cougar30
Forumember

Male Posts : 244
Reputation : 1
Language : English

http://nineelms.freeforum.me.uk/forum

Back to top Go down

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum