OK, I think that I've fixed it now.

In tip #9, there is a ">" at the end of the first line leaving what appears
to be an extra ">" at the end of the 2nd line. I originally noticed this
but being fairly new to Struts, I just assumed that it was there for a
reason. However, after getting a syntax error when loading the page and
removing the ">" so that the 2nd line became part of the first, everything
worked fine.

Original:

<SCRIPT language='javascript'>
    SRC='<html:rewrite page="/js/overlib_mini.js"/>'>
 </SCRIPT>

Corrected:

<SCRIPT language='javascript' SRC='<html:rewrite page
="/js/overlib_mini.js"/>'>
 </SCRIPT>

Richard



                                                                                       
                                                         
                    "Nicolas De                                                        
                                                         
                    Loof"                  To:     "Struts Users Mailing List" <[EMAIL 
PROTECTED]>                                 
                    <nicolas.deloof        cc:                                         
                                                         
                    @cgey.com>             Subject:     Re: Using rewrite to reference 
HTML Assets - Tip #9 Question                            
                                                                                       
                                                         
                    07/02/2003                                                         
                                                         
                    09:48 AM                                                           
                                                         
                    Please respond                                                     
                                                         
                    to "Struts                                                         
                                                         
                    Users Mailing                                                      
                                                         
                    List"                                                              
                                                         
                                                                                       
                                                         
                                                                                       
                                                         




Did you include the taglib definition on JSP header :

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

Look at generated HTML to see if <html:rewrite> tag has been fully
translated by JSP compiler.

Nico.


> Just signed up to the mailing list a few minutes ago so as you would
> probably expect, I have a question that I am hoping someone can help me
> with.
>
>  I'm trying to reference two javascript files but am unable to do it
> successfully using the example in tip#9.
>
> Everything works fine when I use
>
> <script language="JavaScript" src="/js/overlib_mini.js"></script>
> <script language="JavaScript" src="/js/calendar.js"></script>
>
> when I run the app in Netbeans with Tomcat but when I move the app to
> another server and it gets an application name, it loses the context
> relative URL so I tried to code it using the html rewrite as tip#9
> suggested but get an object expected error (it can't find the js files)
> when I click on the linked image.
>
> Can someone tell me what I am doing wrong or what else I can try to get
> this to work? I have been unable to find any documentation or examples
> elsewhere.
>
>
> Here's the applicable code:
>
> <head>
>
> <SCRIPT language='javascript'>
>    SRC='<html:rewrite page="/js/overlib_mini.js"/>'>
> </SCRIPT>
> <SCRIPT language='javascript'>
>    SRC='<html:rewrite page="/js/calendar.js"/>'>
> </SCRIPT>
>
> </head>
>
>
> <body>
> <html:form>
>
>                     <a href="javascript:show_calendar
> ('containerForm.containerCreatedDate');" onMouseOver="window.status='Date
> Picker'; overlib('Click here to choose a date from a one month pop-up
> calendar.'); return true;" onMouseOut="window.status=''; nd(); return
> true;"><html:img page="/Images/show-calendar.gif" width="24" height="22"
> border="0"/></a>
>
> </html:form>
> </body>
>
>
> Thanks!
>
> Richard
>
> **********************************************************************
> This message is intended only for the designated recipient(s).  It may
> contain confidential or proprietary information and may be subject to
> the attorney-client privilege or other confidentiality protections.
> If you are not a designated recipient, you may not review, use, copy
> or distribute this message.  If you receive this in error, please
> notify the sender by reply e-mail and delete this message.  Thank you.
>
> ***********************************************************************
>
>
> ---------------------------------------------------------------------
> 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]





**********************************************************************
This message is intended only for the designated recipient(s).  It may
contain confidential or proprietary information and may be subject to
the attorney-client privilege or other confidentiality protections.
If you are not a designated recipient, you may not review, use, copy
or distribute this message.  If you receive this in error, please
notify the sender by reply e-mail and delete this message.  Thank you. 

***********************************************************************


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

Reply via email to