You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by am...@yahoo.com on 2005/11/09 21:09:55 UTC
More problem using 'Script' component
Hi,
I am including a 'Script' component in my page which renders fine (my function gets created
as planned). However, at the bottom of the HTML, the following gets generated:
<script language="JavaScript" type="text/javascript"><!--
setFocus(); // this is fine, the function I defined in my script file
Tapestry.register_form('loginForm');
Tapestry.set_focus('username');
// --></script>
The generated page knows nothing about a 'Tapestry' object so this creates a javascript
error. I am not sure what or why this occurs.
Thanks,
Amir
Re: More problem using 'Script' component
Posted by am...@yahoo.com.
Ron,
I had the script element, the problem was that I had a servlet filter that had prevented its
download, so it's all working now. Thanks!
-Amir
Ron Piterman <rp...@gmx.net> wrote:
look if there is a script element just after the
something like
src="/port/app?digest=b4909c59529064c46eb8843b65911500&path=%2Forg%2Fapache%2Ftapestry%2Fform%2FForm.js&service=asset">
if there is not, then something is very wrong.
next try to remove your script and see if the problem is still there...
next post a reply... ;-)
Cheers,
Ron
צ×××× amirsguard-tapestry@yahoo.com:
> Hi Ron,
>
> Yes I do have a 'loginForm', and a 'username' form element. The javascript error I get is "'Tapestry' is undefined" and when I look at the generated HTML I confirmed that it was not defined anywhere (the only references to 'Tapestry' object was in the generated function I had pasted earlier).
>
> Thanks,
> Amir
>
> Ron Piterman wrote:
> This is the standard tapestry form javascript contribution. You surely
> have a form on your page (called "loginForm" :) )
> Its strange that it generates a JS error - are you sure it this code? do
> you overwrite the Tapestry object in your generated JS?
> Cheers,
> ROn
>
> æÃâ¢ÃËÃâ¢ÃË amirsguard-tapestry@yahoo.com:
>
>>Hi,
>>
>>
>>
>>I am including a 'Script' component in my page which renders fine (my function gets created
>>
>>as planned). However, at the bottom of the HTML, the following gets generated:
>>
>>
>>
>>
>> setFocus(); // this is fine, the function I defined in my script file
>>
>>
>>
>> Tapestry.register_form('loginForm');
>>
>> Tapestry.set_focus('username');
>>
>>// -->
>>
>>
>>
>>The generated page knows nothing about a 'Tapestry' object so this creates a javascript
>>
>>error. I am not sure what or why this occurs.
>>
>>
>>
>>Thanks,
>>
>>Amir
>>
>>
>>
>>
>>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: More problem using 'Script' component
Posted by Ron Piterman <rp...@gmx.net>.
look if there is a script element just after the <body>
something like
<script type="text/javascript"
src="/port/app?digest=b4909c59529064c46eb8843b65911500&path=%2Forg%2Fapache%2Ftapestry%2Fform%2FForm.js&service=asset"></script>
if there is not, then something is very wrong.
next try to remove your script and see if the problem is still there...
next post a reply... ;-)
Cheers,
Ron
ציטוט amirsguard-tapestry@yahoo.com:
> Hi Ron,
>
> Yes I do have a 'loginForm', and a 'username' form element. The javascript error I get is "'Tapestry' is undefined" and when I look at the generated HTML I confirmed that it was not defined anywhere (the only references to 'Tapestry' object was in the generated function I had pasted earlier).
>
> Thanks,
> Amir
>
> Ron Piterman <rp...@gmx.net> wrote:
> This is the standard tapestry form javascript contribution. You surely
> have a form on your page (called "loginForm" :) )
> Its strange that it generates a JS error - are you sure it this code? do
> you overwrite the Tapestry object in your generated JS?
> Cheers,
> ROn
>
> ציטוט amirsguard-tapestry@yahoo.com:
>
>>Hi,
>>
>>
>>
>>I am including a 'Script' component in my page which renders fine (my function gets created
>>
>>as planned). However, at the bottom of the HTML, the following gets generated:
>>
>>
>>
>>
>> setFocus(); // this is fine, the function I defined in my script file
>>
>>
>>
>> Tapestry.register_form('loginForm');
>>
>> Tapestry.set_focus('username');
>>
>>// -->
>>
>>
>>
>>The generated page knows nothing about a 'Tapestry' object so this creates a javascript
>>
>>error. I am not sure what or why this occurs.
>>
>>
>>
>>Thanks,
>>
>>Amir
>>
>>
>>
>>
>>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: More problem using 'Script' component
Posted by am...@yahoo.com.
Hi Ron,
Yes I do have a 'loginForm', and a 'username' form element. The javascript error I get is "'Tapestry' is undefined" and when I look at the generated HTML I confirmed that it was not defined anywhere (the only references to 'Tapestry' object was in the generated function I had pasted earlier).
Thanks,
Amir
Ron Piterman <rp...@gmx.net> wrote:
This is the standard tapestry form javascript contribution. You surely
have a form on your page (called "loginForm" :) )
Its strange that it generates a JS error - are you sure it this code? do
you overwrite the Tapestry object in your generated JS?
Cheers,
ROn
צ×××× amirsguard-tapestry@yahoo.com:
> Hi,
>
>
>
> I am including a 'Script' component in my page which renders fine (my function gets created
>
> as planned). However, at the bottom of the HTML, the following gets generated:
>
>
>
>>
> setFocus(); // this is fine, the function I defined in my script file
>
>
>
> Tapestry.register_form('loginForm');
>
> Tapestry.set_focus('username');
>
> // -->
>
>
>
> The generated page knows nothing about a 'Tapestry' object so this creates a javascript
>
> error. I am not sure what or why this occurs.
>
>
>
> Thanks,
>
> Amir
>
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: More problem using 'Script' component
Posted by Ron Piterman <rp...@gmx.net>.
This is the standard tapestry form javascript contribution. You surely
have a form on your page (called "loginForm" :) )
Its strange that it generates a JS error - are you sure it this code? do
you overwrite the Tapestry object in your generated JS?
Cheers,
ROn
ציטוט amirsguard-tapestry@yahoo.com:
> Hi,
>
>
>
> I am including a 'Script' component in my page which renders fine (my function gets created
>
> as planned). However, at the bottom of the HTML, the following gets generated:
>
>
>
> <script language="JavaScript" type="text/javascript"><!--
>
> setFocus(); // this is fine, the function I defined in my script file
>
>
>
> Tapestry.register_form('loginForm');
>
> Tapestry.set_focus('username');
>
> // --></script>
>
>
>
> The generated page knows nothing about a 'Tapestry' object so this creates a javascript
>
> error. I am not sure what or why this occurs.
>
>
>
> Thanks,
>
> Amir
>
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org