Thorax Posted May 8, 2007 Share Posted May 8, 2007 How to call html frames from php? What I'm doing is that I input a value in frame test1 then process by test.php after that I want one of the output in frame test1 and the other in frame test2. Would that be possible? Quote Link to comment https://forums.phpfreaks.com/topic/50557-php-to-html-frames/ Share on other sites More sharing options...
marcus Posted May 8, 2007 Share Posted May 8, 2007 If the frames are on the same page you can do in your form. <form name="name" action="page.php" method="post" target="framename"> Quote Link to comment https://forums.phpfreaks.com/topic/50557-php-to-html-frames/#findComment-248461 Share on other sites More sharing options...
Thorax Posted May 8, 2007 Author Share Posted May 8, 2007 But I want my php file to be the one calling the 2 frames test1 and test2 for the output after being process from php. example: i input 5 in frame test1 pass the value using form to test.php. the php file will add 5+1=6 and one of the code will be 5-1=4. I want 6 to be output in test1 and 4 in test2 frame. Is that possible? Quote Link to comment https://forums.phpfreaks.com/topic/50557-php-to-html-frames/#findComment-248466 Share on other sites More sharing options...
corbin Posted May 8, 2007 Share Posted May 8, 2007 You would have to use javascript..... And that would just create problems.... Are iframes really necessary? You could try using AJAX for it...... Or just use divs and have the php script populate them. Quote Link to comment https://forums.phpfreaks.com/topic/50557-php-to-html-frames/#findComment-248527 Share on other sites More sharing options...
Thorax Posted May 8, 2007 Author Share Posted May 8, 2007 I never use iframes... I'll check that out... I can't change it to div because what I'm doing really is getting a search result for search engines yahoo ang google by just using one frame for searching and google will b displayed in the first frame and yahoo on the second frame... any easier way to this? Quote Link to comment https://forums.phpfreaks.com/topic/50557-php-to-html-frames/#findComment-248532 Share on other sites More sharing options...
corbin Posted May 8, 2007 Share Posted May 8, 2007 Oh.... My bad -- I thought you said iframes ;p.... Hmm you could splice them into one page... such as: <table> <tr> <td id="google" width="50%"><?php echo $google_content; ?></td> <td id="yahoo"><?php echo $yahoo_content; ?></td></tr> </table> You would of course want to make it look better and probably avoid tables.... But, that's just what I would do. Quote Link to comment https://forums.phpfreaks.com/topic/50557-php-to-html-frames/#findComment-248543 Share on other sites More sharing options...
Thorax Posted May 8, 2007 Author Share Posted May 8, 2007 the problem is I'm returning the link. so still google and yahoo pages will be displayed with there searches. just putting two search engines in one window. there will be a predefined url in php for both google and yahoo and the only thing that is dynamic is the word that will be pass from html form to php then returns backthe link to be displayed both for google and yahoo. Quote Link to comment https://forums.phpfreaks.com/topic/50557-php-to-html-frames/#findComment-248561 Share on other sites More sharing options...
otuatail Posted May 8, 2007 Share Posted May 8, 2007 you could use <div>s and absolute positioning. (in a style sheet) and use <? include('sidemenu.html'); // or even 'sidemenu.php ?> Des. Quote Link to comment https://forums.phpfreaks.com/topic/50557-php-to-html-frames/#findComment-248594 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.