[email protected]
[Top] [All Lists]

Re: @Message Component

Subject: Re: @Message Component
From: "Brian Long"
Date: Tue, 28 Feb 2006 10:28:00 +0000

one of the reasons that this is such an infuriating problem is that I can
see the path to the javascript file on my generated html page, Message.js,
with the doSomething() function, which shows an alert.

<script type="text/javascript"
<script type="text/javascript"
<script type="text/javascript" src="/myProject/WEB-INF/jwc/Message.js"

in the center of my page then are the TextFields with the attached
DatePicker and Message components

<td>Choose Date</td>
<td><input type="text" name="DatePicker" value="" title="dd MMM yyyy"
id="DatePicker"/>&nbsp;<a href="javascript:calendar_DatePicker.toggle(
<td>Enter Text</td>
<td><input type="text" name="Message" value="" id="Message"/>&nbsp;<a href=
"javascript:doSomething();"><img src="/myProject/images/keypad/Message.png"

As you can see here I'm calling this doSomething() method when I click on
the image button, but nothing happens, now after much head scratching, the
only possible explanation I can come up with is that it can't find the
javascript file Message.js, which by the way IS located in
"/myProject/WEB-INF/jwc/Message.js" .

Alternatives, well Message.script allows me to put javascript onto the page
itself, in the case of DatePicker, this was used to initialise the Calender
class. I can use this to put my doSomething() method directly onto the page,
where it will work as expected, press button, receive alert text.

The problem is that this message component isn't actually what I want, I've
actually written a very large and complex javascript component, I only
created Message.js when I found that I couldn't get the other one to work
and wanted something simple to re-assure me that what I was doing was right!

Now that I can't get something as simple as this to work, I'm seriously
considering giving up on tapestry components and just using an applet to
achieve the desired result.

Yours in despair, Brian.
<Prev in Thread] Current Thread [Next in Thread>