You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Alan Weissman <aw...@nyc.yamaha.com> on 2004/03/02 23:14:17 UTC

BODY onLoad Workaround

Hey everyone -

 

            So I have a Struts/Tiles page that I need to have a
Javascript function called on when the page loads.  Normally this is of
course accomplished with the BODY onLoad event however this event isn't
fired when my page loads and from doing extensive Googling I've found
that this has something to do with the nature of Struts/Tiles pages
(though I'm not sure what).  What is the best workaround for this?

 

Thanks so much,

Alan


Re: BODY onLoad Workaround

Posted by Joe Germuska <Jo...@Germuska.com>.
>            So I have a Struts/Tiles page that I need to have a
>Javascript function called on when the page loads.  Normally this is of
>course accomplished with the BODY onLoad event however this event isn't
>fired when my page loads and from doing extensive Googling I've found
>that this has something to do with the nature of Struts/Tiles pages
>(though I'm not sure what).  What is the best workaround for this?

You've gotten a number of answers that may have already helped you; 
none, however, are in the context of the challenge we met with tiles 
and onload handlers.  In our tilesets, we usually have the "<body>" 
tags in a shared file, while the "meat" of the page which might 
require an onload hander is loaded from a different JSP.  We didn't 
always have an onload handler, so we didn't know what to put in the 
shared tile page which included the body tags.

For a while, we used a solution like one posted here, where we just 
defined the onload handler as another tile attribute, and then could 
set it (or leave it blank) for each tiles definition as necessary.

Since then, though, I've realized that because Javascript functions 
are objects, you can actually assign the onload handler in 
javascript...


function myHandler { ... }
document.onload = myHandler;

This seems tidier than having to use a tiles attribute.

Joe

-- 
Joe Germuska            
Joe@Germuska.com  
http://blog.germuska.com    
       "Imagine if every Thursday your shoes exploded if you tied them 
the usual way.  This happens to us all the time with computers, and 
nobody thinks of complaining."
             -- Jef Raskin

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: BODY onLoad Workaround

Posted by Mark Lowe <ma...@talk21.com>.
correction

<tiles:useAttribute name="javascriptHack" scope="page" />

On 2 Mar 2004, at 23:33, Mark Lowe wrote:

> Iframe would be one possible hack. Have the page that loads run a 
> javascript function that drills back up to your page.
>
> or an onload on an image, or simply execute the function in the page.
>
> lastly have something like this in your layout
>
> <tile:get name="javascriptHack" scope="page" />
>
> <script language="javascript" type="text/javascript">
> <!--
> function myfuction() {
> 	<c:out value="${javascriptHack}" />;
> }
> //-->
> </script>
> <body onload="myfuction()">
>
> Stick your method as a put in that tile and have it empty for those 
> page where not required.
>
> <put name="javascriptHack" value="alert('my javascript hack')" 
> type="string" />
>
> the rest of the time
>
> <put name="javascriptHack" value="" type="string" />
>
> So the function always runs just usually contains nothing.
>
>
> On 2 Mar 2004, at 23:14, Alan Weissman wrote:
>
>> Hey everyone -
>>
>>
>>
>>             So I have a Struts/Tiles page that I need to have a
>> Javascript function called on when the page loads.  Normally this is 
>> of
>> course accomplished with the BODY onLoad event however this event 
>> isn't
>> fired when my page loads and from doing extensive Googling I've found
>> that this has something to do with the nature of Struts/Tiles pages
>> (though I'm not sure what).  What is the best workaround for this?
>>
>>
>>
>> Thanks so much,
>>
>> Alan
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: BODY onLoad Workaround

Posted by Mark Lowe <ma...@talk21.com>.
try a simple alert to test the <body onload=

you can try my other suggestions but i think the tiles way should work.

On 2 Mar 2004, at 23:39, Alan Weissman wrote:

> Thanks Mark for your response.
>
> The issue is that even without my layout, which contains the <body> 
> tag,
> if I add an onLoad event it is not fired.
>
> I have already tried calling the javascript function from somewhere in
> the page however it is always called before the entire page is actually
> rendered, which means that certain items on the page that the function
> operates on do not have all of their properties.
>
> Is there no way to mimic a body onLoad completely?
>
> Thanks,
> Alan
>
>
> -----Original Message-----
> From: Mark Lowe [mailto:mark.lowe@talk21.com]
> Sent: Tuesday, March 02, 2004 5:34 PM
> To: Struts Users Mailing List
> Subject: Re: BODY onLoad Workaround
>
> Iframe would be one possible hack. Have the page that loads run a
> javascript function that drills back up to your page.
>
> or an onload on an image, or simply execute the function in the page.
>
> lastly have something like this in your layout
>
> <tile:get name="javascriptHack" scope="page" />
>
> <script language="javascript" type="text/javascript">
> <!--
> function myfuction() {
> 	<c:out value="${javascriptHack}" />;
> }
> //-->
> </script>
> <body onload="myfuction()">
>
> Stick your method as a put in that tile and have it empty for those
> page where not required.
>
> <put name="javascriptHack" value="alert('my javascript hack')"
> type="string" />
>
> the rest of the time
>
> <put name="javascriptHack" value="" type="string" />
>
> So the function always runs just usually contains nothing.
>
>
> On 2 Mar 2004, at 23:14, Alan Weissman wrote:
>
>> Hey everyone -
>>
>>
>>
>>             So I have a Struts/Tiles page that I need to have a
>> Javascript function called on when the page loads.  Normally this is
> of
>> course accomplished with the BODY onLoad event however this event
> isn't
>> fired when my page loads and from doing extensive Googling I've found
>> that this has something to do with the nature of Struts/Tiles pages
>> (though I'm not sure what).  What is the best workaround for this?
>>
>>
>>
>> Thanks so much,
>>
>> Alan
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


RE: BODY onLoad Workaround

Posted by Alan Weissman <aw...@nyc.yamaha.com>.
Thanks Mark for your response.

The issue is that even without my layout, which contains the <body> tag,
if I add an onLoad event it is not fired.  

I have already tried calling the javascript function from somewhere in
the page however it is always called before the entire page is actually
rendered, which means that certain items on the page that the function
operates on do not have all of their properties.

Is there no way to mimic a body onLoad completely?

Thanks,
Alan


-----Original Message-----
From: Mark Lowe [mailto:mark.lowe@talk21.com] 
Sent: Tuesday, March 02, 2004 5:34 PM
To: Struts Users Mailing List
Subject: Re: BODY onLoad Workaround

Iframe would be one possible hack. Have the page that loads run a 
javascript function that drills back up to your page.

or an onload on an image, or simply execute the function in the page.

lastly have something like this in your layout

<tile:get name="javascriptHack" scope="page" />

<script language="javascript" type="text/javascript">
<!--
function myfuction() {
	<c:out value="${javascriptHack}" />;
}
//-->
</script>
<body onload="myfuction()">

Stick your method as a put in that tile and have it empty for those 
page where not required.

<put name="javascriptHack" value="alert('my javascript hack')" 
type="string" />

the rest of the time

<put name="javascriptHack" value="" type="string" />

So the function always runs just usually contains nothing.


On 2 Mar 2004, at 23:14, Alan Weissman wrote:

> Hey everyone -
>
>
>
>             So I have a Struts/Tiles page that I need to have a
> Javascript function called on when the page loads.  Normally this is
of
> course accomplished with the BODY onLoad event however this event
isn't
> fired when my page loads and from doing extensive Googling I've found
> that this has something to do with the nature of Struts/Tiles pages
> (though I'm not sure what).  What is the best workaround for this?
>
>
>
> Thanks so much,
>
> Alan
>


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: BODY onLoad Workaround

Posted by Mark Lowe <ma...@talk21.com>.
Iframe would be one possible hack. Have the page that loads run a 
javascript function that drills back up to your page.

or an onload on an image, or simply execute the function in the page.

lastly have something like this in your layout

<tile:get name="javascriptHack" scope="page" />

<script language="javascript" type="text/javascript">
<!--
function myfuction() {
	<c:out value="${javascriptHack}" />;
}
//-->
</script>
<body onload="myfuction()">

Stick your method as a put in that tile and have it empty for those 
page where not required.

<put name="javascriptHack" value="alert('my javascript hack')" 
type="string" />

the rest of the time

<put name="javascriptHack" value="" type="string" />

So the function always runs just usually contains nothing.


On 2 Mar 2004, at 23:14, Alan Weissman wrote:

> Hey everyone -
>
>
>
>             So I have a Struts/Tiles page that I need to have a
> Javascript function called on when the page loads.  Normally this is of
> course accomplished with the BODY onLoad event however this event isn't
> fired when my page loads and from doing extensive Googling I've found
> that this has something to do with the nature of Struts/Tiles pages
> (though I'm not sure what).  What is the best workaround for this?
>
>
>
> Thanks so much,
>
> Alan
>


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: BODY onLoad Workaround

Posted by Mark Lowe <ma...@talk21.com>.
view the source..

On 2 Mar 2004, at 23:58, Alan Weissman wrote:

> Thanks everyone for all your attention to this.  Now I'm really  
> confused
> because I am positive my event isn't being called.  Here is the source
> to my layout page.  Pages that use this layout do not get any alert box
> popping up.
>
> Thanks again,
> Alan
>
> <%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %>
> <html>
>
> <head>
>
> <script language="JavaScript" src="js_css/javaScript.js"
> type="text/javascript"> </script>
>
> <title><tiles:getAsString name="title"/></title>
>
> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2"
> />
>
> </head>
>
> <body onload="alert()" marginwidth="0" marginheight="0" leftmargin="0"
> topmargin="0" bgcolor="#FFFFFF">
>
> <table width="690" border="0" cellpadding="0" cellspacing="0"><tr><td>
>
> <table width="690" border=0 cellpadding=0 cellspacing=0>
> <tr>
>   <td>
>     <tiles:get name="header"/>
>   </td>
> </tr>
> <tr>
>   <td>
>     <tiles:get name="nav"/>
>   </td>
> </tr>
> <tr>
>   <td>
>     <tiles:insert attribute="body"/>
>   </td>
> </tr>
> <tr>
>   <td>
>     <tiles:get name="footer"/>
>   </td>
> </tr>
> </table>
>
> </td>
> </tr>
>
> </body>
> </html>
>
>
>
> -----Original Message-----
> From: Alexander Craen [mailto:alexander.craen@netural.be]
> Sent: Tuesday, March 02, 2004 5:53 PM
> To: Struts Users Mailing List
> Subject: Re: BODY onLoad Workaround
>
> Hi Alain,
>
> I have used the body onload successfully
>
> http://order.scarlet.be/order/adsl/start.do?language=nl&regcode=PIBUS- 
> WS
> &accode=AcUjjdIK&product=One
>
> Using it quite often...
> I dont have the struts source code here at home... but if you want it I
> could look into it tomorrow at work..
>
> grtz
> Alexander Craen
>
>
> ----- Original Message -----
> From: "Richard Yee" <ry...@yahoo.com>
> To: "Struts Users Mailing List" <st...@jakarta.apache.org>
> Sent: Tuesday, March 02, 2004 11:44 PM
> Subject: Re: BODY onLoad Workaround
>
>
>> Alan,
>> I don't see any problem with using the BODY onLoad
>> event handler. I also searched on Google and found
>> several instances where others are using it without
>> any problems. What does your code look like? What
>> happens when you do a view/source in the browser? Have
>> you tried using Netscape and looking at the JavaScript
>> console?
>>
>> -Richard
>>
>>
>>
>> --- Alan Weissman <aw...@nyc.yamaha.com> wrote:
>>> Hey everyone -
>>>
>>>
>>>
>>>             So I have a Struts/Tiles page that I
>>> need to have a
>>> Javascript function called on when the page loads.
>>> Normally this is of
>>> course accomplished with the BODY onLoad event
>>> however this event isn't
>>> fired when my page loads and from doing extensive
>>> Googling I've found
>>> that this has something to do with the nature of
>>> Struts/Tiles pages
>>> (though I'm not sure what).  What is the best
>>> workaround for this?
>>>
>>>
>>>
>>> Thanks so much,
>>>
>>> Alan
>>>
>>>
>>
>>
>> __________________________________
>> Do you Yahoo!?
>> Yahoo! Search - Find what you're looking for faster
>> http://search.yahoo.com
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


RE: BODY onLoad Workaround

Posted by Alan Weissman <aw...@nyc.yamaha.com>.
Thanks everyone for all your attention to this.  Now I'm really confused
because I am positive my event isn't being called.  Here is the source
to my layout page.  Pages that use this layout do not get any alert box
popping up.

Thanks again,
Alan

<%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %>
<html>

<head>

<script language="JavaScript" src="js_css/javaScript.js"
type="text/javascript"> </script>

<title><tiles:getAsString name="title"/></title>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2"
/>

</head>

<body onload="alert()" marginwidth="0" marginheight="0" leftmargin="0"
topmargin="0" bgcolor="#FFFFFF">

<table width="690" border="0" cellpadding="0" cellspacing="0"><tr><td>

<table width="690" border=0 cellpadding=0 cellspacing=0>
<tr>
  <td>
    <tiles:get name="header"/>
  </td>
</tr>
<tr>
  <td>
    <tiles:get name="nav"/>
  </td>
</tr>
<tr>
  <td>
    <tiles:insert attribute="body"/>
  </td>
</tr>
<tr>
  <td>
    <tiles:get name="footer"/>
  </td>
</tr>
</table>

</td>
</tr>

</body>
</html>



-----Original Message-----
From: Alexander Craen [mailto:alexander.craen@netural.be] 
Sent: Tuesday, March 02, 2004 5:53 PM
To: Struts Users Mailing List
Subject: Re: BODY onLoad Workaround

Hi Alain,

I have used the body onload successfully

http://order.scarlet.be/order/adsl/start.do?language=nl&regcode=PIBUS-WS
&accode=AcUjjdIK&product=One

Using it quite often...
I dont have the struts source code here at home... but if you want it I
could look into it tomorrow at work..

grtz
Alexander Craen


----- Original Message ----- 
From: "Richard Yee" <ry...@yahoo.com>
To: "Struts Users Mailing List" <st...@jakarta.apache.org>
Sent: Tuesday, March 02, 2004 11:44 PM
Subject: Re: BODY onLoad Workaround


> Alan,
> I don't see any problem with using the BODY onLoad
> event handler. I also searched on Google and found
> several instances where others are using it without
> any problems. What does your code look like? What
> happens when you do a view/source in the browser? Have
> you tried using Netscape and looking at the JavaScript
> console?
>
> -Richard
>
>
>
> --- Alan Weissman <aw...@nyc.yamaha.com> wrote:
> > Hey everyone -
> >
> >
> >
> >             So I have a Struts/Tiles page that I
> > need to have a
> > Javascript function called on when the page loads.
> > Normally this is of
> > course accomplished with the BODY onLoad event
> > however this event isn't
> > fired when my page loads and from doing extensive
> > Googling I've found
> > that this has something to do with the nature of
> > Struts/Tiles pages
> > (though I'm not sure what).  What is the best
> > workaround for this?
> >
> >
> >
> > Thanks so much,
> >
> > Alan
> >
> >
>
>
> __________________________________
> Do you Yahoo!?
> Yahoo! Search - Find what you're looking for faster
> http://search.yahoo.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: BODY onLoad Workaround

Posted by Alexander Craen <al...@netural.be>.
Hi Alain,

I have used the body onload successfully

http://order.scarlet.be/order/adsl/start.do?language=nl&regcode=PIBUS-WS&accode=AcUjjdIK&product=One

Using it quite often...
I dont have the struts source code here at home... but if you want it I
could look into it tomorrow at work..

grtz
Alexander Craen


----- Original Message ----- 
From: "Richard Yee" <ry...@yahoo.com>
To: "Struts Users Mailing List" <st...@jakarta.apache.org>
Sent: Tuesday, March 02, 2004 11:44 PM
Subject: Re: BODY onLoad Workaround


> Alan,
> I don't see any problem with using the BODY onLoad
> event handler. I also searched on Google and found
> several instances where others are using it without
> any problems. What does your code look like? What
> happens when you do a view/source in the browser? Have
> you tried using Netscape and looking at the JavaScript
> console?
>
> -Richard
>
>
>
> --- Alan Weissman <aw...@nyc.yamaha.com> wrote:
> > Hey everyone -
> >
> >
> >
> >             So I have a Struts/Tiles page that I
> > need to have a
> > Javascript function called on when the page loads.
> > Normally this is of
> > course accomplished with the BODY onLoad event
> > however this event isn't
> > fired when my page loads and from doing extensive
> > Googling I've found
> > that this has something to do with the nature of
> > Struts/Tiles pages
> > (though I'm not sure what).  What is the best
> > workaround for this?
> >
> >
> >
> > Thanks so much,
> >
> > Alan
> >
> >
>
>
> __________________________________
> Do you Yahoo!?
> Yahoo! Search - Find what you're looking for faster
> http://search.yahoo.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


RE: BODY onLoad Workaround

Posted by Richard Yee <ry...@yahoo.com>.
Interesting...

Empty alerts work fine in IE.

-Richard

--- russo@albany.edu wrote:
> You cannot have an empty alert. At least under
> Firefox browser:
> 
> That is:
> 
> This works:
> <html>
> <body onload="alert('Hello')">
> THe doc body.
> </body>
> </html>
> 
> But this doesn't:
> <html>
> <body onload="alert()">
> THe doc body.
> </body>
> </html>
> 
> You can also try validating your page:
> http://validator.w3.org/
> You may have some bad HTML
> -R^3
> 
> On Tue, 2 Mar 2004, Alan Weissman wrote:
> 
> > Ok something incredibly strange is afoot:
> >
> > If I do a view source and save the source code,
> then load the page from
> > the file system, the alert() works.
> >
> > If I use IE to save the page and then load the
> page from the file
> > system, I do not get a full page saved, and though
> the alert() is in the
> > body tag, it is not called.
> >
> > I have never run into anything like this before. 
> Though I'm starting to
> > think this might not be a Struts/Tiles thing.
> >
> > Any thoughts?
> >
> > Thanks so much,
> > Alan
> >
> > -----Original Message-----
> > From: Alan Weissman
> [mailto:aweissman@nyc.yamaha.com]
> > Sent: Tuesday, March 02, 2004 6:03 PM
> > To: 'Struts Users Mailing List'
> > Subject: RE: BODY onLoad Workaround
> >
> > Hey Mark, could you explain what you mean?  I've
> tried shutting down
> > Tomcat and restarting, which shouldn't make a
> difference.  I can also
> > verify that  onload="alert()" is part of the page
> by doing a view
> > source.
> >
> > Thanks,
> > Alan
> >
> > -----Original Message-----
> > From: Mark Lowe [mailto:mark.lowe@talk21.com]
> > Sent: Tuesday, March 02, 2004 6:00 PM
> > To: Struts Users Mailing List
> > Subject: Re: BODY onLoad Workaround
> >
> > I guess its possible that the layout isn't getting
> reloaded with the
> > tiles request.
> >
> > an iframe or an image will do as a quick hack.
> >
> > <iframe width="0" height="0" src="foo.html" />
> >
> > On 2 Mar 2004, at 23:51, Alan Weissman wrote:
> >
> > > Thanks Richard for your input.  Can you let me
> know where you see
> > > people
> > > using it?  I have an onLoad="alert('body
> onload')" on my BODY tag
> > which
> > > resides in my layout and it is not being called.
> > >
> > > I also found this, which leads me to believe
> that I am not alone in
> > > this
> > > problem.  I am however, not able to find where
> to download the tag
> > > library the page refers to.
> > >
> > >
>
http://retep.org/retep/wiki/retep/taglib/common/onload/index.html
> > >
> > > Thanks again,
> > > Alan
> > >
> > > -----Original Message-----
> > > From: Richard Yee [mailto:ryee86@yahoo.com]
> > > Sent: Tuesday, March 02, 2004 5:45 PM
> > > To: Struts Users Mailing List
> > > Subject: Re: BODY onLoad Workaround
> > >
> > > Alan,
> > > I don't see any problem with using the BODY
> onLoad
> > > event handler. I also searched on Google and
> found
> > > several instances where others are using it
> without
> > > any problems. What does your code look like?
> What
> > > happens when you do a view/source in the
> browser? Have
> > > you tried using Netscape and looking at the
> JavaScript
> > > console?
> > >
> > > -Richard
> > >
> > >
> > >
> > > --- Alan Weissman <aw...@nyc.yamaha.com>
> wrote:
> > >> Hey everyone -
> > >>
> > >>
> > >>
> > >>             So I have a Struts/Tiles page that
> I
> > >> need to have a
> > >> Javascript function called on when the page
> loads.
> > >> Normally this is of
> > >> course accomplished with the BODY onLoad event
> > >> however this event isn't
> > >> fired when my page loads and from doing
> extensive
> > >> Googling I've found
> > >> that this has something to do with the nature
> of
> > >> Struts/Tiles pages
> > >> (though I'm not sure what).  What is the best
> > >> workaround for this?
> > >>
> > >>
> > >>
> > >> Thanks so much,
> > >>
> > >> Alan
> > >>
> > >>
> > >
> > >
> > > __________________________________
> > > Do you Yahoo!?
> > > Yahoo! Search - Find what you're looking for
> faster
> > > http://search.yahoo.com
> > >
> > >
>
---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> struts-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail:
> struts-user-help@jakarta.apache.org
> > >
> > >
> > >
> > >
>
---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> struts-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail:
> struts-user-help@jakarta.apache.org
> > >
> >
> >
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> struts-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail:
> struts-user-help@jakarta.apache.org
> >
> >
> >
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> struts-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail:
> struts-user-help@jakarta.apache.org
> >
> >
> >
> 
=== message truncated ===


__________________________________
Do you Yahoo!?
Yahoo! Search - Find what you�re looking for faster
http://search.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


RE: BODY onLoad Workaround

Posted by Alan Weissman <aw...@nyc.yamaha.com>.
This does not appear to be the problem.  I have tried alerts with and
without values, calling other function which display alerts, etc.



-----Original Message-----
From: russo@albany.edu [mailto:russo@albany.edu] 
Sent: Tuesday, March 02, 2004 6:15 PM
To: Alan Weissman
Cc: 'Struts Users Mailing List'
Subject: RE: BODY onLoad Workaround

You cannot have an empty alert. At least under Firefox browser:

That is:

This works:
<html>
<body onload="alert('Hello')">
THe doc body.
</body>
</html>

But this doesn't:
<html>
<body onload="alert()">
THe doc body.
</body>
</html>

You can also try validating your page:
http://validator.w3.org/
You may have some bad HTML
-R^3

On Tue, 2 Mar 2004, Alan Weissman wrote:

> Ok something incredibly strange is afoot:
>
> If I do a view source and save the source code, then load the page
from
> the file system, the alert() works.
>
> If I use IE to save the page and then load the page from the file
> system, I do not get a full page saved, and though the alert() is in
the
> body tag, it is not called.
>
> I have never run into anything like this before.  Though I'm starting
to
> think this might not be a Struts/Tiles thing.
>
> Any thoughts?
>
> Thanks so much,
> Alan
>
> -----Original Message-----
> From: Alan Weissman [mailto:aweissman@nyc.yamaha.com]
> Sent: Tuesday, March 02, 2004 6:03 PM
> To: 'Struts Users Mailing List'
> Subject: RE: BODY onLoad Workaround
>
> Hey Mark, could you explain what you mean?  I've tried shutting down
> Tomcat and restarting, which shouldn't make a difference.  I can also
> verify that  onload="alert()" is part of the page by doing a view
> source.
>
> Thanks,
> Alan
>
> -----Original Message-----
> From: Mark Lowe [mailto:mark.lowe@talk21.com]
> Sent: Tuesday, March 02, 2004 6:00 PM
> To: Struts Users Mailing List
> Subject: Re: BODY onLoad Workaround
>
> I guess its possible that the layout isn't getting reloaded with the
> tiles request.
>
> an iframe or an image will do as a quick hack.
>
> <iframe width="0" height="0" src="foo.html" />
>
> On 2 Mar 2004, at 23:51, Alan Weissman wrote:
>
> > Thanks Richard for your input.  Can you let me know where you see
> > people
> > using it?  I have an onLoad="alert('body onload')" on my BODY tag
> which
> > resides in my layout and it is not being called.
> >
> > I also found this, which leads me to believe that I am not alone in
> > this
> > problem.  I am however, not able to find where to download the tag
> > library the page refers to.
> >
> > http://retep.org/retep/wiki/retep/taglib/common/onload/index.html
> >
> > Thanks again,
> > Alan
> >
> > -----Original Message-----
> > From: Richard Yee [mailto:ryee86@yahoo.com]
> > Sent: Tuesday, March 02, 2004 5:45 PM
> > To: Struts Users Mailing List
> > Subject: Re: BODY onLoad Workaround
> >
> > Alan,
> > I don't see any problem with using the BODY onLoad
> > event handler. I also searched on Google and found
> > several instances where others are using it without
> > any problems. What does your code look like? What
> > happens when you do a view/source in the browser? Have
> > you tried using Netscape and looking at the JavaScript
> > console?
> >
> > -Richard
> >
> >
> >
> > --- Alan Weissman <aw...@nyc.yamaha.com> wrote:
> >> Hey everyone -
> >>
> >>
> >>
> >>             So I have a Struts/Tiles page that I
> >> need to have a
> >> Javascript function called on when the page loads.
> >> Normally this is of
> >> course accomplished with the BODY onLoad event
> >> however this event isn't
> >> fired when my page loads and from doing extensive
> >> Googling I've found
> >> that this has something to do with the nature of
> >> Struts/Tiles pages
> >> (though I'm not sure what).  What is the best
> >> workaround for this?
> >>
> >>
> >>
> >> Thanks so much,
> >>
> >> Alan
> >>
> >>
> >
> >
> > __________________________________
> > Do you Yahoo!?
> > Yahoo! Search - Find what you're looking for faster
> > http://search.yahoo.com
> >
> >
---------------------------------------------------------------------
> > To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: struts-user-help@jakarta.apache.org
> >
> >
> >
> >
---------------------------------------------------------------------
> > To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: struts-user-help@jakarta.apache.org
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
>

|----------------------------------|
| Ryan Russo                       |
| russo@[noSPAM].albany.edu        |
| University at Albany--Computing  |
| <<remove [noSPAM] to e-mail>>    |
| Technical Services Web Team      |
|__________________________________|

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


RE: BODY onLoad Workaround

Posted by ru...@albany.edu.
You cannot have an empty alert. At least under Firefox browser:

That is:

This works:
<html>
<body onload="alert('Hello')">
THe doc body.
</body>
</html>

But this doesn't:
<html>
<body onload="alert()">
THe doc body.
</body>
</html>

You can also try validating your page:
http://validator.w3.org/
You may have some bad HTML
-R^3

On Tue, 2 Mar 2004, Alan Weissman wrote:

> Ok something incredibly strange is afoot:
>
> If I do a view source and save the source code, then load the page from
> the file system, the alert() works.
>
> If I use IE to save the page and then load the page from the file
> system, I do not get a full page saved, and though the alert() is in the
> body tag, it is not called.
>
> I have never run into anything like this before.  Though I'm starting to
> think this might not be a Struts/Tiles thing.
>
> Any thoughts?
>
> Thanks so much,
> Alan
>
> -----Original Message-----
> From: Alan Weissman [mailto:aweissman@nyc.yamaha.com]
> Sent: Tuesday, March 02, 2004 6:03 PM
> To: 'Struts Users Mailing List'
> Subject: RE: BODY onLoad Workaround
>
> Hey Mark, could you explain what you mean?  I've tried shutting down
> Tomcat and restarting, which shouldn't make a difference.  I can also
> verify that  onload="alert()" is part of the page by doing a view
> source.
>
> Thanks,
> Alan
>
> -----Original Message-----
> From: Mark Lowe [mailto:mark.lowe@talk21.com]
> Sent: Tuesday, March 02, 2004 6:00 PM
> To: Struts Users Mailing List
> Subject: Re: BODY onLoad Workaround
>
> I guess its possible that the layout isn't getting reloaded with the
> tiles request.
>
> an iframe or an image will do as a quick hack.
>
> <iframe width="0" height="0" src="foo.html" />
>
> On 2 Mar 2004, at 23:51, Alan Weissman wrote:
>
> > Thanks Richard for your input.  Can you let me know where you see
> > people
> > using it?  I have an onLoad="alert('body onload')" on my BODY tag
> which
> > resides in my layout and it is not being called.
> >
> > I also found this, which leads me to believe that I am not alone in
> > this
> > problem.  I am however, not able to find where to download the tag
> > library the page refers to.
> >
> > http://retep.org/retep/wiki/retep/taglib/common/onload/index.html
> >
> > Thanks again,
> > Alan
> >
> > -----Original Message-----
> > From: Richard Yee [mailto:ryee86@yahoo.com]
> > Sent: Tuesday, March 02, 2004 5:45 PM
> > To: Struts Users Mailing List
> > Subject: Re: BODY onLoad Workaround
> >
> > Alan,
> > I don't see any problem with using the BODY onLoad
> > event handler. I also searched on Google and found
> > several instances where others are using it without
> > any problems. What does your code look like? What
> > happens when you do a view/source in the browser? Have
> > you tried using Netscape and looking at the JavaScript
> > console?
> >
> > -Richard
> >
> >
> >
> > --- Alan Weissman <aw...@nyc.yamaha.com> wrote:
> >> Hey everyone -
> >>
> >>
> >>
> >>             So I have a Struts/Tiles page that I
> >> need to have a
> >> Javascript function called on when the page loads.
> >> Normally this is of
> >> course accomplished with the BODY onLoad event
> >> however this event isn't
> >> fired when my page loads and from doing extensive
> >> Googling I've found
> >> that this has something to do with the nature of
> >> Struts/Tiles pages
> >> (though I'm not sure what).  What is the best
> >> workaround for this?
> >>
> >>
> >>
> >> Thanks so much,
> >>
> >> Alan
> >>
> >>
> >
> >
> > __________________________________
> > Do you Yahoo!?
> > Yahoo! Search - Find what you're looking for faster
> > http://search.yahoo.com
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: struts-user-help@jakarta.apache.org
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: struts-user-help@jakarta.apache.org
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
>

|----------------------------------|
| Ryan Russo                       |
| russo@[noSPAM].albany.edu        |
| University at Albany--Computing  |
| <<remove [noSPAM] to e-mail>>    |
| Technical Services Web Team      |
|__________________________________|

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


RE: BODY onLoad Workaround

Posted by Alan Weissman <aw...@nyc.yamaha.com>.
I have to head home as its late here in NYC.  Thanks to everyone for
your help.  I am going to try to simplify my (incredibly complicated)
page in the morning and if I still have a problem I hope to at least be
able to provide a simplified example.  But hopefully I'll be able to
share the cause with you :)

Thanks again,
Alan

-----Original Message-----
From: Alan Weissman [mailto:aweissman@nyc.yamaha.com] 
Sent: Tuesday, March 02, 2004 6:19 PM
To: 'Struts Users Mailing List'
Subject: RE: BODY onLoad Workaround

Unfortunately, this does not change the behavior.

Would it be helpful or just ridiculous for me to post my page?  It's
probably about 1000 lines long.

-----Original Message-----
From: Richard Yee [mailto:ryee86@yahoo.com] 
Sent: Tuesday, March 02, 2004 6:16 PM
To: Struts Users Mailing List
Subject: RE: BODY onLoad Workaround

Try putting a semicolon after your alert() call. It
works for me.

<body onLoad="alert('hi');" .....


-Richard


--- Alan Weissman <aw...@nyc.yamaha.com> wrote:
> Ok something incredibly strange is afoot:
> 
> If I do a view source and save the source code, then
> load the page from
> the file system, the alert() works.
> 
> If I use IE to save the page and then load the page
> from the file
> system, I do not get a full page saved, and though
> the alert() is in the
> body tag, it is not called.
> 
> I have never run into anything like this before. 
> Though I'm starting to
> think this might not be a Struts/Tiles thing.  
> 
> Any thoughts?
> 
> Thanks so much,
> Alan
> 
> -----Original Message-----
> From: Alan Weissman
> [mailto:aweissman@nyc.yamaha.com] 
> Sent: Tuesday, March 02, 2004 6:03 PM
> To: 'Struts Users Mailing List'
> Subject: RE: BODY onLoad Workaround
> 
> Hey Mark, could you explain what you mean?  I've
> tried shutting down
> Tomcat and restarting, which shouldn't make a
> difference.  I can also
> verify that  onload="alert()" is part of the page by
> doing a view
> source.
> 
> Thanks,
> Alan
> 
> -----Original Message-----
> From: Mark Lowe [mailto:mark.lowe@talk21.com] 
> Sent: Tuesday, March 02, 2004 6:00 PM
> To: Struts Users Mailing List
> Subject: Re: BODY onLoad Workaround
> 
> I guess its possible that the layout isn't getting
> reloaded with the 
> tiles request.
> 
> an iframe or an image will do as a quick hack.
> 
> <iframe width="0" height="0" src="foo.html" />
> 
> On 2 Mar 2004, at 23:51, Alan Weissman wrote:
> 
> > Thanks Richard for your input.  Can you let me
> know where you see 
> > people
> > using it?  I have an onLoad="alert('body onload')"
> on my BODY tag
> which
> > resides in my layout and it is not being called.
> >
> > I also found this, which leads me to believe that
> I am not alone in 
> > this
> > problem.  I am however, not able to find where to
> download the tag
> > library the page refers to.
> >
> >
>
http://retep.org/retep/wiki/retep/taglib/common/onload/index.html
> >
> > Thanks again,
> > Alan
> >
> > -----Original Message-----
> > From: Richard Yee [mailto:ryee86@yahoo.com]
> > Sent: Tuesday, March 02, 2004 5:45 PM
> > To: Struts Users Mailing List
> > Subject: Re: BODY onLoad Workaround
> >
> > Alan,
> > I don't see any problem with using the BODY onLoad
> > event handler. I also searched on Google and found
> > several instances where others are using it
> without
> > any problems. What does your code look like? What
> > happens when you do a view/source in the browser?
> Have
> > you tried using Netscape and looking at the
> JavaScript
> > console?
> >
> > -Richard
> >
> >
> >
> > --- Alan Weissman <aw...@nyc.yamaha.com>
> wrote:
> >> Hey everyone -
> >>
> >>
> >>
> >>             So I have a Struts/Tiles page that I
> >> need to have a
> >> Javascript function called on when the page
> loads.
> >> Normally this is of
> >> course accomplished with the BODY onLoad event
> >> however this event isn't
> >> fired when my page loads and from doing extensive
> >> Googling I've found
> >> that this has something to do with the nature of
> >> Struts/Tiles pages
> >> (though I'm not sure what).  What is the best
> >> workaround for this?
> >>
> >>
> >>
> >> Thanks so much,
> >>
> >> Alan
> >>
> >>
> >
> >
> > __________________________________
> > Do you Yahoo!?
> > Yahoo! Search - Find what you're looking for
> faster
> > http://search.yahoo.com
> >
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> struts-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail:
> struts-user-help@jakarta.apache.org
> >
> >
> >
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> struts-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail:
> struts-user-help@jakarta.apache.org
> >
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> struts-user-help@jakarta.apache.org
> 
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> struts-user-help@jakarta.apache.org
> 
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> struts-user-help@jakarta.apache.org
> 


__________________________________
Do you Yahoo!?
Yahoo! Search - Find what you're looking for faster
http://search.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


RE: BODY onLoad Workaround

Posted by Alan Weissman <aw...@nyc.yamaha.com>.
Unfortunately, this does not change the behavior.

Would it be helpful or just ridiculous for me to post my page?  It's
probably about 1000 lines long.

-----Original Message-----
From: Richard Yee [mailto:ryee86@yahoo.com] 
Sent: Tuesday, March 02, 2004 6:16 PM
To: Struts Users Mailing List
Subject: RE: BODY onLoad Workaround

Try putting a semicolon after your alert() call. It
works for me.

<body onLoad="alert('hi');" .....


-Richard


--- Alan Weissman <aw...@nyc.yamaha.com> wrote:
> Ok something incredibly strange is afoot:
> 
> If I do a view source and save the source code, then
> load the page from
> the file system, the alert() works.
> 
> If I use IE to save the page and then load the page
> from the file
> system, I do not get a full page saved, and though
> the alert() is in the
> body tag, it is not called.
> 
> I have never run into anything like this before. 
> Though I'm starting to
> think this might not be a Struts/Tiles thing.  
> 
> Any thoughts?
> 
> Thanks so much,
> Alan
> 
> -----Original Message-----
> From: Alan Weissman
> [mailto:aweissman@nyc.yamaha.com] 
> Sent: Tuesday, March 02, 2004 6:03 PM
> To: 'Struts Users Mailing List'
> Subject: RE: BODY onLoad Workaround
> 
> Hey Mark, could you explain what you mean?  I've
> tried shutting down
> Tomcat and restarting, which shouldn't make a
> difference.  I can also
> verify that  onload="alert()" is part of the page by
> doing a view
> source.
> 
> Thanks,
> Alan
> 
> -----Original Message-----
> From: Mark Lowe [mailto:mark.lowe@talk21.com] 
> Sent: Tuesday, March 02, 2004 6:00 PM
> To: Struts Users Mailing List
> Subject: Re: BODY onLoad Workaround
> 
> I guess its possible that the layout isn't getting
> reloaded with the 
> tiles request.
> 
> an iframe or an image will do as a quick hack.
> 
> <iframe width="0" height="0" src="foo.html" />
> 
> On 2 Mar 2004, at 23:51, Alan Weissman wrote:
> 
> > Thanks Richard for your input.  Can you let me
> know where you see 
> > people
> > using it?  I have an onLoad="alert('body onload')"
> on my BODY tag
> which
> > resides in my layout and it is not being called.
> >
> > I also found this, which leads me to believe that
> I am not alone in 
> > this
> > problem.  I am however, not able to find where to
> download the tag
> > library the page refers to.
> >
> >
>
http://retep.org/retep/wiki/retep/taglib/common/onload/index.html
> >
> > Thanks again,
> > Alan
> >
> > -----Original Message-----
> > From: Richard Yee [mailto:ryee86@yahoo.com]
> > Sent: Tuesday, March 02, 2004 5:45 PM
> > To: Struts Users Mailing List
> > Subject: Re: BODY onLoad Workaround
> >
> > Alan,
> > I don't see any problem with using the BODY onLoad
> > event handler. I also searched on Google and found
> > several instances where others are using it
> without
> > any problems. What does your code look like? What
> > happens when you do a view/source in the browser?
> Have
> > you tried using Netscape and looking at the
> JavaScript
> > console?
> >
> > -Richard
> >
> >
> >
> > --- Alan Weissman <aw...@nyc.yamaha.com>
> wrote:
> >> Hey everyone -
> >>
> >>
> >>
> >>             So I have a Struts/Tiles page that I
> >> need to have a
> >> Javascript function called on when the page
> loads.
> >> Normally this is of
> >> course accomplished with the BODY onLoad event
> >> however this event isn't
> >> fired when my page loads and from doing extensive
> >> Googling I've found
> >> that this has something to do with the nature of
> >> Struts/Tiles pages
> >> (though I'm not sure what).  What is the best
> >> workaround for this?
> >>
> >>
> >>
> >> Thanks so much,
> >>
> >> Alan
> >>
> >>
> >
> >
> > __________________________________
> > Do you Yahoo!?
> > Yahoo! Search - Find what you're looking for
> faster
> > http://search.yahoo.com
> >
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> struts-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail:
> struts-user-help@jakarta.apache.org
> >
> >
> >
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> struts-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail:
> struts-user-help@jakarta.apache.org
> >
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> struts-user-help@jakarta.apache.org
> 
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> struts-user-help@jakarta.apache.org
> 
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> struts-user-help@jakarta.apache.org
> 


__________________________________
Do you Yahoo!?
Yahoo! Search - Find what you're looking for faster
http://search.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


RE: BODY onLoad Workaround

Posted by Richard Yee <ry...@yahoo.com>.
Try putting a semicolon after your alert() call. It
works for me.

<body onLoad="alert('hi');" .....


-Richard


--- Alan Weissman <aw...@nyc.yamaha.com> wrote:
> Ok something incredibly strange is afoot:
> 
> If I do a view source and save the source code, then
> load the page from
> the file system, the alert() works.
> 
> If I use IE to save the page and then load the page
> from the file
> system, I do not get a full page saved, and though
> the alert() is in the
> body tag, it is not called.
> 
> I have never run into anything like this before. 
> Though I'm starting to
> think this might not be a Struts/Tiles thing.  
> 
> Any thoughts?
> 
> Thanks so much,
> Alan
> 
> -----Original Message-----
> From: Alan Weissman
> [mailto:aweissman@nyc.yamaha.com] 
> Sent: Tuesday, March 02, 2004 6:03 PM
> To: 'Struts Users Mailing List'
> Subject: RE: BODY onLoad Workaround
> 
> Hey Mark, could you explain what you mean?  I've
> tried shutting down
> Tomcat and restarting, which shouldn't make a
> difference.  I can also
> verify that  onload="alert()" is part of the page by
> doing a view
> source.
> 
> Thanks,
> Alan
> 
> -----Original Message-----
> From: Mark Lowe [mailto:mark.lowe@talk21.com] 
> Sent: Tuesday, March 02, 2004 6:00 PM
> To: Struts Users Mailing List
> Subject: Re: BODY onLoad Workaround
> 
> I guess its possible that the layout isn't getting
> reloaded with the 
> tiles request.
> 
> an iframe or an image will do as a quick hack.
> 
> <iframe width="0" height="0" src="foo.html" />
> 
> On 2 Mar 2004, at 23:51, Alan Weissman wrote:
> 
> > Thanks Richard for your input.  Can you let me
> know where you see 
> > people
> > using it?  I have an onLoad="alert('body onload')"
> on my BODY tag
> which
> > resides in my layout and it is not being called.
> >
> > I also found this, which leads me to believe that
> I am not alone in 
> > this
> > problem.  I am however, not able to find where to
> download the tag
> > library the page refers to.
> >
> >
>
http://retep.org/retep/wiki/retep/taglib/common/onload/index.html
> >
> > Thanks again,
> > Alan
> >
> > -----Original Message-----
> > From: Richard Yee [mailto:ryee86@yahoo.com]
> > Sent: Tuesday, March 02, 2004 5:45 PM
> > To: Struts Users Mailing List
> > Subject: Re: BODY onLoad Workaround
> >
> > Alan,
> > I don't see any problem with using the BODY onLoad
> > event handler. I also searched on Google and found
> > several instances where others are using it
> without
> > any problems. What does your code look like? What
> > happens when you do a view/source in the browser?
> Have
> > you tried using Netscape and looking at the
> JavaScript
> > console?
> >
> > -Richard
> >
> >
> >
> > --- Alan Weissman <aw...@nyc.yamaha.com>
> wrote:
> >> Hey everyone -
> >>
> >>
> >>
> >>             So I have a Struts/Tiles page that I
> >> need to have a
> >> Javascript function called on when the page
> loads.
> >> Normally this is of
> >> course accomplished with the BODY onLoad event
> >> however this event isn't
> >> fired when my page loads and from doing extensive
> >> Googling I've found
> >> that this has something to do with the nature of
> >> Struts/Tiles pages
> >> (though I'm not sure what).  What is the best
> >> workaround for this?
> >>
> >>
> >>
> >> Thanks so much,
> >>
> >> Alan
> >>
> >>
> >
> >
> > __________________________________
> > Do you Yahoo!?
> > Yahoo! Search - Find what you're looking for
> faster
> > http://search.yahoo.com
> >
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> struts-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail:
> struts-user-help@jakarta.apache.org
> >
> >
> >
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> struts-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail:
> struts-user-help@jakarta.apache.org
> >
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> struts-user-help@jakarta.apache.org
> 
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> struts-user-help@jakarta.apache.org
> 
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> struts-user-help@jakarta.apache.org
> 


__________________________________
Do you Yahoo!?
Yahoo! Search - Find what you�re looking for faster
http://search.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


RE: BODY onLoad Workaround

Posted by Alan Weissman <aw...@nyc.yamaha.com>.
Ok something incredibly strange is afoot:

If I do a view source and save the source code, then load the page from
the file system, the alert() works.

If I use IE to save the page and then load the page from the file
system, I do not get a full page saved, and though the alert() is in the
body tag, it is not called.

I have never run into anything like this before.  Though I'm starting to
think this might not be a Struts/Tiles thing.  

Any thoughts?

Thanks so much,
Alan

-----Original Message-----
From: Alan Weissman [mailto:aweissman@nyc.yamaha.com] 
Sent: Tuesday, March 02, 2004 6:03 PM
To: 'Struts Users Mailing List'
Subject: RE: BODY onLoad Workaround

Hey Mark, could you explain what you mean?  I've tried shutting down
Tomcat and restarting, which shouldn't make a difference.  I can also
verify that  onload="alert()" is part of the page by doing a view
source.

Thanks,
Alan

-----Original Message-----
From: Mark Lowe [mailto:mark.lowe@talk21.com] 
Sent: Tuesday, March 02, 2004 6:00 PM
To: Struts Users Mailing List
Subject: Re: BODY onLoad Workaround

I guess its possible that the layout isn't getting reloaded with the 
tiles request.

an iframe or an image will do as a quick hack.

<iframe width="0" height="0" src="foo.html" />

On 2 Mar 2004, at 23:51, Alan Weissman wrote:

> Thanks Richard for your input.  Can you let me know where you see 
> people
> using it?  I have an onLoad="alert('body onload')" on my BODY tag
which
> resides in my layout and it is not being called.
>
> I also found this, which leads me to believe that I am not alone in 
> this
> problem.  I am however, not able to find where to download the tag
> library the page refers to.
>
> http://retep.org/retep/wiki/retep/taglib/common/onload/index.html
>
> Thanks again,
> Alan
>
> -----Original Message-----
> From: Richard Yee [mailto:ryee86@yahoo.com]
> Sent: Tuesday, March 02, 2004 5:45 PM
> To: Struts Users Mailing List
> Subject: Re: BODY onLoad Workaround
>
> Alan,
> I don't see any problem with using the BODY onLoad
> event handler. I also searched on Google and found
> several instances where others are using it without
> any problems. What does your code look like? What
> happens when you do a view/source in the browser? Have
> you tried using Netscape and looking at the JavaScript
> console?
>
> -Richard
>
>
>
> --- Alan Weissman <aw...@nyc.yamaha.com> wrote:
>> Hey everyone -
>>
>>
>>
>>             So I have a Struts/Tiles page that I
>> need to have a
>> Javascript function called on when the page loads.
>> Normally this is of
>> course accomplished with the BODY onLoad event
>> however this event isn't
>> fired when my page loads and from doing extensive
>> Googling I've found
>> that this has something to do with the nature of
>> Struts/Tiles pages
>> (though I'm not sure what).  What is the best
>> workaround for this?
>>
>>
>>
>> Thanks so much,
>>
>> Alan
>>
>>
>
>
> __________________________________
> Do you Yahoo!?
> Yahoo! Search - Find what you're looking for faster
> http://search.yahoo.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


RE: BODY onLoad Workaround

Posted by Alan Weissman <aw...@nyc.yamaha.com>.
Hey Mark, could you explain what you mean?  I've tried shutting down
Tomcat and restarting, which shouldn't make a difference.  I can also
verify that  onload="alert()" is part of the page by doing a view
source.

Thanks,
Alan

-----Original Message-----
From: Mark Lowe [mailto:mark.lowe@talk21.com] 
Sent: Tuesday, March 02, 2004 6:00 PM
To: Struts Users Mailing List
Subject: Re: BODY onLoad Workaround

I guess its possible that the layout isn't getting reloaded with the 
tiles request.

an iframe or an image will do as a quick hack.

<iframe width="0" height="0" src="foo.html" />

On 2 Mar 2004, at 23:51, Alan Weissman wrote:

> Thanks Richard for your input.  Can you let me know where you see 
> people
> using it?  I have an onLoad="alert('body onload')" on my BODY tag
which
> resides in my layout and it is not being called.
>
> I also found this, which leads me to believe that I am not alone in 
> this
> problem.  I am however, not able to find where to download the tag
> library the page refers to.
>
> http://retep.org/retep/wiki/retep/taglib/common/onload/index.html
>
> Thanks again,
> Alan
>
> -----Original Message-----
> From: Richard Yee [mailto:ryee86@yahoo.com]
> Sent: Tuesday, March 02, 2004 5:45 PM
> To: Struts Users Mailing List
> Subject: Re: BODY onLoad Workaround
>
> Alan,
> I don't see any problem with using the BODY onLoad
> event handler. I also searched on Google and found
> several instances where others are using it without
> any problems. What does your code look like? What
> happens when you do a view/source in the browser? Have
> you tried using Netscape and looking at the JavaScript
> console?
>
> -Richard
>
>
>
> --- Alan Weissman <aw...@nyc.yamaha.com> wrote:
>> Hey everyone -
>>
>>
>>
>>             So I have a Struts/Tiles page that I
>> need to have a
>> Javascript function called on when the page loads.
>> Normally this is of
>> course accomplished with the BODY onLoad event
>> however this event isn't
>> fired when my page loads and from doing extensive
>> Googling I've found
>> that this has something to do with the nature of
>> Struts/Tiles pages
>> (though I'm not sure what).  What is the best
>> workaround for this?
>>
>>
>>
>> Thanks so much,
>>
>> Alan
>>
>>
>
>
> __________________________________
> Do you Yahoo!?
> Yahoo! Search - Find what you're looking for faster
> http://search.yahoo.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: BODY onLoad Workaround

Posted by Mark Lowe <ma...@talk21.com>.
I guess its possible that the layout isn't getting reloaded with the 
tiles request.

an iframe or an image will do as a quick hack.

<iframe width="0" height="0" src="foo.html" />

On 2 Mar 2004, at 23:51, Alan Weissman wrote:

> Thanks Richard for your input.  Can you let me know where you see 
> people
> using it?  I have an onLoad="alert('body onload')" on my BODY tag which
> resides in my layout and it is not being called.
>
> I also found this, which leads me to believe that I am not alone in 
> this
> problem.  I am however, not able to find where to download the tag
> library the page refers to.
>
> http://retep.org/retep/wiki/retep/taglib/common/onload/index.html
>
> Thanks again,
> Alan
>
> -----Original Message-----
> From: Richard Yee [mailto:ryee86@yahoo.com]
> Sent: Tuesday, March 02, 2004 5:45 PM
> To: Struts Users Mailing List
> Subject: Re: BODY onLoad Workaround
>
> Alan,
> I don't see any problem with using the BODY onLoad
> event handler. I also searched on Google and found
> several instances where others are using it without
> any problems. What does your code look like? What
> happens when you do a view/source in the browser? Have
> you tried using Netscape and looking at the JavaScript
> console?
>
> -Richard
>
>
>
> --- Alan Weissman <aw...@nyc.yamaha.com> wrote:
>> Hey everyone -
>>
>>
>>
>>             So I have a Struts/Tiles page that I
>> need to have a
>> Javascript function called on when the page loads.
>> Normally this is of
>> course accomplished with the BODY onLoad event
>> however this event isn't
>> fired when my page loads and from doing extensive
>> Googling I've found
>> that this has something to do with the nature of
>> Struts/Tiles pages
>> (though I'm not sure what).  What is the best
>> workaround for this?
>>
>>
>>
>> Thanks so much,
>>
>> Alan
>>
>>
>
>
> __________________________________
> Do you Yahoo!?
> Yahoo! Search - Find what you're looking for faster
> http://search.yahoo.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


RE: BODY onLoad Workaround

Posted by Alan Weissman <aw...@nyc.yamaha.com>.
Thanks Richard for your input.  Can you let me know where you see people
using it?  I have an onLoad="alert('body onload')" on my BODY tag which
resides in my layout and it is not being called.

I also found this, which leads me to believe that I am not alone in this
problem.  I am however, not able to find where to download the tag
library the page refers to.

http://retep.org/retep/wiki/retep/taglib/common/onload/index.html

Thanks again,
Alan

-----Original Message-----
From: Richard Yee [mailto:ryee86@yahoo.com] 
Sent: Tuesday, March 02, 2004 5:45 PM
To: Struts Users Mailing List
Subject: Re: BODY onLoad Workaround

Alan,
I don't see any problem with using the BODY onLoad
event handler. I also searched on Google and found
several instances where others are using it without
any problems. What does your code look like? What
happens when you do a view/source in the browser? Have
you tried using Netscape and looking at the JavaScript
console?

-Richard



--- Alan Weissman <aw...@nyc.yamaha.com> wrote:
> Hey everyone -
> 
>  
> 
>             So I have a Struts/Tiles page that I
> need to have a
> Javascript function called on when the page loads. 
> Normally this is of
> course accomplished with the BODY onLoad event
> however this event isn't
> fired when my page loads and from doing extensive
> Googling I've found
> that this has something to do with the nature of
> Struts/Tiles pages
> (though I'm not sure what).  What is the best
> workaround for this?
> 
>  
> 
> Thanks so much,
> 
> Alan
> 
> 


__________________________________
Do you Yahoo!?
Yahoo! Search - Find what you're looking for faster
http://search.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: BODY onLoad Workaround

Posted by Richard Yee <ry...@yahoo.com>.
Alan,
I don't see any problem with using the BODY onLoad
event handler. I also searched on Google and found
several instances where others are using it without
any problems. What does your code look like? What
happens when you do a view/source in the browser? Have
you tried using Netscape and looking at the JavaScript
console?

-Richard



--- Alan Weissman <aw...@nyc.yamaha.com> wrote:
> Hey everyone -
> 
>  
> 
>             So I have a Struts/Tiles page that I
> need to have a
> Javascript function called on when the page loads. 
> Normally this is of
> course accomplished with the BODY onLoad event
> however this event isn't
> fired when my page loads and from doing extensive
> Googling I've found
> that this has something to do with the nature of
> Struts/Tiles pages
> (though I'm not sure what).  What is the best
> workaround for this?
> 
>  
> 
> Thanks so much,
> 
> Alan
> 
> 


__________________________________
Do you Yahoo!?
Yahoo! Search - Find what you�re looking for faster
http://search.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org