myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Volker Weber" <v.we...@inexso.de>
Subject Re: [Tobago] Javascript reload after Ajax Request.
Date Mon, 09 Apr 2007 19:27:51 GMT
Hi,

Tobago.element('page:XXX:YYY');

 /**
    * Returns a html element.
    * valid input types are:
    * 'string'      : returns the result of document.getElementById()
    * 'Event'       : returns the currentTarget/srcElement property
    * 'HtmlElement' : returns the element itself
    * For all other types return 'undefined'
    */

Regards,
  Volker

2007/4/9, madan chowdary <madan_narra@yahoo.com>:
>
> Hi Volker,
>
> Thnx for the caution message, will do that right now..
>
> And i have one more doubt, if at all i need the element in javascript ,
>
> using Protype.js , its pretty simple $('page:XXX:YYY');
>
> Do we have a similar thing when we use Tobago functions ?
>
> Regards,
> Madan
>
> ----- Original Message ----
> From: Volker Weber <v.weber@inexso.de>
> To: MyFaces Discussion <users@myfaces.apache.org>
> Sent: Tuesday, 10 April, 2007 12:41:48 AM
> Subject: Re: [Tobago] Javascript reload after Ajax Request.
>
> Hi,
>
> can't you put the function in a script file which is loaded on initial
> page load, and just coll it in the tc:out like my alert() example?
>
> BTW: if you use prototype in your script functions you should prepared
> to ship this with your app, because we will remove prototype from
> tobago in the future.
>
> You can replace Event.observe() by Tobago.addEventListener() to be future
> proof.
>
> Regards,
>   Volker
>
> 2007/4/9, madan chowdary <madan_narra@yahoo.com>:
> >
> > Hi Volker,
> >
> > I was just using prototype.js functions in the jsp page to observe the
> > elements in a sheet.
> >
> > Like , in <tc:in> under a column in sheet, there is an onchange event for
> > <tc:in/>, but this is called only when its focus is lost.
> >
> > If at all i modify it and clcik on any button, the onchange event is not
> > called.
> >
> > so i kept and Event.observe() on that for keyPress..now its working fine.
> >
> > But when the sheet is loaded , i need to observe the sheet elements again,
> > for that i need to call a function .
> >
> > But how Can i call a JavaScript function() , which will be rendered with
> > <tc:out/>
> >
> > This was my problem..
> >
> > Regards,
> > Madan
> >
> >
> > ----- Original Message ----
> > From: Volker Weber <v.weber@inexso.de>
> > To: MyFaces Discussion <users@myfaces.apache.org>
> > Sent: Tuesday, 10 April, 2007 12:26:33 AM
> > Subject: Re: [Tobago] Javascript reload after Ajax Request.
> >
> > Hi Madan,
> >
> > the tc:script tag is currently not supported for ajax requests, see
> > https://issues.apache.org/jira/browse/TOBAGO-332
> >
> > You can use tc:out with escape="false" e.g.
> >
> > <tc:out escape="false" value"<script type=\"text/javascript\"
> > >alert('script on ajax');</script>" />
> >
> > shuch pieces of javascript inside ajax requests are evaluated after
> > the html is replaced.
> >
> > Regards,
> >   Volker
> >
> > 2007/4/9, madan chowdary <madan_narra@yahoo.com>:
> > >
> > > Hi All,
> > >
> > > I was just working with JavaScript in Tobago pages.
> > >
> > > I used onload function to call a javascript function which is used to
> > > Event.observe() on some components.
> > >
> > > These scripts are placed in a panel which gets refreshed via Ajax.
> > >
> > > The first time the page loads, then the desired task is achieved.
> > >
> > > But if the panel is refreshed via Ajax, then the javascript is not
> > working.
> > >
> > > I need to call the function which was done onload, the same way when the
> > > panel is refreshed via Ajax.
> > >
> > > Is this possible ?
> > >
> > > Regards,
> > > Madan
> > >
> > >  ________________________________
> > >  Here's a new way to find what you're looking for - Yahoo! Answers
> >
> >
> >  ________________________________
> >  Here's a new way to find what you're looking for - Yahoo! Answers
>
>
>  ________________________________
>  Here's a new way to find what you're looking for - Yahoo! Answers

Mime
View raw message