Wordpress Themes - WP Forum at BFA
There will be no more development for Atahualpa (or any other theme), and no support. Also no new registrations. I turned off the donation system. I may turn the forum to read only if it gets abused for spam. Unfortunately I have no time for the forum or the themes. Thanks a lot to the people who helped in all these years, especially Larry and of course: Paul. Take care and stay healthy -- Flynn, Atahualpa developer, Sep 2021

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?


  #1  
Old Jan 24, 2011, 03:33 PM
Innocent's Avatar
Innocent
 
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!
  #2  
Old Jan 24, 2011, 06:03 PM
juggledad's Avatar
juggledad
 
23,765 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
  #3  
Old Jan 25, 2011, 04:18 AM
Innocent's Avatar
Innocent
 
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.
http://kteis.com/shop/
  #4  
Old Jan 25, 2011, 05:10 AM
GarethP
 
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?
  #5  
Old Jan 25, 2011, 05:13 AM
Innocent's Avatar
Innocent
 
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.
  #6  
Old Jan 25, 2011, 05:55 AM
GarethP
 
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.
  #7  
Old Jan 25, 2011, 05:58 AM
Innocent's Avatar
Innocent
 
92 posts · Jan 2011
WP 3.4.2 Atahualpa 3.7.9
I put acac1.js in wp-content/uploads.
  #8  
Old Jan 25, 2011, 06:25 AM
GarethP
 
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;

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

Last edited by GarethP; Jan 25, 2011 at 06:50 AM. Reason: update following extra investigation
  #9  
Old Jan 25, 2011, 07:09 AM
Innocent's Avatar
Innocent
 
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

Bookmarks

Tags
accordion menu, java script, sidebar



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 04:13 PM.


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