function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
MadhuMadhu 

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 ;
      vTestData = "I am a rock" ;
      function fnShowModal()
      {
        vRv = window.showModalDialog("child1.html", window.self, "") ;
      }
      function fnShowValue()
      {
        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
    </script>
  </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>
 
 
how can we run from different servers or domains?
pls give me fast reply.
 
Regards
madhu
 
 
Execute EZSAASExecute 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.