View Full Version : Setting META Keywords using Spry

04-30-2010, 10:41 AM
Hi all

My first post so please be gentle...

I've manage to set my HTML page-title using external XML with this code:

<script type="text/javascript">
var dsHomepage = new Spry.Data.XMLDataSet("home.xml", "HomePage/title");

<script src="Scripts/gallery.js" type="text/javascript"></script>
<script type="text/javascript">
onPostLoad:function(ds, data){
var row = ds.getCurrentRow();
document.title = row.title;

and this XML:
<?xml version='1.0' encoding='UTF-8'?>
<title>My Page Title</title>

...and it works great. However, I would like to know if it's possible to set the KEYWORDS (or any META data) using XML too?

And if so, can someone please show me how!

Thanks in anticipation :)

05-04-2010, 10:43 AM

...Is this a good forum to post in or is there a better one somewhere?

05-05-2010, 09:19 AM
sorry not sure what you are trying to achieve here , can you elaborate?

05-05-2010, 10:46 AM
Well basically, I'm setting up a website for a client using CMS based on an XML structure, and I'd like the client to be able to set the keywords for the page in the XML.

Just as they can with the document title in the code above.

05-05-2010, 02:35 PM
You can access it through the DOM