I want to show three XMLs on a single html page. These XMLs have XSLs associated with them.
Somthing like this:
Is it possible to do so? If yes, how?
P.S.: I'm using Windows XP SP3.
You have many solutions to do this:
Use Ajax to get the xml file (as a string) and then do whatever you want with it.
Use an iframe with Content-Type: text/xml
Use javascript
You could use html/xhtml div tags to devide the page. Into sections you described above.
<html>
<head></head>
<body>
<div height="20%" width="100%">xml1</div>
<div height="80%" width="20%" style="float:left;">xml2</div>
<div height="80%" width="80%" style="float:left;">xml3</div>
</body>
</html>
Related
So i have an HTML file my problem is i want to create an "About Me" section in one DIV section, the issue is the About Me section is rather long and contains a lot of text and as a result of that makes the code look untidy. I mean from a functionality point of view it works but i like making HTML files look as good as i can.
Is there someway i can link my about me section from a separate HTML file containing just that info, almost has is if it was a separate class in OOP and i am in essence just calling to an 'About Me' object?
You can simply use an <iframe> for that, pointing to your other HTML file.
<html>
<head>
..
</head>
<body>
...
<iframe src="link/to/your/file.html" scrolling="no" frameborder="0" ></iframe>
</body>
</html>
I'm trying to set up Google Sites for my own personal website:
<html>
<head>
<title>...</title>
</head>
<body background="page_bg.png" text="#000000" bgcolor="#333333">
<div align="center"><img src="content.jpg" border="0" alt=""></div>
</body>
</html>
So all I want is a background picture (I accomplished to do this under settings) and only one picture in the middle of the site itself. I was trying to get rid of all the gimmicks (such as the sidebar, shadows of the frame, etc.) but I failed. Is it even possible to do this?
The reason I use Sites is, because the web address "https://sites.google.com/site/my_name_here/" is clear, it's free and it makes my site appear in the google search.
edit, my solution: I found a template called "Blank Template (Black)" which didn't contain anything (no sidebar, etc). I added my own background picture, inserted my content.jpg and done.
I guess you have to use something like:
<body style="background:#333333 url('page_bg.png'); color=#000000;">
<div style="text-align:center;"><img src="content.jpg" border="0" alt=""></div>
</body>
Oh ok, right! I think you cannot add your own styles using html/css. But if you go to "Managing Web site" there is a "Colors and fonts" option, and there you make you own customization for some elements, like select a different background color.
Is that what you're looking for Thomas?
My solution: I found a template called "Blank Template (Black)" which didn't contain anything (no sidebar, etc). I added my own background picture, inserted my content.jpg and done.
I am developing a static website using HTML/CSS. I have 7 pages in my website and each page has the exact same header content. Is there some sort of import/include capability in HTML?
Here is an example of the kind of thing I would be looking for (note I completely made up the syntax):
[Source (header.html)]
<html>
<head><title>Source Page</title></head>
<body>
<div id="myheader">Hello, World!</div>
<body>
</html>
[Page That Imports From Source]
<html>
<head><title>My Title</title></head>
<body>
<div import="id:myheader;source:url('header.html');"/>
<body>
</html>
Thank you!
Jan
Not as such, no. There are several options, in order of accessibility and ease of use:
Server-side includes (assuming your static file server supports them - most do).
iframes
Single Page Application style (requires JavaScript).
framesets (Legacy, avoid if possible).
Examples
SSI
<!--#include virtual="header.html" -->
iframes
<!-- Assuming HTML5 -->
<iframe src="header.html" seamless></iframe>
Javascript
<script>
// We have a magic ajax function
ajax("header.html", function(data) {
document.getElementById("header").innerHTML = data;
});
</script>
framesets
Just don't :-)
No, HTML does not offer such functionality. However, you can achieve the result using either server-side (many options here, depending on your server setup) or client-side (JavaScript, load the extra content with AJAX) solutions.
You can achieve same with HTML templates.....if you are using dreamweaver then create 1 .dwt file for your header footer and common layout accross the site..........it will be included automatically to all of your pages.....:)
no need of any server side scripting just plain html......................
I want to load a static text file from an HTML document without using Javascript or any server side language.
I've tried using object tag as follows:
<object id="information" name="information" data="http://www.example.com/data.txt"></object>
But it didn't work. Is it possible to do this? If so, which tag should I use?
You should use an <iframe src="..." />.
I am having 1 pure html page for ex. sample.html. I need to include this html into another pure html for ex.Orginal.html.How to do this? I am having a header image in my sample.html.It should come at the top of the Orginal.html page.
If you're using Apache web server, you could try using server side includes.
You can't do such things in pure HTML, unless you use frames or iframe element. But better merge them by hand...
Here is an example of how to do it in pure HTML with an iframe, which although strangely not mentioned in HTML 4 specification is supported by all major browsers (and is in the HTML 5 specification)
<body>
<h1>This is original page</h1>
<p>Some content on original page.</p>
<iframe src="sample.html" width="600" height="300"></iframe>
</body>
You can adjust the width and height and you can also remove the border if you want the page to be more seamless.
Be wary of JavaScript solutions to this problem, especially if you want to be viewed on mobile devices.
Additional note: Avoid frameset solutions also, as they aren't valid markup.
See Include One File In Another, which has a summary of the various techniques that are available (along with their pros and cons).
You could use JavaScript to load some HTML from one document into another. This task is fairly simple using the jQuery toolkit:
$("The ID of a container (a div element for instance) in which you want to load
the contents of a HTML file").load("path to html file you want to load");
<div id="inserthere" />
$(function ()
{
$("#inserthere").load("loadme.html"); // Load the contents of loadme.html
// and stuff it in the div with the
// ID of "inserthere"
});