Posted by Jim Michaels on 02/04/06 07:57
"Alex Molochnikov" <NOBODY@NOSPAM.COM> wrote in message
news:lTaId.136774$6l.113213@pd7tw2no...
> Is there any way to embed the HTML code inside FRAMESET? Something like
> this:
>
> <frameset cols="50%,*">
> <frame src=" ... HTML code for the frame ... ">
> <frame src="Frame2.html" name="main">
> </frameset><noframes></noframes>
>
> I tried using a Javascript function that returns the HTML text, as in the
> following code:
>
> <!doctype html public "-//w3c//dtd html 4.0 transitional//en">
> <html>
> <head> <title>Frame 1</title>
> <script type="text/javascript">
> function myFunction()
> {
> return ("<!doctype html public \"-//w3c//dtd html 4.0
> transitional//en\">
> <html>
> <head>
> <title>Frame 1</title>
> </head>
> <body>
> <H2>Frame 1</H2>
> </body>
> </html>
> ")
> }
> </script>
> </head>
> <frameset cols="50%,*">
> <frame src=myFunction() name="toc">
<frame src="javascript:'<html></html>'">
is valid (tinker with it).
you can also try
function myFunction() {
window.frames[0].document.write(
"<!doctype html public \"-//w3c//dtd html 4.0 transitional//en\">
<html>
<head>
<title>Frame 1</title>
</head>
<body>
<H2>Frame 1</H2>
</body>
</html>
");
}
> <frame src="Frame2.html" name="main">
> </frameset><noframes></noframes>
> </html>
>
> but the browser shows the "The page cannot be displayed" for the first
> frame.
>
> I am trying to find a way to generate a page from the Java servlet that
> would contain a hidden (0-width) frame and a fully visible frame with some
> dynamic content.
>
> I will appreciate any clues.
>
> Alex Molochnikov
>
>
Navigation:
[Reply to this message]
|