I got the basic understanding of AJAX down, but I am not sure if there is a way to just use it to read a DOM and send the information back to be used on a page…
In my specific case, links to news stories are being stored in my database, and I am trying to get the text between <a href> and </a> to be populated with the actual title of the story.
Any ideas? Thanks
First of all, you’ll need a proxy on your own server, because cross-domain requests are usually not allowed. A simple proxy would just echo the page to you, but for efficiency, it really should use something like regular expressions to simply return the page’s title, which is what you want. For example, in PHP:
It’s easy to use – just send a simple GET Ajax request to the script with a
newspageparameter, and put the result into the link.