Jump to content
php.lv forumi

POST nodošana jaunā logā caur frame


martins256

Recommended Posts

Nevaru atvērt jaunu, samazinātu logu, kurā būtu nodots POST, no cita frame. Ja nodod no tā paša frame, tad viss sanāk, bet ja nocita, tad sekojošais logs nav samazināts.

 

Visu kopā saturošā kods:

<HTML>
<frameset rows="*,40" frameborder="no" border="0" framespacing="0">
	<frame src="tabula.html" name="tabula" id="tabula" title="dati" />
	<frame src="pogas.html" name="pogas" scrolling="No" noresize="noresize" id="pogas" title="Pogas" />
</frameset>
</html>

 

pogas.html kods:

<HTML>
<BODY>
	<FORM>
		<input type="button" value="Gatavs" onClick="parent.tabula.document.form1.submit()">
	</FORM>
</BODY>
</HTML>

 

tabula.html kods:

<HTML>
<HEAD>
	<script language="JavaScript">
		function createTarget(t){
			window.open("valstis_mainiit.php", t, "width=250,height=50");
			return true;
		}
	</script>
</head>
<body>
	<FORM name="form1" action="kautkas.php" method="POST" onsubmit="return createTarget(this.target)" target="formtarget">
		<input type="submit" value="gatavs">
	</FORM>
</body>
</html>

 

P.S. pats POST tiek nodots

Link to comment
Share on other sites

t.php

<?php print_r($_POST); ?>

 

index.html

<html>
 <head>
  <script type="text/javascript">
function ludzuAtverManiPopupaa()
{
  popupName= "popup";
  win = window.open("", popupName, "width=250,height=50");
  frm1.target=popupName;
  frm1.submit();
}
 </script>
 </head>
 <body>
 <form method="post" id="frm1" action="t.php">
<input type="text" name="txt" />
<input type="button" value="atver mani popupā" onclick="ludzuAtverManiPopupaa()"/>
 </form>
 </body>
</html>

Edited by v3rb0
Link to comment
Share on other sites

×
×
  • Create New...