Local javascript
started by: YuriTYuriT
on: 1207237599|%e %b %Y, %H:%M %Z|agohover
number of posts: 8
rss icon RSS: new posts
summary:
Is it possible to run javascript from your own wikidot?
Local javascript
YuriTYuriT 1207237599|%e %b %Y, %H:%M %Z|agohover

Hi,

I have a need to embed javascript, that I have defined localy in my wikidot. Is it possible?
because now it gives "Sorry, no match for the embedded content." error. As i understood it is only possible
to run javascript from a limited number of predefined sources. Why not locally? Is it possible to allow this feature?

best regards,
YuriT

unfold Local javascript by YuriTYuriT, 1207237599|%e %b %Y, %H:%M %Z|agohover
Re: Local javascript
gerdamigerdami 1207302856|%e %b %Y, %H:%M %Z|agohover

You can upload your javascript as a local file.
[[iframe http://community.wikidot.com/local--files/local:files/HelloWorld.html]] will not work (with Firefox 2) :

… but if you change the file extension to "scrap"…
[[iframe http://community.wikidot.com/local--files/local:files/HelloWorld.scrap]] will give:

last edited on 1207310273|%e %b %Y, %H:%M %Z|agohover by gerdami + show more
unfold Re: Local javascript by gerdamigerdami, 1207302856|%e %b %Y, %H:%M %Z|agohover
Re: Local javascript
Helmuti_pdorfHelmuti_pdorf 1207308219|%e %b %Y, %H:%M %Z|agohover

Here is the script itself:

<html>
<body>
<script type="text/javascript">
document.write("Hello World!");
</script>
</body>
</html>
unfold Re: Local javascript by Helmuti_pdorfHelmuti_pdorf, 1207308219|%e %b %Y, %H:%M %Z|agohover
Re: Local javascript
Helmuti_pdorfHelmuti_pdorf 1207305937|%e %b %Y, %H:%M %Z|agohover

It is intresting - both versions work…

Here is the code ( content) of the two files:

<html>
<body>
<script type="text/javascript">
document.write("Hello World!");
</script>
</body>
</html>
unfold Re: Local javascript by Helmuti_pdorfHelmuti_pdorf, 1207305937|%e %b %Y, %H:%M %Z|agohover
Re: Local javascript
Phil ChettPhil Chett 1207309973|%e %b %Y, %H:%M %Z|agohover

Only gerdami's tweak works in FF. IE7 will do both.
I wonder what happens in IE6?

last edited on 1207824627|%e %b %Y, %H:%M %Z|agohover by gerdami + show more
unfold Re: Local javascript by Phil ChettPhil Chett, 1207309973|%e %b %Y, %H:%M %Z|agohover
Re: Local javascript
gerdamigerdami 1207605488|%e %b %Y, %H:%M %Z|agohover

iframe localfile.htm is rendered by IE6 but not by FF2.
iframe localfile.jvs will be rendered by IE6 and FF2.

unfold Re: Local javascript by gerdamigerdami, 1207605488|%e %b %Y, %H:%M %Z|agohover
Re: Local javascript
thevisitorthevisitor 1210504530|%e %b %Y, %H:%M %Z|agohover

Weird… that fix doesn't work for me. :(

Works in IE6, but not in FF (updated to the last version), or Opera, or even Konqueror.

What is really strange is that this used to work for me a couple days ago. Since there was no change on my side, was anything changed on the server?

unfold Re: Local javascript by thevisitorthevisitor, 1210504530|%e %b %Y, %H:%M %Z|agohover
Re: Local javascript
thevisitorthevisitor 1211113819|%e %b %Y, %H:%M %Z|agohover

And now, the first example from gerdami (with .html) works for me, with Firefox and everything. Woot!

It seems that uploaded files are really saved under an address like http://mywiki.wikidot.com/local--files/my-page/file.html - and that could be a part of the problem.

last edited on 1211114496|%e %b %Y, %H:%M %Z|agohover by thevisitor + show more
unfold Re: Local javascript by thevisitorthevisitor, 1211113819|%e %b %Y, %H:%M %Z|agohover
new post
Unless stated otherwise Content of this page is licensed under Creative Commons Attribution-Share Alike 2.5 License.