0

Connection Using cuurent href

Hello all,
I am trying to get a connection function together that will take the value of the href attribute of the a tag. This is to populate a div named 'ajaxContent' with the html file in the href attribute.

My java script:
CODE
var ajaxDiv = document.getElementById('ajaxContent');
function displayUtilPages_success_handler(o) {
ajaxDiv.innerHTML = o.responseText;
}

function displayUtilPages_failure_handler(o) {
ajaxDiv.innerHTML = 'Server or your connection is dead';
}
function send_utilityNavRequest(sUrl) {

var displayUtilPagescallback = {
success:displayUtilPages_success_handler,
failure:displayUtilPages_failure_handler,
timeout: 10000
};

YAHOO.util.Connect.asyncRequest('GET', sUrl, utilityNavcallback);
}

I am new to Ajax and javascript so it may be something very simple I am missing.
Thanx in advance!

by
1 Reply

Recent Posts

in General Discussion at YDN