Hi Saul,
Could you explain this a little more. I'm interested too.

For example, at the moment I'm just using the tag:

        <html:javascript formName="myForm" />

This brings down all the validator javascript in the page.

1) Is this what you mean by "static javascript"?

2) What exactly would you put in the staticJavascript.jsp page?

3) What's the difference between static and dynamic javascript?
(Probably a 
real dumb question :-) )

Am a bit confused :-)
Thanks,
Brian


-----Original Message-----
From: Yuan, Saul (TOR-ML) [mailto:[EMAIL PROTECTED] 
Sent: 01 October 2003 21:09
To: Struts Users Mailing List
Subject: RE: Question about minimizing javascript loaded into web page

If you don't want static javascript rendered inside your jsp page, you
can set:

staticJavascript="false" and have <script src="staticJavascript" ...
reference the static part.

Something like below:

<html:javascript formName="yourForm" method="validateYourForm"
dynamicJavascript="true" staticJavascript="false" />  

<script language="Javascript1.1" src="staticJavascript.jsp"></script>


Saul


> 
> I apologize if this is a question that has already been addressed, but
> I've
> not been able to find an answer...
> 
> We have implemented the validation framework into our webapp and it
works
> well.  We have noticed that all of the validation javascript is loaded
> into
> the web page, even if the validation is not applied on the page.  The
> loaded javascript can be over half of the loaded page's content.
> 
> I think my javascript tag (struts-html:javascript) looks right.  The
> dynamic javascript is built as expected, but the static javascript
just
> brings in everything.  Has anybody sen this before?
> 
> I appreciate any guidance.
> Nick
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to