اعذرنى لم اتمكن من تحميل الملف بالمرفقات
index.html
كود PHP:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>JavaScript</title>
<style>
.title{
width:200px;
height:150px;
}
</style>
<script type="text/javascript">
function next()
{
var opn=window.open("url.htm",'',"width=200, height=200");
}
</script>
</head>
<body>
<input type="button" value="open anther page" onclick="next()"/><br/>
<textarea name="TextArea1" id="TextArea1" style="width: 360px; height: 105px"></textarea>
</body>
</html>
url.html
كود PHP:
<script type="text/javascript">
function submitValueBack(){
window.opener.document.getElementById("TextArea1").value = document.getElementById("url").value;
window.close();
}
</script>
<form method="post"name="tur" onsubmit="submitValueBack()">
<input name="url" type="text" id="url"><br>
<input name="Submit1" id="Submit1" type="submit" value="ارسال قيمة الي حقل textarea" onclick="submitValueBack();"></form>