how to call php/ajax page from asp
Let me start off by saying that what i'm trying to do might not be the best way to do things... but ??
I need to display the contents of a php page in my asp page. The php stuff is maintained by another department.
i'm using asp's http web request object to get the rendered PHP page (all html) and i'm able to display it in a separate frame, no problem. But, the php page includes some logic that I can't seem to get to work from within my frame.
The idea is that when you click on a hyperlink in the main php page that i've embedded (i'll call this page PHP Page 1), it will send a tag value to php page 2.
PHP page 2 returns a success/fail ret value which is displayed in php page 1, without have to post back to the server or refresh the page. The ret value just "shows up" via ajax logic. (PHP Page 1 is using jquery.js)
My problem is that from the frame within my ASP page, I can't get it send the code properly to PHP Page 2...
Here's what PHP Page 1 looks like in part:
"myfunction", in part, looks like this:
<div id="target22"> </div>
<a href="#" onclick="myfunction('22')">22</a>
WHAT I'VE DONE SO FAR
$("#target", + tagID).load("phpPage2.php?tagVal=" + tagID);
I've modified function so that php page 2 includes a full path for the file.
eg: http://server1/Page2.php?tagVal= etc...
I've also tried changing the href in the hyperlink from:
<a href="#" onclick="myfunction('22')">22</a>to
<a href="http://serverA/Page1.php#" onclick="myfunction('22')">22</a>
I've also tried adding a copy of jquery.js into my web folder.
But call to page2.php is not successful. I know it's not working because when I launch page1.php in a separate browser, it doesn't show any return value at all -meaning that page2.php wasn't ever called.
I guess I need to know if this is even possible. I assumed it was because although I'm using an ASP page, by the time PHP page 2 is called by PHP 1, it's really just being called by an HTML page.