<FRAMESET> (HTML question)

J

Jan Plastenjak

This question is about html. I have this:

<frameset rows="90%,10%" frameborder="NO" border="0" framespacing="0"
cols="1">
<frame name="topFrame" noresize src="c:\bpp.xml">
<frame name="bottom" scrolling="NO" noresize src="c:\btn.htm">
</frameset>

Is there a way to assign html code to frames "in code", not to have to
specify src property? Something like:

<frameset rows="90%,10%" frameborder="NO" border="0" framespacing="0"
cols="1">
<frame name="topFrame" noresize><html>my html here</html>
<frame name="bottom" scrolling="NO" noresize><html>my html here</html>
</frameset>

Thank you.
 
C

CJM

Is there a way to assign html code to frames "in code", not to have to
specify src property?

No

See http://www.w3.org/TR/html4/present/frames.html#h-16.2.2

Notice it says that the Frame element is 'empty'. This means it doesnt have
a closing tag and can contain anything.

The src attribute is the method by which you must specify the starting HTML
for your frame.


I'm not sure why you are trying to do this, but I suspect there are better
ways. Why dont you tell us what your overall objective is.

And finally, no post about frames is complete without...
http://www.html-faq.com/htmlframes/?FramesAreEvil

hth

Chris
 
J

Jan Plastenjak

Thank you for your help. I'm trying to show in one page XML and HTML.
XML have XSL transformation and it produces HTML. I'll try to attach source
with this post. I couldn't find other way to display XML and HTML in one
page, except, to use frames.
 
M

Mark Schupp

This would be best asked in an HTML group.

I have seen a frameset that did this by calling a JavaScript variable for
the "SRC" attribute of the target frame as in:

<frame name="content" src="javascript:parent.emptyFrame">

where emptyFrame was defined earlier as:

var emptyFrame = "<html><body></body></html>";

I personally would not do this for fear of browser-specific problems. I
usually load a blank page into the target frameset and then use JavaScript
to rewrite the page after it loads.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,540
Members
45,025
Latest member
KetoRushACVFitness

Latest Threads

Top