Digital Point Forums
iKobo

Go Back   Digital Point Forums > Design & Development > Programming > JavaScript
Google Analytics
Log In to view
your analytics

Reply
 
Thread Tools
  #1  
Old Aug 3rd 2005, 6:39 am
fcmisc's Avatar
fcmisc fcmisc is offline
Twilight Vanquisher
 
Join Date: Jun 2005
Posts: 638
fcmisc is on a distinguished road
Getting the pubID from XML and placing it into the adsense javascript code using XSL

Hi,

I'm writing a new site. The content is all in XML and I'm formatting it with XSL. What I'd like to do is to have different adsense pub ID's for different pages, so that I can put an author's adsense ID on a page that they've written.

However, I don't know how to get the adsense ID ,from an XML node, into the javascript variable that's used by the adsense code.

Does anyone know how to do this?

Thanks,

fcmisc.
Reply With Quote
  #2  
Old Aug 3rd 2005, 8:24 am
anotherchancetosee anotherchancetosee is offline
Grunt
 
Join Date: May 2005
Posts: 53
anotherchancetosee is on a distinguished road
Wouldn't you be able to write out a CDATA section with the XSL transformation and drop it in where appropriate? Are you doing the transform server or client side?
__________________
Endangered Animals News - Another Chance To See
The latest news on the endangered animals visited by Douglas Adams - The Hitchhiker's Guide To The Galaxy - for his book Last Chance To See.
Reply With Quote
  #3  
Old Aug 3rd 2005, 2:23 pm
fcmisc's Avatar
fcmisc fcmisc is offline
Twilight Vanquisher
 
Join Date: Jun 2005
Posts: 638
fcmisc is on a distinguished road
Thanks for the tip. I'll look up that CDATA tomorrow as it's getting late.

I'm not sure whether or not to do the transform on the client or server. I've tried sticking adsense into a crude template. But it doesn't work in IE unless I pull out the <!-- and -->. But if I do that the whole page is blank in Netscape.

ARRRGGGHHHH!!!

I am therefore starting to lean towards server side transforms.
Reply With Quote
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
XML/XSL sites into google RZ-1 Search Engine Optimization 2 Aug 28th 2006 12:51 am
Sitemap Stylesheet (XSL) J.D. Google Sitemaps 5 Aug 20th 2005 8:54 am
Should I use XML/XSL for my new site? fcmisc Search Engine Optimization 2 Aug 1st 2005 1:22 pm
Placing AdSense on a page you're selling products on GADOOD AdSense 6 Jul 27th 2005 11:22 pm
Placing adsense into my script TheWebJunkie Placement / Reviews / Examples 20 Mar 16th 2005 4:26 pm


All times are GMT -8. The time now is 8:41 pm.