how to enable generated anchor links inside Html components to function as native links
Here is a simple example, in my ZUL file I have:
<html><![CDATA[
<a href="http://www.yahoo.com">yahoo</a>
]]></html>
Clicking at the link does nothing.
After I removed the method onClick() from my controller the links worked properly -- the ZK Client engine now sends
the event to the browser.
The given sample will redirect the page to yahoo.com when link is clicked.
index.zul
<html><![CDATA[
<a href="http://www.yahoo.com">yahoo</a>
]]></html>
Could you please provide a reproducible example ?
I can't image a click event in native html code will be caught by ZK , if it really did , that might be a bug.
We need a example to get what you are talking about.
As I have mentioned in my 12/30 post that the problem was gone once I removed onClick method from my Controller.
My guess is that if one declares onClick() in the controller ZK Client Engine will grab the event.
Thanks.
How do you define your onClick event?
I think hightu means he had mistakenly put an onClick event listener on the Html component in his composer and then when he removed it the anchor links were working as expected.
ZK - Open Source Ajax Java Framework
I have several ZK Html components whose contents (all native HTML stuff)
are generated dynamically and some include native <a href="http..."> links.
However when they are clicked the events are caught by the Update Engine and
probably are sent to the server.
Is there anyway to signal ZK that it should pass those events to the browser
so they will behave like regular links?
Thanks.