[SOLVED] Any idea how to put java script into sidebar text widget?
I would like to have a menu and have generated a code that goes like this:
<script src="acac1.js" type="text/javascript"></script><!-- Accordion Script by Gokhan Dagli --><script>ac1init_doc('',1);</script> I don't have a clue what to insert into my WP content or code to make it visible or is it even possible. Please, help! |
add a text widget to the sidebar
add the code to the text widget |
I tried that, it's not showing.
Look, the widget is called 'java' in left sidebar. http://kteis.com/shop/ |
looking at the source I see
<script type="text/javascript"><script src="acac1.js" type="text/javascript"></script> do you need to better define the location of the acac1.js script? |
Yes, probably, thanks for looking!
I don't know how to do that. Where should I store it? I am totally inexperienced with this, so all info is welcome. |
Where do you have it stored now?
I would probably go for a sub-folder under wp-content. That's generally safe form any future WordPress core updates. |
I put acac1.js in wp-content/uploads.
|
I've done some investigation about the javascript Accordion Menu you are using and...
OK assuming you have WordPress installed in the www root then I think the first part of your script should be something like; <script src="/wp-content/uploads/acac1.js" type="text/javascript"></script> you then have this as the second part; <script>/wp-content/uploads/ac1init_doc('',1);</script> Now I believe that between the two '' there should be a folder name which contains the graphics for the menu Assuming your images are in the menu_images folder I think it should be something like; <script>/wp-content/uploads/ac1init_doc('/wp-content/uploads/menu_images/',1);</script> |
Thank you so much for your time and effort, I didn't get it to work completely, but I understood how java works in widgets and I am planing to use different application anyway :p
|
All times are GMT -6. The time now is 11:09 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.