thanks
Displaying more than one php app on same page
Moderator: General Moderators
Displaying more than one php app on same page
thanks
Re: Displaying more than one php app on same page
iframes are okay but I'd say css is your best bet. Use div layers and just have them butt up next to each other.
Re: Displaying more than one php app on same page
I don't understand. I'm familiar with CSS and <div> tags but how do I incorporate the output from different apps? I'm probably missing some basic php knowledge here, but I didn't think the apps could be built into one page. These are various scripts that I've purchased and that weren't written as part of one app.
- EverLearning
- Forum Contributor
- Posts: 282
- Joined: Sat Feb 23, 2008 3:49 am
- Location: Niš, Serbia
Re: Displaying more than one php app on same page
Use divs like Jade suggested, and populate them with AJAX calls.
Re: Displaying more than one php app on same page
OK I'm not familiar with AJAX calls but from a little web searching I see things like cross-domain ajax calls using PHP - is this what you mean? Is there a good tutorial on ajax calls for what I want to do that you can recommend?
thanks
thanks
- EverLearning
- Forum Contributor
- Posts: 282
- Joined: Sat Feb 23, 2008 3:49 am
- Location: Niš, Serbia
Re: Displaying more than one php app on same page
None that I can remember. Take a look at these
Ajax.Updater
Using the Ajax.Updater class
This is from Prototype Javascript framework.
Ajax.Updater
Using the Ajax.Updater class
This is from Prototype Javascript framework.
- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA
Re: Displaying more than one php app on same page
Are you wanting to have executable php scripts that are independent of one another that can be interacted with by the user in the same browser window? Or do you just want to run multiple PHP scripts in the same window?
Re: Displaying more than one php app on same page
I'm not sure of the difference in the two choices so here's an example. I have a script installed in one folder of my hosting account that is for classified ads. I have a second script, totally separate from the first script, installed in a second folder, that looks up a telephone area code. I just want to have a single web page where the user can see and use the input/output screen of each script. I could create an html page with an two iframes, each one targeted on its respective script's home page. However iframes have browser compatibility issues that I want to avoid. Is there another/better way?
I hope this explains it - there's probably better/clearer language to explain what I'm trying to do, but I don't know the right terms.
I hope this explains it - there's probably better/clearer language to explain what I'm trying to do, but I don't know the right terms.
- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA
Re: Displaying more than one php app on same page
No, you answered it pretty well. You are looking for asynchronous request/response handling, or in modern terminology, Ajax.
This means that you will have to code your page in a way that either tells the user that Javascript is required or you will have to code fall backs in case it is not.
There are boatloads of tutorials around on the use of the XMLHttpRequest object, Ajax and the like.
This means that you will have to code your page in a way that either tells the user that Javascript is required or you will have to code fall backs in case it is not.
There are boatloads of tutorials around on the use of the XMLHttpRequest object, Ajax and the like.
Re: Displaying more than one php app on same page
Mr. Mod, thanks - which will work on more browsers - ajax/javascript or iframes?
- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA
Re: Displaying more than one php app on same page
Javascript is probably going to work for you the most consistently but is not always guaranteed to be available. iFrames are just about supported everywhere, but some users have misgivings about them.
It is just about six of one and a half dozen of the other. Realistically I'd say go Ajax.
It is just about six of one and a half dozen of the other. Realistically I'd say go Ajax.
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
Re: Displaying more than one php app on same page
In this instance I would not suggest using Ajax. For a beginner I would certainly suggest using frames in this case, since the OP may find himself a bit overwhelmed because it's likely going to entail some engineering to have the two app's play nice together in a single request. By using iframes we are treating them as separate requests (hence separate windows) and should work right away without any tweaking.Everah wrote:. Realistically I'd say go Ajax.
Very seldomly do I suggest using frames.. but they have their place and time.
Re: Displaying more than one php app on same page
OK thanks for the advice guys. Am I correct that iframes are not supported by IE7 unless it is specifically activated by the user?