PDA

View Full Version : Content Widgets on Blogger


Div
28-10-08, 21:00
I've created my first widgets and tried to integrate them to my blog (hosted on Blogger).

This looks like it shouldn't be difficult:

Create an HTML/JavaScript page element, paste in the code, and away we go.

In practice, while there are no errors, there is also nothing displayed.

The code works fine when tested in a stand alone web page, and I have other pieces of JavaScript in my blog which also work fine.

Is there some sort of issue with widgets in Blogger? Possibly related to the fact the code is held in a .js file?

CaptainFalcon
29-10-08, 10:25
I dont know of any problems with Blogger but that said, can honestly say i have never used it.

Maybe provide a link?

Amoochi
29-10-08, 12:05
Have you asked on the Blogger support site/forum? I'd pretty much guarantee this is something their end not AW's end. Hundreds if not thousands of people use the widgets without a single problem. Either that, or you've badly coded something, not closing a tag or something like that and thus stopping the code from displaying.

If it's anything like using smarty, it may require a bit of special code to display scripting like this.

It's pretty hard to tell though really, my crystal ball is having an off day. AKA... How about giving us a link to the page you've put the widget on, so we can actually see what is going on. It makes helping a damn sight easier and takes away the need for guessing.

Div
29-10-08, 21:24
Thanks for the replies. My sites is:

http://pokerdiv.blogspot.com

At the bottom of the left column you should see a section titled 'Example For Shop Window Forum'. This is an HTML/JavaScript Blogger widget.

Inside that is the following snippet (pasted directly from Afiiliate Window)

<script src="http://www.awin1.com/wshow.js?s=124324"></script>

As you will see, nothing appears.

Andy
30-10-08, 15:41
Nothing happens with that widget code on a blank hmtl file on my server. that's the code taken from above and taken from the source of your page.

i would say its the widget itself. try rebuilding it.

Amoochi
30-10-08, 16:19
Nothing happens with that widget code on a blank hmtl file on my server. that's the code taken from above and taken from the source of your page.

i would say its the widget itself. try rebuilding it.

Just checked on that as well and concur and verify doubly with what Andy has said. Nothing showing from the widget itself, it came up blank, like there was no widget at all even saved.

Div
30-10-08, 22:54
Hmmm it had worked fine in a test page on my local PC, so I uploaded the page to a webserver, and get this....



edit:

then I added a newly created widget to both pages. It works fine in test but not on Blogger.

Ho hum I guess its likely something about how Blogger handles .js files.

Thanks for the assistance. Much appreciated.

Amoochi
31-10-08, 01:40
Looking at your page, it's spitting out a javascript error, saying it's expecting a ; on line 1447 character 93 i'd say that's gotta be worth checking out. One script error is definately going to have a ripple effect on other code.

Regarding your test working fine for you, but not showing for me, I did figure out, while doing some tests on it myself, that a test page without the <body> tags wrapped around the widget code shows up blank, so the widget needs the <body> tags to work properly for a starter, completely irrelevent to the actual issue your getting i'd presume though, as your page has <body> tags as I checked.

Div
31-10-08, 22:41
Looking at your page, it's spitting out a javascript error, saying it's expecting a ; on line 1447 character 93 i'd say that's gotta be worth checking out. One script error is definately going to have a ripple effect on other code.

Regarding your test working fine for you, but not showing for me, I did figure out, while doing some tests on it myself, that a test page without the <body> tags wrapped around the widget code shows up blank, so the widget needs the <body> tags to work properly for a starter, completely irrelevent to the actual issue your getting i'd presume though, as your page has <body> tags as I checked.


Amoochi thanks for the help. I figured out the JS error that you spotted but even with this resolved it's still not working.

I'm going to give up for now, but I do appreciate the assistance offered :)