Inserting javascript Posted by rayhne 27 Jul 2006 13:28 UTC Someone sent me a javascript program to use on my site. Is there any way for me to insert it?
Posted by luci 27 Jul 2006 16:27 UTC > Someone sent me a javascript program to use on my site. Is there any way for me to insert it? yup, use JS wiki plugin ( see http://mods.tikiwiki.org/ )
Posted by rayhne 27 Jul 2006 18:40 UTC > > Someone sent me a javascript program to use on my site. Is there any way for me to insert it? > > yup, use JS wiki plugin ( see http://mods.tikiwiki.org/ ) Thanks. I'll have to hand-install it tonight. For some reason, I get errors when I try doing it using the Mods Admin page.
Posted by rayhne 27 Jul 2006 23:51 UTC > > > Someone sent me a javascript program to use on my site. Is there any way for me to insert it? > > > > yup, use JS wiki plugin ( see http://mods.tikiwiki.org/ ) > > Thanks. I'll have to hand-install it tonight. For some reason, I get errors when I try doing it using the Mods Admin page. Okay, I think I have it installed but how do you use it. There's no instructions or anything.
Posted by Gary Cunningham-Lee 28 Jul 2006 00:54 UTC > Okay, I think I have it installed but how do you use it. There's no instructions or anything. See PluginJS (search is your friend 😉 ). Looks like you can either enclose the javascript itself with the plugin (as data) or point to the location of the js file (as a parameter). -- Gary - zukakakina.com
Posted by rayhne 28 Jul 2006 13:01 UTC > > > Okay, I think I have it installed but how do you use it. There's no instructions or anything. > > See PluginJS (search is your friend 😉 ). Looks like you can either enclose the javascript itself with the plugin (as data) or point to the location of the js file (as a parameter). > > — Gary - zukakakina.com Be nice if the instructions were clearer.... I tried one and got this error: WARNING: No such module JS! How can I tell if this module is installed and if it isn't, how can I install it?
Posted by Gary Cunningham-Lee 29 Jul 2006 11:32 UTC > How can I tell if this module is installed and if it isn't, how can I install it? That error message indicates that the module isn't installed. But the JS plugin doesn't use a module. You simply put the plugin syntax in the page, as shown in the examples on the PluginJS page — either point to the javascript file or enclose the complete script within the plugin itself. This plugin only works for scripts that don't have a component that goes in the head section of the web page. If the script you were given can go in the body if the page and no part needs to go in the head section, then the plugin should work. Otherwise, you have to edit the header.tpl file. -- Gary
Posted by rayhne 30 Jul 2006 21:11 UTC > Someone sent me a javascript program to use on my site. Is there any way for me to insert it? I did just insert what it said with the appropriate changes and I stil get that error.
Posted by Gary Cunningham-Lee 31 Jul 2006 01:27 UTC > Someone sent me a javascript program to use on my site. Is there any way for me to insert it? Can you be more specific? What javascript is involved? What does you complete plugin code look like, with the javascript? Please post it or give a link. Without knowing the specific details, it's hard to know what might be going wrong. -- Gary
Posted by rayhne 05 Aug 2006 22:13 UTC Here is the javascript I want to use: var ebayscroll = { query: 'Michael Ironside', width: 300, height: 250 }
Posted by Gary Cunningham-Lee 07 Aug 2006 01:52 UTC Putting that it the JS plugin produces this in the page (Javascript angle brackets replaced here with parentheses for viewing purposes): Copy to clipboard(script type="text/javascript")var ebayscroll = { query: 'Michael Ironside', width: 300, height: 250 }(/script) When I tested it, the page displays without errors (note that no module is involved, the JS plugin goes directly in the wiki page, and the javascript is its data). But it doesn't do anything, either. It only specifies a variable; there's no statement/command. The problem here doesn't seem to be Tiki. Trying your javascript in an ordinary HTML page would probably have the same result. -- Gary - zukakakina.com