Skip to main content
Topic: javascript in portal blocks (Read 2108 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

javascript in portal blocks

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>

Re: javascript in portal blocks

Reply #1

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)?
~ SimplePortal Support Team ~

Re: javascript in portal blocks

Reply #2

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?

Re: javascript in portal blocks

Reply #3

Right click anywhere, inspect element. Then you should see a space dedicated to errors (if any) that is generally at the bottom.
~ SimplePortal Support Team ~

Re: javascript in portal blocks

Reply #4

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?
Bugs creator.
Features destroyer.
Template killer.

Re: javascript in portal blocks

Reply #5

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.

Re: javascript in portal blocks

Reply #6

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.

Re: javascript in portal blocks

Reply #7

Ohh... okay, I didn't try the preview. xD
Bugs creator.
Features destroyer.
Template killer.

Re: javascript in portal blocks

Reply #8

 :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.

Re: javascript in portal blocks

Reply #9

I guess it should work, yes. But...

 emanuele runs! :P
Bugs creator.
Features destroyer.
Template killer.