That what I need is a javascript function which contains
the correct call of my window 
(similar to the "onlick"-content of the wicket generated link).

Thanks,
Heiko


Alex Objelean wrote:
> 
> Correct me if I understand you correct:
> 
> you want beside wicket call, to execute also your script?
> 
> 
> 
> 
> lodhur wrote:
>> 
>> Wicket generates the link as follows:
>> 
>> ... id="showAboutWindow26" onclick="var
>> wcall=wicketAjaxGet('?wicket:interface=:2:showAboutWindow::IBehaviorListener:0:',null,null,
>> function() {return Wicket.$$(this)}.bind(this));return !wcall;"
>> href="#">info page...
>> 
>> And if I put the "onclick"-content to my javascript function sometime it
>> works
>> and sometime I get an error.
>> The reason for this is probably that Wicket increases the value of the
>> wicket:interface
>> It starts at 0 (...('?wicket:interface=:0:...) and is increased.
>> 
>> Therefore, I thought of the dynamic creation of the function.
>> 
>> Or is there another solution?
>> 
>> Thanks,
>> Heiko
>> 
>> 
>> 
>> 
>> Alex Objelean wrote:
>>> 
>>> Why would you need to use AjaxLink component?
>>> Just put your script in the markup and it will do exactly what you
>>> expect it to do.
>>> 
>>> Alex.
>>> 
>>> 
>>> lodhur wrote:
>>>> 
>>>> Hi Wicket-Users,
>>>> 
>>>> I'm a new in wicket and I am stuck.
>>>> Currently I create an AjaxLink in my Page as follows:
>>>> 
>>>> Index.java:
>>>> -----------
>>>> ...
>>>> add(new AjaxLink("showInfoWindow") {
>>>>     public void onClick(AjaxRequestTarget target) {
>>>>         aboutWindow.show(target);
>>>>     }
>>>> });
>>>> ...
>>>> 
>>>> Index.html:
>>>> -----------
>>>> ...
>>>> <div wicket:id="infoWindow"></div>
>>>>  about page 
>>>> ...
>>>> 
>>>> As result Wicket rendered following:
>>>> ------------------------------------
>>>> ...
>>>> <div id="infoWindow25" style="display:none"></div>
>>>>  ?
>>>> Background: I want to use the function from my javascript menu.
>>>> 
>>>> Maybe someone has an example?
>>>> 
>>>> Thanks,
>>>> Heiko
>>>> 
>>>> 
>>> 
>>> 
>> 
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/how-to-generate-a-javascript-function-tf4856086.html#a13896878
Sent from the Wicket - User mailing list archive at Nabble.com.


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

Reply via email to