473,508 Members | 2,195 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Grabing content from server

I'd like to create a function that grabs some content from a server (html
file) and puts this content into a DIV.
This way I don't have to reload the whole page to update just a portion of
the page.
How can I do it?
Thanks,

--

Kerberos.

http://www.opera.com
http://www.freebsd.org
http://www.auriance.com
http://www.osresources.com
http://exodus.jabberstudio.org
Jul 23 '05 #1
4 1097


Kerberos wrote:
I'd like to create a function that grabs some content from a server
(html file) and puts this content into a DIV.


What is wrong with
<div>
<iframe name="iframeName" width="100%" height="200"
src="whatever.html"></iframe>
</div>
and then using links e.g.
<a href="htmlFile.html" target="iframeName">link</a>
or if you need scripting
if (window.frames && window.frames.iframeName) {
window.frames.iframeName.location.href = 'htmlFile.html';
}

--

Martin Honnen
http://JavaScript.FAQTs.com/
Jul 23 '05 #2
Em Tue, 18 Jan 2005 15:00:23 +0100, Martin Honnen <ma*******@yahoo.de>
escreveu:
What is wrong with
<div>
<iframe name="iframeName" width="100%" height="200"
src="whatever.html"></iframe>
</div>
and then using links e.g.
<a href="htmlFile.html" target="iframeName">link</a>
or if you need scripting
if (window.frames && window.frames.iframeName) {
window.frames.iframeName.location.href = 'htmlFile.html';
}


The problem with iframes is, beside the fact that frames in general are
deprecated, that the content wraps inside the frame. Using a div, it
extends to 100%.

I've been using iframes so far, but I'm looking for another solution.
Thanks,

--

Kerberos.

http://www.opera.com
http://www.freebsd.org
http://www.auriance.com
http://www.osresources.com
http://exodus.jabberstudio.org
Jul 23 '05 #3


Kerberos wrote:

I've been using iframes so far, but I'm looking for another solution.


The FAQ has
<http://jibbering.com/faq/#FAQ4_38>
and there is also the download behavior in IE/Win:
<http://www.faqts.com/knowledge_base/view.phtml/aid/1268/fid/126>
but all that is much weaker in terms of cross browser support compared
to iframes, in particular when you want to load and render HTML.
--

Martin Honnen
http://JavaScript.FAQTs.com/
Jul 23 '05 #4
Em Tue, 18 Jan 2005 17:19:26 +0100, Martin Honnen <ma*******@yahoo.de>
escreveu:
The FAQ has
<http://jibbering.com/faq/#FAQ4_38>


Thanks! I found the XML HTTP Request object quite interesting. It's
exactly what I was looking for, it even talks about Gmail ;)

--

Kerberos.

http://www.opera.com
http://www.freebsd.org
http://www.auriance.com
http://www.osresources.com
http://exodus.jabberstudio.org
Jul 23 '05 #5

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

Similar topics

10
2623
by: clintonG | last post by:
Can somebody direct me to documents or source that supports the use of collapsible content that is collapsed by default when the page is loaded? The secondary objective would of course be...
4
1567
by: Taxi Driver | last post by:
Does anyone know of a good script to gather email addresses from a specific web site. Thank you.
1
1652
by: athirumurthi | last post by:
I have a WinINet communicating with an integration server (X-AspNet-Version: 1.1.4322) using form posts. One form post that includes jpeg content. However, the data received at the server is...
7
8689
by: xkeops | last post by:
Thinking of creating a website, most of the pages will have a general toolbar menu, a content and a footer. The content will be the only one who's gonna change but the rest (header,footer) will...
0
2081
by: Managed Code | last post by:
Hello All, Here is my issue and thanks in advance for any assistance. I have a base page with a dropdownlist that fires an event with the selected index. The content page catches the event and...
11
15064
by: Trapulo | last post by:
I've this statement in my output's creation: Response.Clear() Response.ContentType = "application/vnd.google-earth.kml+xml kml" Response.AddHeader("Content-Disposition", "inline;...
3
2096
by: MikeB | last post by:
Hello, I have a content page that is from a Master page which has 2 content panes. How do I add my forms to the content page? Each pane needs a form but you can not have multiple form tags nor...
3
4403
by: premprakashbhati | last post by:
hi, good evening.. i am going to upload an image in a web form .....for that iam using HTML input(file) control and one web control button i.e., Upload_Button() here is the code ...its work fine...
3
3588
by: graphicssl | last post by:
Okay, so first of all, I'm a designer first and a light coder second (I'm only really trained with HTML and CSS). So I apologize for having to post about something that's probably super-trivial! ...
0
7227
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7331
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7391
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7501
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5633
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4713
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3188
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
768
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
424
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.