hi
i need a script that send a parameter to another site and the site second get the parameter and in a function the parameter add to a value and return it to site first
please help me jow to it do
thanks
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Vahid BakhtiaryPosted Mar 22, 2012, 3:06 AM
i use of this code in site1:
$.ajax({
type: "POST",url: "http://localhost:56751/WebSiteSeconds/Default.aspx?p=2",
success: function (data) {
$("#result").html(data);
}
});
and i use of this code in site 2 :
If (Request.QueryString["p"] !=null)
{
Response.Write("True");
return;
}
else
{
Response.Write("False");
return;
}
it's right,when i use from that code between 2 page in a site evry thing is ok, but when from that code between 2 site ,i can send param and in site 2 ,i can get the param , but i don't get return result
please help me
thanks
SenthilkumarPosted Mar 21, 2012, 11:42 AM
Consider you have two web sites.
www.site1.com
www.site2.com
In the first site, you have to redirect to the second site.
In the javascript, you need to write the following.
function Redirect()
{
window.location.href="www.site2.com/pages/process.html?Name='senthil'";
return false;
}
The above javascript will be executed when click on redirect button in site1.com
In the site2.com, you have to get the url and query string in the page load.
return false;
This will help you to solve.
Suthish NairPosted Mar 21, 2012, 5:32 AM