You need to sign in to do that
Don't have an account?
Madhu
Domain
hai
i need to pass the values from child to parent by using "window.returnValue"(this is working fine if both pages are in same domain).but my problem is if its different(webservers) ,the values are not passed to the parent window.iam sending my code also pls any one modify and reply me .
1.parent.html
<html>
<head>
<title>Parent document</title>
<script type="text/javascript">
var vTestData, vRv ;
<head>
<title>Parent document</title>
<script type="text/javascript">
var vTestData, vRv ;
vTestData = "I am a rock" ;
function fnShowModal()
{
vRv = window.showModalDialog("child1.html", window.self, "") ;
}
{
vRv = window.showModalDialog("child1.html", window.self, "") ;
}
function fnShowValue()
{
alert("vTestData = [" + vTestData + "]\nvRv = [" + vRv + "]") ;
}
{
alert("vTestData = [" + vTestData + "]\nvRv = [" + vRv + "]") ;
}
fnShowValue() ; // The original value and an undefined return value
fnShowModal() ; // Pop the modal
fnShowValue() ; // The modified value and the return value
fnShowModal() ; // Pop the modal
fnShowValue() ; // The modified value and the return value
</script>
</head>
</html>
</head>
</html>
2.child.html
<html>
<head>
<base target=_self>
<title>Modal Dialog</title>
<script type="text/javascript">
function invoke1()
{
//alert( dialogArguments.vTestData);
// dialogArguments.vTestData += ", I am an island" ;
parent.window.returnValue = "yellaiah" ; // optional
window.close();
}
</script>
</head>
<body>
<input type="button" onclick="invoke1();">
</body>
</html>
<head>
<base target=_self>
<title>Modal Dialog</title>
<script type="text/javascript">
function invoke1()
{
//alert( dialogArguments.vTestData);
// dialogArguments.vTestData += ", I am an island" ;
parent.window.returnValue = "yellaiah" ; // optional
window.close();
}
</script>
</head>
<body>
<input type="button" onclick="invoke1();">
</body>
</html>
how can we run from different servers or domains?
pls give me fast reply.
Regards
madhu
Execute EZSAAS
Fast reply - That is a security feature built into JavaScript - cross domain restriction. Both web servers must have atleast a 'common domain' e.g. web.yoursite.com and news.yoursite.com will work.