PDA

View Full Version : view request url sent via ajax??


php_techy
07-06-2010, 07:20 AM
Hi,
Excuse me if similar issue has been posted earlier.
Am using ajax, calling url

function getFeedWithComments(table,feed_id_1,page,cpage,hashval){
url = 'file1.php?action=feeds_comments&output=xml&table='+table+'&feed_id='+feed_id_1+'&page='+page+'&comment_page='+cpage;
if(hashval){
url+= '&hashval=f'+hashval+'_c';
}
createXHR();
sendRequest(url);
}

I can get the url called by either putting alert OR using live http headers but my client is not a savvy.

I want him to view the current request url sent but how??
What will be the easiest way for this?

Thanks in advance.
Regards

Rowsdower!
07-06-2010, 08:32 PM
Hi,
Excuse me if similar issue has been posted earlier.
Am using ajax, calling url

function getFeedWithComments(table,feed_id_1,page,cpage,hashval){
url = 'file1.php?action=feeds_comments&output=xml&table='+table+'&feed_id='+feed_id_1+'&page='+page+'&comment_page='+cpage;
if(hashval){
url+= '&hashval=f'+hashval+'_c';
}
createXHR();
sendRequest(url);
}

I can get the url called by either putting alert OR using live http headers but my client is not a savvy.

I want him to view the current request url sent but how??
What will be the easiest way for this?

Thanks in advance.
Regards

I'm confused. Why would an alert not work? That shouldn't take much savvy from the user. I'm not trying to be rude, but we need to know what makes that too technical before we can suggest other options - because an alert is about as easy as it gets.

Other ideas:

Create a block on the page that displays the last URL called by the script. This just takes a call to something like document.getElementById('id_here').innerHTML=url; and you're done (once you have put an element in the page with an id of "id_here" or whatever you choose to name it). Then you just AJAX load the content as usual.
Before loading the content, set the page to display the url only. Then use a setTimeout call to delay the url call. During that span of delay time the user can see the url being requested.


Give us some idea of what is too complicated for the user.