you could try to invoke the click eventhandler, that is onclick(). i tried
it on a simple example and got the same error with click() in firefox.
onclick() worked like a charm.

hth,
 gerolf

On 5/22/07, Lec <[EMAIL PROTECTED]> wrote:


This portion of code works in IE

public void onClick( AjaxRequestTarget target )
{
    target.appendJavascript("document.getElementById
('paragraph').click();")
}

but it DOESN't WORK in FireFox.  Using the Wicket Debug console, it said
ERROR: Exception evaluating javascript: TypeError:
document.getElementById("paragraph").click is not a function

Is this a bug?


igor.vaynberg wrote:
>
> you do this using javascript, no roundtrip to the server is required.
see
> some "smooth scroll" javascripts on the net.
>
> -igor
>
>
> On 5/21/07, Lec <[EMAIL PROTECTED]> wrote:
>>
>>
>> Im trying to figure out a way to make button behave as if it's like a
>> link
>> component upon clicked. I want a button to archieve the same behaviour
as
>> link, and upon clicked, a particular html region will be focused or
>> displayed, just like the same behaviour when you setAnchor in link
>> component. But the thing now is that, button doesn't provide any method
>> to
>> set an anchor. How do we do that?
>>
>> --
>> View this message in context:
>>
http://www.nabble.com/how-to-use-a-button-to-display-to-another-region-of-a-html-page-upon-clicked--tf3788901.html#a10714844
>> Sent from the Wicket - User mailing list archive at 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
>
>

--
View this message in context:
http://www.nabble.com/how-to-use-a-button-to-display-to-another-region-of-a-html-page-upon-clicked--tf3788901.html#a10733403
Sent from the Wicket - User mailing list archive at 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

Reply via email to