Hi,

Well Pat I will give u the code also....
I have included the following code in .html

<script jwcid="signupScript" language="JavaScript" type="text/javascript"/>

and I call the javascript method using the following line of code:-

<body jwcid="@Body" onload="Javascript:onload()" topmargin="0"
leftmargin="0" >

the code in .page is

<context-asset name="signup_js" path="/signup.js"/>  
      <component id="signupScript" type="Any">
            <static-binding name="element" value="script"/>
        <binding name="src" expression="assets.signup_js"/>
</component>      

and I run my code I get an error saying

"Element type "context-asset" must be declared."

Do I need to declare context-asset externally and call it in my .page

Thanks
Manjith Kumar

-----Original Message-----
From: Manjith Kumar Adapa 
Sent: Tuesday, September 27, 2005 12:27 PM
To: Tapestry users
Subject: RE: Help in Javascript

Hi,

Thanks Pat for the solution but I get an error saying: -

"Element type "context-asset" must be declared."

Moreover I am using Tapestry 4...
Is there anything do I need to configure apart from the .page and .html

Thanks & Regards,
Manjith Kumar




-----Original Message-----
From: Patrick Casey [mailto:[EMAIL PROTECTED] 
Sent: Monday, September 26, 2005 9:16 PM
To: 'Tapestry users'
Subject: RE: Help in Javascript


        Alternately if you're looking to just link in some static
javascript:

        This on the page file:

        <context-asset name="search_js" path="/script/SearchForm.js"/>  
      <component id="searchScript" type="Any">
            <static-binding name="element" value="script"/>
        <binding name="src" expression="assets.search_js"/>
        </component>      

        This in the html;

        <script jwcid="searchScript" language="JavaScript"
type="text/javascript"/>


        I must confess that's how I do all of my javascript, largely because
I could never figure out Howard's rewrite model. 

        --- Pat

> -----Original Message-----
> From: Manjith Kumar Adapa [mailto:[EMAIL PROTECTED]
> Sent: Monday, September 26, 2005 8:09 AM
> To: Tapestry users
> Subject: Help in Javascript
> 
> Hi,
> 
> I need a sample piece of code.
> In the html where I can put all the javascript methods in .js file and
> refer
> them in html through Tapestry 4
> 
> Thanks
> Manjith
> 
> ---------------------------------------------------------------------
> 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