Wordpress Themes - WP Forum at BFA
Click here to register or to donate.
Auto self-registration is not available here - far too many spammers. This forum has many, many backlinks and because of that there is an intense desire among spammers to drop their links here.

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme » Plugins & Atahualpa »

[SOLVED] Any idea how to put java script into sidebar text widget?

Old Jan 24, 2011, 03:33 PM
Innocent's Avatar
92 posts · Jan 2011
WP 3.4.2 Atahualpa 3.7.9
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!
Old Jan 24, 2011, 06:03 PM
juggledad's Avatar
23,743 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
add a text widget to the sidebar
add the code to the text widget
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
Old Jan 25, 2011, 04:18 AM
Innocent's Avatar
92 posts · Jan 2011
WP 3.4.2 Atahualpa 3.7.9
I tried that, it's not showing.
Look, the widget is called 'java' in left sidebar.
Old Jan 25, 2011, 05:10 AM
64 posts · Jun 2010
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?
Old Jan 25, 2011, 05:13 AM
Innocent's Avatar
92 posts · Jan 2011
WP 3.4.2 Atahualpa 3.7.9
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.
Old Jan 25, 2011, 05:55 AM
64 posts · Jun 2010
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.
Old Jan 25, 2011, 05:58 AM
Innocent's Avatar
92 posts · Jan 2011
WP 3.4.2 Atahualpa 3.7.9
I put acac1.js in wp-content/uploads.
Old Jan 25, 2011, 06:25 AM
64 posts · Jun 2010
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;


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;


Last edited by GarethP; Jan 25, 2011 at 06:50 AM. Reason: update following extra investigation
Old Jan 25, 2011, 07:09 AM
Innocent's Avatar
92 posts · Jan 2011
WP 3.4.2 Atahualpa 3.7.9
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


accordion menu, java script, sidebar

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
Thread Thread Starter Forum Replies Last Post
where to put clickheat script? Zed Center area post/pages 0 Aug 27, 2010 04:28 PM
Calling an external java script sparksmex Plugins & Atahualpa 1 Nov 26, 2009 05:04 PM
Java Script ldsmedia Header configuration & styling 2 Jul 26, 2009 09:31 AM
Atahualpa theme java script problem adventoutpost Header configuration & styling 7 May 2, 2009 01:28 PM
[SOLVED] Inserting Java (video) script so it stays in the middle column....help UmpireBugsy Atahualpa 3 Wordpress theme 2 Feb 12, 2009 08:47 PM

All times are GMT -6. The time now is 03:34 AM.

Powered by vBulletin® Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.