ElkArte Community

Title: javascript in portal blocks
Post by: Ruth on May 30, 2016, 04:59:36 pm
Hello!

We had always two custom blocks in portal with some javascript in there, a countdown for christmas ;)  and a clock from here: www.clocklink.com

They are offering me three different codes there for a clock, but none of them will work. I will see nothing with this codes. I don't understand, why? :-\  Maybe I miss something to do? Or are such codes not working with ElkArte?

I show you the codes:

Code: [Select]
<script src="http://www.clocklink.com/embed.js"></script> <script type="text/javascript" language="JavaScript">obj=new Object;obj.clockfile="0001-blue.swf";obj.TimeZone="CET"; obj.width=150;obj.height=150;obj.wmode="transparent";showClock(obj);</script>

or:
Code: [Select]
<embed src="http://www.clocklink.com/clocks/0001-blue.swf?TimeZone=CET" width="150" height="150" wmode="transparent" type="application/x-shockwave-flash">

or:
Code: [Select]
<iframe scrolling="no" frameborder="no" clocktype="html5" style="overflow:hidden;border:0;margin:0;padding:0;width:100px;height:100px;"src="http://www.clocklink.com/html5embed.php?clock=005&timezone=CET&color=blue&size=100&Title=&Message=&Target=&From=2016,1,1,0,0,0&Color=blue"></iframe>
Title: Re: javascript in portal blocks
Post by: Flavio93Zena on May 30, 2016, 05:06:20 pm
Are you using https on your site or simple http?
Are you placing them into an "html" block?
Does your browser console report any error (it should be)?
Title: Re: javascript in portal blocks
Post by: Ruth on May 30, 2016, 05:13:44 pm
It is http, Flavio, and I was using a html block for the codes.

QuoteDoes your browser console report any error (it should be)?

No...but I am not sure about this. Where can I see such an error?
Title: Re: javascript in portal blocks
Post by: Flavio93Zena on May 30, 2016, 05:54:20 pm
Right click anywhere, inspect element. Then you should see a space dedicated to errors (if any) that is generally at the bottom.
Title: Re: javascript in portal blocks
Post by: emanuele on May 30, 2016, 06:04:52 pm
http://www.elkarte.it/community/index.php
I just copy&pasted the three codes you provided, I see all of them.

Can we see live at your site?
Title: Re: javascript in portal blocks
Post by: Ruth on May 30, 2016, 06:09:46 pm
I just used the preview until now, did not create a new block, because the codes seemed not to work.

I will do this now.
Title: Re: javascript in portal blocks
Post by: Ruth on May 30, 2016, 06:15:30 pm
How funny! The clock is there now!  :) ...but it is not shown in the preview, so I thought the codes would not work.

It was the same with other javascript-stuff...so I did not use it.
Title: Re: javascript in portal blocks
Post by: emanuele on May 30, 2016, 06:29:06 pm
Ohh... okay, I didn't try the preview. xD
Title: Re: javascript in portal blocks
Post by: Ruth on May 30, 2016, 06:40:15 pm
 :D  Sometimes I feel so stupid, emanuele...

But the preview should work, shoudn't it? It is a bit (don't know an english word for it) "not-comfortable", if there is no preview, while you create a new block.
Title: Re: javascript in portal blocks
Post by: emanuele on May 30, 2016, 06:44:19 pm
I guess it should work, yes. But...

/me runs! :P