Reply to How to tell PHP to write data to another frame

Your name:

Reply:


Posted by Stefan Mueller on 11/15/05 12:36

I've a frameset (test-submit-main.html) with 2 frames. The user works within
frame 1 (test-submit-frame1.html). In frame 2 (test-submit-frame2.html) I
collect some data which are stored in hidden fields. If the user presses
submit, the hidden fields of frame 2 gets sumbitted.

Unfortunately the output generated by PHP (test-submit.php) is shown in
frame 2.

Does someone know how to tell PHP to send the data to frame 1?
Stefan


++++++++++++++++++++++++++++++++++++++++++++++++

test-submit-main.html
=====================
<html>
<frameset rows = "*, 200" frameborder = "0" framespacing = "0">
<frame src="test-submit-frame1.html" name="MyFrame1">
<frame src="test-submit-frame2.html" name="MyFrame2">
</frameset>
</html>

++++++++++++++++++++++++++++++++++++++++++++++++

test-submit-frame1.html
=======================
<html>
<body>
<form name = "MyFormFrame1" action = "" method = "post" accept-charset =
"iso-8859-1">
<input type = "button" value = "Submit" onClick =
"eval(parent.frames[1].document.MyFormFrame2.submit())">
</form>
</body>
</html>

++++++++++++++++++++++++++++++++++++++++++++++++

test-submit-frame2.html
=======================

<html>
<body>
<form name = "MyFormFrame2" action = "test-submit.php" method = "post"
accept-charset = "iso-8859-1">
<table id = "MyTableFrame2">
<input type = "text" name = "MyField1" value = "Content Field 1">
</table>
</form>
</body>
</html>

++++++++++++++++++++++++++++++++++++++++++++++++

test-submit.php
===============
<html>
<body>
<?php
echo "MyField1: " . $_POST['MyField1'];
echo "This message should be displayed in frame 1 and not in frame
2!";
?>
</body>
</html>

++++++++++++++++++++++++++++++++++++++++++++++++

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация