Wicket set a header value in the request set to wicket-ajax i believe that
way, wicket is able to detect ajax request from regular request.

On Tue, Nov 23, 2010 at 6:31 AM, Poko Booth [via Apache Wicket] <
ml-node+3055066-291766867-65...@n4.nabble.com<ml-node%2b3055066-291766867-65...@n4.nabble.com>
> wrote:

> Not sure about this but if you use jQuery, you could try adding a js in the
> head of the page which will have something like $(document).ready(
>      function(){
>          //your javascript here
>      }
> );
>
> Regards,
> Poko
>
>
> On Nov 23, 2010, at 11:12, sonxurxo <[hidden 
> email]<http://user/SendEmail.jtp?type=node&node=3055066&i=0>>
> wrote:
>
> >
> > Hi all,
> >
> > Is it possible to tell, from a Wicket Page, to execute some JavaScript
> > automatically when a page loads through a JavaScript XHTTPRequest? I'm
> using
> > AbstractBehavior with renderHead(), and it works when the Page is invoked
>
> > from another Wicket component (through Link, etc), but not when I invoke
> the
> > Page URL through Javascript, even when the HTML returned contains the
> > <script> tags in the header, it does not execute it.
> >
> > Any ideas? TIA
> > --
> > View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Execute-JavaScript-automatically-when-loading-a-Page-through-XHTTPRequest-tp3055042p3055042.html<http://apache-wicket.1842946.n4.nabble.com/Execute-JavaScript-automatically-when-loading-a-Page-through-XHTTPRequest-tp3055042p3055042.html?by-user=t>
> > Sent from the Users forum mailing list archive at Nabble.com.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [hidden 
> > email]<http://user/SendEmail.jtp?type=node&node=3055066&i=1>
> > For additional commands, e-mail: [hidden 
> > email]<http://user/SendEmail.jtp?type=node&node=3055066&i=2>
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden 
> email]<http://user/SendEmail.jtp?type=node&node=3055066&i=3>
> For additional commands, e-mail: [hidden 
> email]<http://user/SendEmail.jtp?type=node&node=3055066&i=4>
>
>
>
> ------------------------------
>  View message @
> http://apache-wicket.1842946.n4.nabble.com/Execute-JavaScript-automatically-when-loading-a-Page-through-XHTTPRequest-tp3055042p3055066.html
>
> To start a new topic under Apache Wicket, email
> ml-node+1842946-398011874-65...@n4.nabble.com<ml-node%2b1842946-398011874-65...@n4.nabble.com>
> To unsubscribe from Apache Wicket, click 
> here<http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=1842946&code=amNnYXJjaWFtQGdtYWlsLmNvbXwxODQyOTQ2fDEyNTYxMzc3ODY=>.
>
>



-- 
Sincerely,
JC (http://www.linkedin.com/in/jcgarciam)
Work smarter, not harder!.

-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Execute-JavaScript-automatically-when-loading-a-Page-through-XHTTPRequest-tp3055042p3055072.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to