I am simulating the click of a treview node in Javascript using
get_linkElement().click()
This works perfect in IE8, but Firefox 4.0 and Chrome cannot find the click() function and raises an error.
Any ideas on how I can work around this?
Thanks
3 Answers, 1 is accepted
0
Nikolay Tsenkov
Telerik team
answered on 06 May 2011, 04:48 PM
Hi Bryan,
Well, this simply is not supported by Firefox.
Please, explain what exactly do you try to achieve and perhaps we will be able to help you find an alternative.
When user opens the form, treeview is displayed in a frame on the left side, content is in a frame on the right side.
The behaviour I would like is to have the first unselected content be displayed. I determine the first unselected treeview node, them simulate the user clicking the node using get_linkElement().click().
I suppose I could get the link element URL, and set the content frame href?
0
Ivan Zhekov
Telerik team
answered on 12 May 2011, 08:15 AM
Hello Bryan Kowalchuk,
Is it a static link e.g. <a href="http://telerik.com">Click Here</a>, or is it a PostBack type of link e.g. <a href="javascript:SCRIPT">Click</a>?
Both require different approaches, but they can be solved using the following snippet: