(Continuation of fileupload/Ajax question...)

Reading the jQuery docs it seems that the starting point is to embed
something like this into the header of your page:

function ajaxFileUpload() {
.. 
..
}

If you remember one of my previous questions (copied below) - based on
what you were saying it seems that doing it in a render head should
work. Before I waste a lot of time I wanted to make sure that's the way
to go.

Cheers,

Michael

-----Original Message-----
From: Igor Vaynberg [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 20, 2008 5:51 PM
To: users@wicket.apache.org
Subject: Re: How to set focus to a textfield inside AJAX

if you are doing it in renderhead you have to use
response.renderonloadjavascript(), if you spit out straight javascript
then when it runs the textfield is not in the dom yet so
document.getelementbyid wont be able to look it up...

-igor


On Thu, Mar 20, 2008 at 4:04 PM, Michael Mehrle <[EMAIL PROTECTED]>
wrote:
> I was actually trying something close with overriding
>  renderHead(IHeaderResponse iHeaderResponse). Didn't seem to stick
>  though...
>
>  Just for the record - would the above method be an alternative to
making
>  this work?
>
>  Thanks a bunch - saved my day.
>
>  Cheers,
>
>
>  Michael
>
>  -----Original Message-----
>  From: Igor Vaynberg [mailto:[EMAIL PROTECTED]
>
>
> Sent: Thursday, March 20, 2008 3:56 PM
>  To: users@wicket.apache.org
>  Subject: Re: How to set focus to a textfield inside AJAX
>
>  textfield.setoutputmarkupid(true);
>  radio.add(new behavior() { oncomponenttag(tag) { tag.put("onclick",
>  "getelementbyid('"+textfield.getmarkupid()+"').focus()";}));
>
>  -igor
>
>
>  On Thu, Mar 20, 2008 at 3:51 PM, Michael Mehrle
<[EMAIL PROTECTED]>
>  wrote:
>  > Well, it doesn't necessarily have to happen in there. What I need
to
>  do
>  >  is to bind a Radio component to a TextField component. When the
Radio
>  >  gets clicked I want the focus in it's TextField to be set.
>  >
>  >  Any ideas?
>  >
>  >  Michael
>  >
>  >
>  >
>  >  -----Original Message-----
>  >  From: Igor Vaynberg [mailto:[EMAIL PROTECTED]
>  >  Sent: Thursday, March 20, 2008 3:28 PM
>  >  To: users@wicket.apache.org
>  >  Subject: Re: How to set focus to a textfield inside AJAX
>  >
>  >  why cant you do this with javascript without ajax?? seems like a
huge
>  >  waste to have a server callback just to set focus
>  >
>  >  -igor
>  >
>  >  On Thu, Mar 20, 2008 at 3:14 PM, Michael Mehrle
>  <[EMAIL PROTECTED]>
>  >  wrote:
>  >  > I have a WMC that I added an AjaxEventBehavior(onclick) to.
Inside
>  I
>  >  >  want to set the focus to a particular textfield - how would I
do
>  >  that?
>  >  >
>  >  >  I have seen some techniques on how to do this on page load, but
>  this
>  >  is
>  >  >  AJAX so I need something dynamic.
>  >  >
>  >  >  Anyone solved this problem before?
>  >  >
>  >  >  Michael
>  >  >
>  >  >
>  ---------------------------------------------------------------------
>  >  >  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]
>  >
>  >
>
>  ---------------------------------------------------------------------
>  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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to