PDA

View Full Version : a part of any page inside our own page?



erensimsek
09-27-2006, 09:35 AM
is it possible to demonstrate a part of any page inside our own page? I think that this task can not be accomplished with iframe. Probably java script is useful.

examples:
http://www.dsakimya.com/aahah.jpg

thanks.

BLiZZaRD
09-27-2006, 09:40 AM
Without legal issues? If you don't get caught...

djr33
09-27-2006, 10:11 AM
That's quite complex.

As Blizzard says, there are legal issues. Assuming you have permission....

Cut and paste is the easy answer.
If more than that, you could try:
1. iframe with javascript controls set to scroll to a specific part of the window, disable scrollbars and set the size to that of the region you want to show.
2. screen capture, and put the image on your page.
3. Complex server side script that takes the source code of the page and finds markers in it, splitting the source at those points, and leaving you with the chunk you want. This is possible, but could get ugly if it's complex to find where you'd want to split it. If you have access to the page, simply put a comment-- <!--start here--> and <!--end here-->-- in the page and search for those with php (or another server side programming language), then take what's in the middle.
However, this would be hard to do if there was live content, such as flash, or javascript (would need more coding anyway).
4. asking them to allow you to connect to their page in a way that it would allow you to put their content on your page. For example, if you wanted to include a stock ticker from another site (and got permission), they might just let you do so by accessing their database/rss feed/etc. However, this isn't likely, though at least it would be clearly legal.


Short answer, get permission, and find an easier way. It might be possible, depending on what exactly the "chunk" is that you need, but might also be very complex if there's a lot going on with it.

The easy answer is to just duplicate it on your page, assuming they give you permission.


EDIT: Just saw your last post.

1. What exactly are you trying to do?... there's likely an easier way.
2. You have access to both pages.... just do the same thing to both, so you don't need to do this. Depending on you're trying to do, I suppose.


EDIT 2:
Actually, since you have access to both pages, here's an easy way.
Make 3 pages.
--a. Your main page... the first one above.
--b. Your demo page... the second above.
--c. Your content page... where that section is stored.
1. On the content page, create it as you want it, as a complete webpage, but only that size.
2. On your other two pages, create a region (table/div), if needed, or just select a place in the source code for the content to go. Then either:
--Use frames (iframes, most likely) to place that page into your page.
--Use PHP. Set your file extension to .php (instead of .htm, for example). Use the code: <?php include "yourcontent.htm"; ?> where you want the content to go. (Note that only the recieving page with the php code in it must have the .php extension, not the page you are including, though it may as well. Additionally, you will need php installed and enabled on your server.)
Between the two options, php is better if you can make it work, but a bit more complex. Also, you might have trouble if you have a full html page as the content, as your generated source code on the pages you are embedding it on would become something like this-- "<html>main page stuff<html>content stuff</html>main page stuff</html>", and having two sets of html tags (or body tags, etc.) can lead to some problems.
If we have more detail, we might be able to help figure out which option is right.

erensimsek
09-27-2006, 12:31 PM
it's not succesfully

djr33
09-29-2006, 05:31 AM
That tells me nothing on how to help you fix it.
Can you give a link?
Explain some type of error?

Anything should support iframes (except particularly old browsers).
If php, is it even installed on the server?