473,378 Members | 1,403 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Insert a webpage into a cell in a table

Hi,

I have a webpage with a table that has 4 cells (2x2). In one of those
cells, I wish to load a webpage stored on a different server
(say...www.webpage.com/abc.htm). Does HTML allow for this to be done?
I know a page can be loaded in this manner if I use frames but I do
not want to use frames for my page.

I see there are quite a few other posts asking this question but there
does not seem to be a conclusive answer.

Thank you in advance for your help!!!!
Jul 23 '05 #1
22 19322
ru******@yahoo.com (Ruslan Kogan) wrote in
news:d5**************************@posting.google.c om:
Hi,

I have a webpage with a table that has 4 cells (2x2). In one of those
cells, I wish to load a webpage stored on a different server
(say...www.webpage.com/abc.htm).
Question 1: Did they give you permission?
Does HTML allow for this to be done?
You will not be able to do it cleanly; you'd have to use an iframe.
I know a page can be loaded in this manner if I use frames but I do
not want to use frames for my page.
So that solution's out.
I see there are quite a few other posts asking this question but there
does not seem to be a conclusive answer.


You need to include the file server-side.

But first you need permission, or else you are breaking the law (in many
places).
Jul 23 '05 #2
Ruslan Kogan wrote:
I have a webpage with a table that has 4 cells (2x2). In one of those
cells, I wish to load a webpage stored on a different server
(say...www.webpage.com/abc.htm). Does HTML allow for this to be done?


If you have PHP installed on your server:

<td><? include("http://www.webpage.com/abc.htm"); ?></td>

Or if you're more of a Perl kind of guy:

print "<td>";
system("/usr/bin/HEAD 'http://www.webpage.com/abc.htm'");
print "</td>";

--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact

Jul 23 '05 #3
Toby Inkster wrote:
print "<td>";
system("/usr/bin/HEAD 'http://www.webpage.com/abc.htm'");
print "</td>";


That'll show the headers of the page, not the content. You'll want to
change "/usr/bin/HEAD" to "/usr/bin/GET". But you'll want to do some
stripping so that you only get the contents of the body element.
Jul 23 '05 #4
> > I have a webpage with a table that has 4 cells (2x2). In one of those
cells, I wish to load a webpage stored on a different server
(say...www.webpage.com/abc.htm). Does HTML allow for this to be done?


If you have PHP installed on your server:

<td><? include("http://www.webpage.com/abc.htm"); ?></td>

Or if you're more of a Perl kind of guy:

print "<td>";
system("/usr/bin/HEAD 'http://www.webpage.com/abc.htm'");
print "</td>";


It is for an ad that I will have on eBay (ebay.com.au)!! Is that Perl
or PHP??

Also, where do I place the code that you have provided?? Do I paste it
into the code for the cell or does some of it go in the header???

Thanks!
Jul 23 '05 #5
Toby Inkster wrote:
Or if you're more of a Perl kind of guy: system("/usr/bin/HEAD 'http://www.webpage.com/abc.htm'");


Eugh. That isn't Perl! That's a tiny Perl wrapper around a binary.

use strict;
use warnings;
use LWP::UserAgent;
use HTML::TreeBuilder;

# Download HTML
my $browser = LWP::UserAgent->new();
my $response = $browser->get('http://example.com/abc.htm');

# Parse HTML
my $html = HTML::TreeBuilder->new_from_content($response->content());

# Extract <body>
my $body = $html->find_by_tag_name('body');

# You should convert relative URIs to absolute, but I'm not writing that
# code at this time of the morning.

foreach my $element ($body->content_list()) {
print $element->as_HTML();
}

--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
Jul 23 '05 #6
Leif K-Brooks wrote:
That'll show the headers of the page, not the content. You'll want to
change "/usr/bin/HEAD" to "/usr/bin/GET".
That'd be the one.
But you'll want to do some stripping so that you only get the contents
of the body element.


Assuming that abc.htm isn't already stripped of such things. (Which it may
be if Rusian has been given permission to include it.)

--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact

Jul 23 '05 #7
On 6/9/04 7:12 am, Ruslan Kogan wrote:
It is for an ad that I will have on eBay (ebay.com.au)!! Is that Perl
or PHP??

Also, where do I place the code that you have provided?? Do I paste it
into the code for the cell or does some of it go in the header???

Thanks!


You can't use server-side scripting on eBay (for obvious reasons). So you
can't use Perl or PHP, and you can't include other web pages.

If you're looking for a way to list your other auctions on your eBay pages,
then you could use Javascript to include a remote file that generates a set
of links on the fly.

Is that the sort of thing you're trying to do? If so, this might help:
<http://groups.google.co.uk/groups?se...ronanzzz%40vir
gin.net&output=gplain>

Phil

--
Philip Ronan
ph***********@virgin.net
(Please remove the "z"s if replying by email)
Jul 23 '05 #8
In article <ch*******************@news.demon.co.uk>,
David Dorward <do*****@yahoo.com> writes:
Eugh. That isn't Perl! That's a tiny Perl wrapper around a binary.
Indeedie. But yours is rather heavyweight too, parsing the entire
document in memory. Much faster to use SAX - as in the frames-
linearisation code of mod_accessibility.
use HTML::TreeBuilder;
*shudder*
# You should convert relative URIs to absolute, but I'm not writing that
# code at this time of the morning.


Useful patch at http://issues.apache.org/bugzilla/show_bug.cgi?id=28453

--
Nick Kew
Jul 23 '05 #9
David Dorward wrote:
# You should convert relative URIs to absolute, but I'm not writing that
# code at this time of the morning.


You could use:
<base href="http://example.org/dir/">

--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact
Now Playing ~ ./cranberries_-_zombie.ogg

Jul 23 '05 #10
Toby Inkster wrote:
David Dorward wrote:
# You should convert relative URIs to absolute, but I'm not writing that
# code at this time of the morning.


You could use:
<base href="http://example.org/dir/">


No, because that would affect links on the page the external page has been
included in.

It might not be legal to put someone else's site inside yours. IANAL.

--
Matt
-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----
Jul 23 '05 #11
this is all getting pretty confusing so i have pasted an example. I
would like to load yahoo.com in the bottom right cell....can anyone
modify the code to have this done?

thanks heaps!!!!

**********Load yahoo.com in bottom right cell*********
<html>
<head>
<title>Hello this is my Page</title>
</head>

<body>
<p>Hello this is my Page</p>

<table border=1>
<tr>
<td>...</td>
<td>...</td>
</tr>
<tr>
<td>...</td>
<td>load yahoo.com here</td>
</tr>
</table>

</body>

</html>
************************************************** ****

Please note: both sites being used are mine so there are no legality
issues.
Jul 23 '05 #12
On 6 Sep 2004 19:17:06 -0700, Ruslan Kogan <ru******@yahoo.com> wrote:
<td>load yahoo.com here</td> Please note: both sites being used are mine so there are no legality
issues.


Let me get this straignt.

You OWN yahoo.com, and you don't have the staff to figure this out?
Jul 23 '05 #13
Neal <ne*****@yahoo.com> wrote in message news:<op**************@news.individual.net>...
On 6 Sep 2004 19:17:06 -0700, Ruslan Kogan <ru******@yahoo.com> wrote:
<td>load yahoo.com here</td>

Please note: both sites being used are mine so there are no legality
issues.


Let me get this straignt.

You OWN yahoo.com, and you don't have the staff to figure this out?


you idiot/tool!!! (don't know which one suits you better)

just using it as an example........for all those out there concerned
about my ownership of yahoo.com, please make the bottom right cell
load "sadkjhfskjhf.com".
Jul 23 '05 #14
On 6 Sep 2004 23:40:48 -0700, Ruslan Kogan <ru******@yahoo.com> wrote:
Neal <ne*****@yahoo.com> wrote in message
news:<op**************@news.individual.net>...
On 6 Sep 2004 19:17:06 -0700, Ruslan Kogan <ru******@yahoo.com> wrote:
> <td>load yahoo.com here</td>

> Please note: both sites being used are mine so there are no legality
> issues.


Let me get this straignt.

You OWN yahoo.com, and you don't have the staff to figure this out?


you idiot/tool!!! (don't know which one suits you better)


I don't have the time to help people who call me those names, sorry.
Jul 23 '05 #15
Matt wrote:
Toby Inkster wrote:
David Dorward wrote:
# You should convert relative URIs to absolute, but I'm not writing that
# code at this time of the morning.


You could use:
<base href="http://example.org/dir/">


No, because that would affect links on the page the external page has been
included in.


But you have direct control of those links, so you can use absolute URLs.

--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact

Jul 23 '05 #16
Neal <ne*****@yahoo.com> wrote in message news:<op**************@news.individual.net>...
On 6 Sep 2004 23:40:48 -0700, Ruslan Kogan <ru******@yahoo.com> wrote:
Neal <ne*****@yahoo.com> wrote in message
news:<op**************@news.individual.net>...
On 6 Sep 2004 19:17:06 -0700, Ruslan Kogan <ru******@yahoo.com> wrote:

> <td>load yahoo.com here</td> Please note: both sites being used are mine so there are no legality
> issues.

Let me get this straignt.

You OWN yahoo.com, and you don't have the staff to figure this out?


you idiot/tool!!! (don't know which one suits you better)


I don't have the time to help people who call me those names, sorry.

what?? you OWN html??? r u the only person with the knowledge on how
this is done??? well if you OWN html....congrats!
Jul 23 '05 #17
ru******@yahoo.com (Ruslan Kogan) wrote in
news:d5**************************@posting.google.c om:
Neal <ne*****@yahoo.com> wrote in message
news:<op**************@news.individual.net>...
On 6 Sep 2004 23:40:48 -0700, Ruslan Kogan <ru******@yahoo.com>
wrote:
> Neal <ne*****@yahoo.com> wrote in message
> news:<op**************@news.individual.net>...
>> On 6 Sep 2004 19:17:06 -0700, Ruslan Kogan <ru******@yahoo.com>
>> wrote:
>>
>> > <td>load yahoo.com here</td>

>> > Please note: both sites being used are mine so there are no
>> > legality issues.
>>
>> Let me get this straignt.
>>
>> You OWN yahoo.com, and you don't have the staff to figure this
>> out?
>
> you idiot/tool!!! (don't know which one suits you better)


I don't have the time to help people who call me those names, sorry.

what?? you OWN html??? r u the only person with the knowledge on how
this is done??? well if you OWN html....congrats!


huh??? i don't understand the analogy!!! didnt u notice that u simply
stated u wished to load the contents of yahoo.com??? did u know thats how
it seemed??? r u insensitive on purpose?? could u please not jump on
peoples throats???
Jul 23 '05 #18
On 10 Sep 2004 04:28:50 GMT, Sam Hughes <hu****@rpi.edu> wrote:
ru******@yahoo.com (Ruslan Kogan) wrote in
news:d5**************************@posting.google.c om:

what?? you OWN html??? r u the only person with the knowledge on how
this is done??? well if you OWN html....congrats!


huh??? i don't understand the analogy!!! didnt u notice that u simply
stated u wished to load the contents of yahoo.com??? did u know thats how
it seemed??? r u insensitive on purpose?? could u please not jump on
peoples throats???

would u guys stop using the letter u for you and use some capital letters
cuz yer annoying the piss out of me
Jul 23 '05 #19
Neal <ne*****@yahoo.com> wrote in
news:op**************@news.individual.net:
On 10 Sep 2004 04:28:50 GMT, Sam Hughes <hu****@rpi.edu> wrote:
ru******@yahoo.com (Ruslan Kogan) wrote in
news:d5**************************@posting.google.c om:

what?? you OWN html??? r u the only person with the knowledge on how
this is done??? well if you OWN html....congrats!


huh??? i don't understand the analogy!!! didnt u notice that u simply
stated u wished to load the contents of yahoo.com??? did u know thats
how it seemed??? r u insensitive on purpose?? could u please not jump
on peoples throats???

would u guys stop using the letter u for you and use some capital
letters cuz yer annoying the piss out of me


My reasons for using 'u' and question marks in triplicate must have been
too obscure. Never mind.
Jul 23 '05 #20
On 10 Sep 2004 06:31:42 GMT, Sam Hughes <hu****@rpi.edu> wrote:
what?? you OWN html??? r u the only person with the knowledge on how
this is done??? well if you OWN html....congrats!

huh??? i don't understand the analogy!!! didnt u notice that u simply
stated u wished to load the contents of yahoo.com??? did u know thats
how it seemed??? r u insensitive on purpose?? could u please not jump
on peoples throats???

would u guys stop using the letter u for you and use some capital
letters cuz yer annoying the piss out of me


My reasons for using 'u' and question marks in triplicate must have been
too obscure. Never mind.


nah i got it u r 2 stoopid 2 no im playing along :)
Jul 23 '05 #21
Neal <ne*****@yahoo.com> wrote in news:opsd4a90hs6v6656
@news.individual.net:
nah i got it u r 2 stoopid 2 no im playing along :)


bah u win!!! :)

nice 1 on the 'stoopid'
Jul 23 '05 #22
On 11 Sep 2004 01:31:49 GMT, Sam Hughes <hu****@rpi.edu> wrote:
Neal <ne*****@yahoo.com> wrote in news:opsd4a90hs6v6656
@news.individual.net:
nah i got it u r 2 stoopid 2 no im playing along :)


bah u win!!! :)

nice 1 on the 'stoopid'

LOLAFDACMYO!!!!11!11one11!1
Jul 23 '05 #23

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Dave | last post by:
I cannot insert into my appointments table because the primary key and identity column, appt_id, cannot be added. What do I have to change in my SQL statement to add new records into this table? I'm...
3
by: Sandy Bremmer | last post by:
I was curious how one goes about properly creates a table row with multiple TD cells as a single hyperlink because I have seen examples of what I think is invalid and poorly conceived HTML. It...
0
by: crypto_solid via AccessMonster.com | last post by:
I have been using a SQL database with a VB5 frontend for about 5 years. Works well. Unfortunately I don't have access to the source code. I was tasked with implementing a "job entry" application...
1
by: Bill Nguyen | last post by:
Below is the content of a textbox after data was captured from a barcode scanner. Instead of saving it into a text file and process later, I would like to be able to read the items (delimited by...
1
by: technocraze | last post by:
Hi guys, I am having trouble resolving this error. Below mentioned is my code and implmentation. MS Acess is my front end and sql server is my backend. What i want to achieve is to be...
7
gcoaster
by: gcoaster | last post by:
Hello Gurus, I am stuck! this will be easy I am sure for you. I have a Text Box where I type In a name. I am trying to get that value to insert into another table when I TAB to the next...
1
by: chennaibala | last post by:
hi frds... in my hiden textbox.i have following values... robert|true|true|false|arun|true|false|true|anu|true|true|false| i want to splits in to token and insert in mysql table in following...
1
pradeepjain
by: pradeepjain | last post by:
Hii guys, I have 2 tables in which data exists of a same user like his table1:login details and table2: his further details . I have a form where in his both login and rest of details...
1
by: visweswaran2830 | last post by:
Hi, I want to insert href into tabel cell using javascript. Note should support all browser. I know to insert, but it support only in IE, I checked in firefox, it does not support so please...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.