![]() |
working with Iframes in php
I am very new to php and have no idea how to do what I would like to do, or even if I can.
I would like to have a web page were the menu and the main content are each in there own iframes, and when some one clicks a menu item it will ether refresh the main content with new data leaving the same menu, or refresh the menu with a new menu leaving the main content the same. I am thinking that would require javascript but I don't know any more javascript then I do php yet. So any idea on how I could do this or is it even possible to do this. ( I know that using php I could simply hard code a ton includes in with with a bunch of if statements that would load "Modules" so to speak. those modules would then act as the new html pages each one having a menu and a main content, but that would be way to complicated for what I want to mess with. and would simpler if I just stuck to normal static html pages.) also any way to have a form in frame 1 that submits it's data to the page displayed in the same frame and have that frame refresh with the new data taken in to account? example a chat page for a clan/guild. were the online game they all play is loaded in a gameframe, and the chat is loaded in a chat frame, each frame would have to act as 2 different tabs/windows.. were there would be different session IDs for each and cookies too. to loggin the chatframe would first load a loggin page and then would log the user in, and then refresh the chat frame with the main chat page. with out upsetting the other frame there by keeping the gameframe's SID and such in tact and letting some one login to the chat and the game at the same time with out one messing the other up with a page wide refresh, when the game resets the session on a page wide refresh. if you read that whole thing thanks, and if you can help me, thanks again:-) |
I can hardly understand what you are saying, here is help for what I can read. Iframes are a HTML issue, they have nothing to do with PHP. And to send data from one Iframe to another requires javascript as far as I know.
You would probably be better to use ajax to update the content. With ajax you can update the content in a div dynamically. Iframes are messy and probably should be avoided unless you have to use them. Also, if you want anyone to put any real time into helping you, you should put a little more time into making your posts in decent English. |
@Village Idiot
ok I have no idea why you can hardly read my English... it is just fine, maybe you have trouble reading it for some other reason? and to your last statement: "Also, if you want anyone to put any real time into helping you, you should put a little more time into making your posts in decent English." I have been making spelling mistakes ever since 1st grade,a dn so I always look back over my posts a few times. if that is not enough time spent I don't know what is. I have seen other posts on here that get tons better answers than your answer with out even a clearly asked question, like I did. any way I am not wanting help with that iframes themsleves, just wanting to know if I can refresh them using php. I know that if I drop a meta refresh in an echo statement that will work for refreshing the frame that the meta refresh is located in. I have no idea how on earth you can possibly replace the iframe with a div in my example. each iframe in my example loads form 2 different domains. one is my domain, the other a online game's domain. But I will look in to using ajax and divs when I am working with all the same domain. That might help me I on one of my web sites. |
any way I think I have it worked out after spending 10 hours working on it....
I use a meta refresh in side of the same frame and use a form with a target for loading other frames. and it seems to be working so far. each php page seems to be working as if it was opened in it own window even though it is in the same window And I am able to work with them as if they are part of the same page at the same time :) just need to get some client side script in there and I should be able to do every thing else I want to do. |
| All times are GMT. The time now is 04:55 AM. |
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0