You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by an...@wipro.com on 2006/01/11 17:19:30 UTC
Frames in JSP.
Dear All,
I have a JSP like the following
<html>
<head>
.............
.............
</head>
<body>
................
................
<frameset>
<frame>
............
............
</frame>
<frame src="a.jsp">
</frameset>
.............
.............
</body>
<html>
where ...... is for html code.
If I try to access html elements under the jsp "a.jsp", it returns me a
null. Why?
Thanks in advance.
Regards,
Ashish A.
The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments.
WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.
www.wipro.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Frames in JSP.
Posted by "Seak, Teng-Fong" <se...@yahoo.com>.
anunay.ashish@wipro.com wrote:
>Dear All,
>
>I have a JSP like the following
>
><html>
><head>
>.............
>.............
></head>
><body>
>................
>................
><frameset>
><frame>
>............
>............
></frame>
><frame src="a.jsp">
></frameset>
>.............
>.............
></body>
><html>
>
>
First of all, <body> and <frameset> tags are mutually exclusive:
http://www.w3.org/TR/1999/REC-html401-19991224/sgml/framesetdtd.html#dtd
>where ...... is for html code.
>
>If I try to access html elements under the jsp "a.jsp", it returns me a
>null. Why?
>
>
It would depend on what API you're using. Are you using standard
W3C DOM or Microsoft's IE specific DOM API?
>
>Thanks in advance.
>
>Regards,
>Ashish A.
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Frames in JSP.
Posted by "Frank W. Zammetti" <fz...@omnytex.com>.
On Wed, January 11, 2006 11:19 am, anunay.ashish@wipro.com said:
>
> Dear All,
>
> I have a JSP like the following
>
> <html>
> <head>
> .............
> .............
> </head>
> <body>
> ................
> ................
> <frameset>
> <frame>
> ............
> ............
> </frame>
> <frame src="a.jsp">
> </frameset>
> .............
> .............
> </body>
> <html>
>
> where ...... is for html code.
>
> If I try to access html elements under the jsp "a.jsp", it returns me a
> null. Why?
How are you trying to access the elements and from where? You will need
to properly traverse the DOM to get at the elements you want (I usually
use window.top.xxxx where xxxx is the name assigned to the frame, which I
notice you don't have).
Remember that frames are separate documents entirely, it is not like doing
an include. Based on the structure you show here, which is somewhat
atypical, I suspect your thinking of it as an include, and hence the
problem your seeing.
> Thanks in advance.
>
> Regards,
> Ashish A.
Frank
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Antwort: Frames in JSP.
Posted by Th...@ethalon.de.
<an...@wipro.com> schrieb am 11.01.2006 17:19:30:
> Dear All,
> I have a JSP like the following
> <html>
> <head>
> .............
> .............
> </head>
> <body>
> ................
> ................
> <frameset>
> <frame>
> ............
> ............
> </frame>
> <frame src="a.jsp">
> </frameset>
> .............
> .............
> </body>
> <html>
This is, by the way, not a valid frameset definition.
It should look like:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"
"http://www.w3.org/TR/html4/frameset.dtd">
<html>
<head>
<title>title</title>
</head>
<frameset ...>
<frame ...>
<noframes>
<body>
alternate text
</body>
</noframes>
</frameset>
</html>
Regards,
Thomas
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org