cicahusi Posted January 20, 2007 Share Posted January 20, 2007 My problem is that i have a menu and a content iframe (created in index.html) on my page and after the user is logged in, the menu.php in iframe:menu should reload, so the user gets the menu which should appear in logged in state.The problem is the login.php is loaded in the content iframe, and the menu should be reloaded from that one (login.php). I tryed several way to refer to the menu.php, in the menu frame, but without success.The whole thing i wanna do to execute <a href="menu.php" target="menu">reload the menu</a> without clicking on it, so when the login process suceeded, the menu change to the logged in version immediately. And after logging out, it would change back. If i put this link in it and click on it, it works perfect.<script type="text/javascript">document.getElementById("menu").src="menu.php"</script> don't work Link to comment https://forums.phpfreaks.com/topic/34938-some-problem-with-iframes/ Share on other sites More sharing options...
simcoweb Posted January 20, 2007 Share Posted January 20, 2007 Do you HAVE to use Iframes? You can simply 'include' the PHP files into the page(s) with creating an IFrame. Link to comment https://forums.phpfreaks.com/topic/34938-some-problem-with-iframes/#findComment-164756 Share on other sites More sharing options...
cicahusi Posted January 20, 2007 Author Share Posted January 20, 2007 In the file, what creates the frames (index.html), there are only the frame creations, which loads the menu in, and leave the content page empty. and when u click on -> Log in in the menu, u can log in on the content page. is it successful, the menu.php should reload in the menu frame. (it checks from the session, that user is logged in or not, and display the menu needed). And ofc it should reload after logout too.index.html:<iframe name="menu" id="menu" src="menu.php" target="main" width="15%" height="100%" align="left" border="0"></iframe><iframe name="tartalom" id="tartalom" src="empty.html" target="main" width="85%" height="100%" align="right" border="0"></iframe>menu.php:...<?phpif (user logged in...){?><a href="logout.php" target="tartalom">Kijelentkezés</a><br><br><?php } else {?><a href="login.php" target="tartalom">Belépés</a><br><br><?php }?>...So my question is, that at the end of the login.php and logout.php how can i reload the menu.php without using <a href="menu.php" target="menu">reload the menu</a> in them.Or if u can suggest me any better idea how to do this, i would be happy for that too. Thxhttp://villornet.freeweb.hu/ u can check it here Link to comment https://forums.phpfreaks.com/topic/34938-some-problem-with-iframes/#findComment-164772 Share on other sites More sharing options...
cicahusi Posted January 20, 2007 Author Share Posted January 20, 2007 user name and pwd for login: xy Link to comment https://forums.phpfreaks.com/topic/34938-some-problem-with-iframes/#findComment-164774 Share on other sites More sharing options...
cicahusi Posted January 20, 2007 Author Share Posted January 20, 2007 other topic about this same problem:http://www.phpfreaks.com/forums/index.php/topic,123240.0.html Link to comment https://forums.phpfreaks.com/topic/34938-some-problem-with-iframes/#findComment-164947 Share on other sites More sharing options...
redbullmarky Posted January 20, 2007 Share Posted January 20, 2007 the reason why the other topic is now in Javascript help is because the problem has nothing to do with PHP itself. Please do not double post, and check beforehand that where you're posting is the most appropriate place. Link to comment https://forums.phpfreaks.com/topic/34938-some-problem-with-iframes/#findComment-164950 Share on other sites More sharing options...
Recommended Posts