473,763 Members | 7,044 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Treeview control to call javascript function

Hi

Is it possible to call a javascript function from a treeview controls
OnSelectedNodeC hanged event? Something similar to a OnClientClick event
for buttons? I cant seem to find anyway to do this, any help
appreciated
Thanks

Oct 18 '06 #1
2 8888
Can you use the RegisterClientS cript function in the
OnSelectedNodeC hangedEvent. Basically you write your Javascript function to a
string variable and then use the RegisterClientS criptBlock method. Check the
following link for more details -

http://msdn.microsoft.com/library/de...BlockTopic.asp

--
Ameet Phadnis
Sr. Technical Consultant
e Tek Global Inc.
ASP Alliance Author Page: http://aspalliance.com/author.aspx?uId=44260
"hibaru" wrote:
Hi

Is it possible to call a javascript function from a treeview controls
OnSelectedNodeC hanged event? Something similar to a OnClientClick event
for buttons? I cant seem to find anyway to do this, any help
appreciated
Thanks

Oct 18 '06 #2
Thanks Ameet Phadnis

RegisterClientS criptBlock is probably the only other way to do it but I
dont want any post backs, and I think I have found what I wanted.

Since Im dynamically populating my treeview I just need to set the
NavigateUrl to the function I want to call and thats it. :) and no post
back as well.

node.NavigateUr l = "javascript:ale rt('here');";

Thanks again for the quick reply :)
Ameet Phadnis (e Tek Global Inc.) wrote:
Can you use the RegisterClientS cript function in the
OnSelectedNodeC hangedEvent. Basically you write your Javascript function to a
string variable and then use the RegisterClientS criptBlock method. Check the
following link for more details -

http://msdn.microsoft.com/library/de...BlockTopic.asp

--
Ameet Phadnis
Sr. Technical Consultant
e Tek Global Inc.
ASP Alliance Author Page: http://aspalliance.com/author.aspx?uId=44260
"hibaru" wrote:
Hi

Is it possible to call a javascript function from a treeview controls
OnSelectedNodeC hanged event? Something similar to a OnClientClick event
for buttons? I cant seem to find anyway to do this, any help
appreciated
Thanks
Oct 18 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
1336
by: hrishikesh | last post by:
hi all can you tell me how to call javascript function in .aspx page i want to call it on onclick of button this codebehind code giving me some other problem like The viewstate is invalid for this page and might be corrupted. but it goes to that page Private Sub Button1_Click(ByVal sender As System.Object,
1
2359
by: john conwell | last post by:
I'm using the Browser control to display html that my application generates. Some times i want a javascript to run when the html gets displayed in the browser control, and sometimes i dont. Is there a way to invoke a javascript function from the browser control? or maybe inject some javascript vis the control's reference to the Document object? I think i can do it with the Window object, but I have seem to figout out how to get to the...
3
13607
by: anadimpa | last post by:
Hello all I build a javascript function string in the code behind and register it in the Page_Load of my User Control. I do this because I build the javascript based on some variables that are passed to this user control. How do I (or from where do I) call this function? I tried several ways like: this.Attributes.Add("onLoad", "javascript:openDoc();"); in the page_load / page_prerender etc...
0
969
by: masood.maumoon | last post by:
Hi Is it possible to call a javascript function from a treeview controls OnSelectedNodeChanged event? Something similar to a OnClientClick event for buttons? I cant seem to find anyway to do this, any help appreciated Thanks
4
59908
by: verci | last post by:
Hi guys, I'm running asp.net 2.0. Does anyone know how to fire or call a javascript function from inside my (VB.aspx) code without assigning it to a control attribute? thank you
1
4416
by: santosh2003 | last post by:
Hi All, How would we call Javascript function on img click? can we call function which define in codebehind page (.vb page) on img click? Regards Santosh
1
3406
by: DharmendraSingh | last post by:
how i call javascript function in onBlur in datagrid of Struts Layout Please anybody know reply soon Thanks & Regards Dharmendra Singh
1
2741
KalariaNitya
by: KalariaNitya | last post by:
hello dear, i need ur help i read ur answer in http://www.dotnetspider.com/qa/Question39518.aspx regarding that i want to ask u that, if i used Text1.Attributes.Add("onblur", "return start1();") this statement so it calls start1() javascript function right?
1
1764
by: siddu | last post by:
How to call Javascript function in single statement, I have to call these two statements in a single onClick img.Attributes("onclick") = "toggleSidebar(" + IDPREFIXSIDEBARCONTENT + CStr(tab.Id) + ")" img.Attributes("onclick") = "showTab(" + IDPREFIXTAB + CStr(res.Id) + ", '" + param + "');" Please advice me how to call above two statements in single img.Attributes("onclick")? Thanks, Vidyasagar
0
9386
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10144
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8821
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7366
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6642
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5270
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3917
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3522
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2793
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.