why would all the ids be the same?

and why would you use the id. i would add a special class to the textfields,
and then using something like prototype do

onchange=hideothers(this);

function hideothers (t) {
 var textfields=$$(class:myclass); // or whatever prototype syntax is
 textfields.foreach(function(tf,i) { if (tf!=t) { tf.setstyle
("display:none;");}}
}

-igor


On 4/17/07, Robbert Vergeten <[EMAIL PROTECTED]> wrote:

Because id's will be all the same for a listview's generated textfields
and you want to read out the value I suppose try using "this" in the event.
<script type="text/javascript">
function test(x){
 alert(x.value);
}
</script>
<input type="text" onchange="test(this)">

On 4/17/07, Igor Vaynberg <[EMAIL PROTECTED]> wrote:

> you should do this through javascript, it would be kinda insane to do a
> roundtrip in textfield.onchange to do something like this.
>
> -igor
>
>
> On 4/16/07, wicketmarsh <[EMAIL PROTECTED] > wrote:
> >
> >
> > Hi
> >
> > I am using Listview  to render a list of TextField.  I would like to
> > add
> > onchnage event on textfield so that any change in textfield value
> > would make
> > other components invisible which are  part the form.
> >
> > Inside the form I tried to access the children of listview component
> > but it
> > return null.
> >
> >
> > thanks in advance.
> > pradip
> >
> >
> > --
> > View this message in context: 
http://www.nabble.com/Listview-listitem-onchange-tf3588422.html#a10028153
> >
> > Sent from the Wicket - User mailing list archive at 
Nabble.com<http://nabble.com/>
> > .
> >
> >
> > -------------------------------------------------------------------------
> >
> > This SF.net email is sponsored by DB2 Express
> > Download DB2 Express C - the FREE version of DB2 express and take
> > control of your XML. No limits. Just data. Click to get it now.
> > http://sourceforge.net/powerbar/db2/
> > _______________________________________________
> > Wicket-user mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/wicket-user
> >
>
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> Wicket-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>
>

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to