Have a look at jQuery, it has a lot of features that you could also use in the future of your site.
How can I pull data from another page
or file anyways?
using jQuery:
$.getJSON('ajax/test.json', function(data) {
var items = [];
$.each(data, function(key, val) {
items.push('<li id="' + key + '">' + val + '</li>');
});
$('<ul/>', {
'class': 'my-new-list',
html: items.join('')
}).appendTo('body');
});
non JSON approch
$.get('ajax/test.html', function(data) {
$('.result').html(data);
alert('Load was performed.');
});
the 1st param would be the file you want to load, or get the context from,
secondly we pass in a function that would alert that the data was loaded, you can easily change this function to do what you want and display the data that was returned.
Query also offer a lot of documentation so whenever you're stuck just take a look at:
http://api.jquery.com/jQuery.getJSON/
http://api.jquery.com/category/ajax/
In what format should the data be supplied?
I would suggest JSON, just because it works so easily and isn't as bloated as other structures. if you haven't worked with JSON before, checkout: http://www.json.org/js.html
but a simple JSON structure would be:
{
"one": "Singular sensation",
"two": "Beady little eyes",
"three": "Little birds pitch by my doorstep"
}
Is there an existing script that I could start of?
jQuery should be more than enough: http://jquery.com/