Originally it was like this and it worked until the crawlers no longer supported it, and even the return No. after the click I got there:
<scriptlanguage="JavaScript"type="text/javascript">var retVal=""var valReturned;function openModal(){
retVal=showModalDialog('stranky/modal.php');
valReturned=retVal;
document.getElementById("zakaznik").value=valReturned;}</script>
<td><inputid="zakaznik"type="text"name="zakaznik"value="'.$_POST["zakaznik"].'"> <inputclass="odeslat"type="button"name="vybrat"value="Vybrat"onClick="openModal()"></td>
In the modal window it clicked only this way and it worked and it works even in the historical version of the web browser to this day, but new browsers do not open it anymore:
<td><ahref="#"onclick="returnValue='.$data["id"].';window.close();">'.$data["id"].'</a></td>
Unfortunately, I can not modify it to work in new browsers, and therefore please advice: just click on a value and it transferred and the window clicked the value itself closed.
So I wanted to modify it somehow and use this:
<scriptlanguage="JavaScript"type="text/javascript">
var retVal=""
var valReturned;
function openModal() {
retVal = window.open("stranky/modal.php", "_blank", "width=950,height=600");
valReturned=retVal;
document.getElementById("zakaznik").value=valReturned;
//alert('The following text has been returned: "'+valReturned+'"');
}
<tr><td>Zákazník:</td><td><inputid="zakaznik"type="text"name="zakaznik"value=""> <inputclass="odeslat"type="button"name="vybrat"value="Vybrat"onclick="openModal()"></td></tr>
in popup window (modal.php) I have this:
<td><ahref="#"onclick="returnValue='.$data["id"].';window.close();">'.$data["id"].'</a></td>
window will open to me normally, I can click on the selected value from the database - after clicking on the selected field will close the window, but the form field zakaznik in the parent window does not get the value, only when opening the popup window will form [object Window] zakaznik. I think I miss something, and I think it's wrong. could someone advise what it should look like? Thank you.
<scriptlanguage="JavaScript"type="text/javascript">var retVal=""var valReturned;function openModal(){
retVal=showModalDialog('stranky/modal.php');
valReturned=retVal;
document.getElementById("zakaznik").value=valReturned;}</script>
<td><inputid="zakaznik"type="text"name="zakaznik"value="'.$_POST["zakaznik"].'"> <inputclass="odeslat"type="button"name="vybrat"value="Vybrat"onClick="openModal()"></td>
In the modal window it clicked only this way and it worked and it works even in the historical version of the web browser to this day, but new browsers do not open it anymore:
<td><ahref="#"onclick="returnValue='.$data["id"].';window.close();">'.$data["id"].'</a></td>
Unfortunately, I can not modify it to work in new browsers, and therefore please advice: just click on a value and it transferred and the window clicked the value itself closed.
So I wanted to modify it somehow and use this:
<scriptlanguage="JavaScript"type="text/javascript">
var retVal=""
var valReturned;
function openModal() {
retVal = window.open("stranky/modal.php", "_blank", "width=950,height=600");
valReturned=retVal;
document.getElementById("zakaznik").value=valReturned;
//alert('The following text has been returned: "'+valReturned+'"');
}
<tr><td>Zákazník:</td><td><inputid="zakaznik"type="text"name="zakaznik"value=""> <inputclass="odeslat"type="button"name="vybrat"value="Vybrat"onclick="openModal()"></td></tr>
in popup window (modal.php) I have this:
<td><ahref="#"onclick="returnValue='.$data["id"].';window.close();">'.$data["id"].'</a></td>
window will open to me normally, I can click on the selected value from the database - after clicking on the selected field will close the window, but the form field zakaznik in the parent window does not get the value, only when opening the popup window will form [object Window] zakaznik. I think I miss something, and I think it's wrong. could someone advise what it should look like? Thank you.