ghurty Posted May 21, 2009 Share Posted May 21, 2009 Hi, I have a php script that generates a calender, with that you can click on a particular date, and it will give you sunset/sunrise high tide/low tide, etc... As of now, it opens it up in a new window. How would I go about making it display it in a special designated area on the side of the same page? Here is the code for the link as of now: <a href=\"./components/com_times/times.php?day=$tag&month=$monat&year=$jahr&locname=$activelocationurl\" target=\"_blank\">\n"; What would I change the link to, and what code would I need to put someplace else? Thank You Quote Link to comment https://forums.phpfreaks.com/topic/159132-how-to-make-information-display-in-same-window-rather-then-in-a-new-window/ Share on other sites More sharing options...
jsschmitt Posted May 21, 2009 Share Posted May 21, 2009 You'll need to either use javascript to open and designate a div tag, or use an iframe... Quote Link to comment https://forums.phpfreaks.com/topic/159132-how-to-make-information-display-in-same-window-rather-then-in-a-new-window/#findComment-839204 Share on other sites More sharing options...
wildteen88 Posted May 21, 2009 Share Posted May 21, 2009 On method is to add an iframe. Then in your links instead of using _blank as the target you'll provide the name of your iframe. Or the more modern method is to use Ajax Quote Link to comment https://forums.phpfreaks.com/topic/159132-how-to-make-information-display-in-same-window-rather-then-in-a-new-window/#findComment-839207 Share on other sites More sharing options...
ghurty Posted May 21, 2009 Author Share Posted May 21, 2009 Thank You, That worked. But now I am having a different problem. I added the code in, and using dreamweaver I put it side by side with the php code, however, when I load the webpage, the php script begins below the iFrame. How would I get it to be side by side. Also, how do you name a iframe, so it can be called? Thanks Quote Link to comment https://forums.phpfreaks.com/topic/159132-how-to-make-information-display-in-same-window-rather-then-in-a-new-window/#findComment-839230 Share on other sites More sharing options...
jsschmitt Posted May 21, 2009 Share Posted May 21, 2009 You will need to use some CSS to position the iframe, but as to the naming situation: <iframe name="iframe"> </iframe> After that, just change your links to <a href="url" target="iframe">Blah</a>... Quote Link to comment https://forums.phpfreaks.com/topic/159132-how-to-make-information-display-in-same-window-rather-then-in-a-new-window/#findComment-839237 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.