PDA

View Full Version : javascript problems


eddysu
12-21-2008, 03:29 PM
I can't add any javascript widgets into evolution theme sidebar.
please help

Kevin
12-21-2008, 05:12 PM
Hi Eddy,

You shouldn't have any problems with this. What javascript are you trying to add.

Remember, with javascript you sometimes have to include some code in the head of the page as well.

Post more information about what you are trying to add and we will see if we can help you :)

Thanks,
Kevin

eddysu
12-22-2008, 09:19 PM
which type of code should i add to the head?

I tried to add widgets like mybloglog to the sidebar.

As i load the main page it went fine, but when it finished loading it somehow stopped and only the widget is seen. Any idea?

sarahG
12-22-2008, 10:11 PM
I've checked your eddysu.com site and the site and sidebar widgets are loading fine to me. There are no JS errors either.

Have you fixed the problem or can you post up a screen shot of your problem to point out where the issue lies.

eddysu
12-23-2008, 09:19 PM
I've actually heard an advice from a friend who asked me to input the js code directly into the sidebar.php coding, did that and it went well.

somehow the normal way by inserting the js through wordpress->design-> widgets ended in errors

by the way, the problem i mentioned earlier happens on mozilla only, it loaded well on ie.

sorry for the trouble, still new to this

uploaded a screenshot of it.

http://i248.photobucket.com/albums/gg186/eddysu/eddysu.jpg

thanks

Kevin
12-23-2008, 09:58 PM
Feedjit seems to be causing this. The page loads fine and then a second later it comes up with that error page. The page never stopped loading data from the feedjit site.

I'd consider removing it til they tell you what is wrong. Perhaps you should remove it for now and test it on a test blog and email the test blog url to the feedjit admin for them to look at.

eddysu
12-24-2008, 07:57 AM
i did the same with other js widgets such as entrecard and mybloglog, the same thing happened. it loaded well with ie but not mozilla.

could the problem be my wordpress version not updated? or the template itself?

sarahG
12-24-2008, 06:59 PM
Well you're on version 2.6 so an upgrade is very much recommended regardless.

The problem is that the theme has JS targeting the widget class and so JS inside of these widgets stop working. IE ignores this issue whereas Firefox doesn't.

If you look through previous threads in this forum about JS issues eg. with AdSense, you'll find various code fixes on how to remove the target JS from theme.js and do it manually, then your JS based widgets should work.

eddysu
12-24-2008, 10:11 PM
i'm sorry but i'm finding a hard time looking for the thread, could you help me on that? a link maybe?

ap4a
12-25-2008, 01:03 AM
It's currently just 11 threads below this one.
http://www.bloggingtips.com/forums/showthread.php?t=751

eddysu
12-25-2008, 09:52 PM
thanks for the info.

$(".widget").wrap("<div class='widget_c'>" + "</div>");
$(".widget_c").append("<div class='widget_b'></div>");

this are the 2 lines i have in my theme.js , so which do i remove?

eddysu
01-02-2009, 10:12 PM
i'm sorry, can anyone answer my previous question? which do i remove to make my javascript widgets work on the sidebar?


$(".widget").wrap("<div class='widget_c'>" + "</div>");
$(".widget_c").append("<div class='widget_b'></div>");

this are the 2 lines i have in my theme.js , so which do i remove?

sarahG
01-02-2009, 11:13 PM
Both of those lines should be commented out, as they're both to do with the widget classes.