Hi,
What I have:
I have a link on one site say “click me” (which is my own code)
What I want:
when user click on this link : a new site will open in a window
I want to populate a message in this site’s text box (this site is any general site[which is not my code])
What I tryied:
temp1.html
……………
<html>
<head>
<script language=”javascript”>
function openWindow(){
var newWin = window.open(“temp2.html”, “newWin”);
alert(“success”);
newWin.document.getElementById(“fName”).value=document.getElementById(“txt1”).value;
}
</script>
</head>
<body>
<input type=”text” name=”txt” id=”txt1″/>
<a href=”#” target=”_blank” onClick=”javascript:openWindow(); return false;”>Click Me</a>
</body>
</html>
temp2.html
…………….
<html>
<body>
<form name=”myForm” method=”post”>
<input type=”text” name=”firstName” id=”fName” value=”Juyal” />
<input name=”ln” type=”text” name=”lastName” id=”lName” />
</form>
</body>
</html>
Result: this is working fine
……………………………………………………….
My Problem:
But when I am using any othe general site[which is not my code]) it do not work.
Can you please provide me the modified code, which can work for any site.
Thanks
Happy Java.