473,386 Members | 1,745 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

CallBack problem

JimWu
14
Hi,
I would like to do callback approach.
But I face some problem while calling different Javascript function.

I have no idea to make two different Javascript function to work.

For example, a function as follow
Expand|Select|Wrap|Line Numbers
  1. string strScript = "function ReceiveServerData(arg, context){ document.getElementById('" + result.ClientID + "').value = arg + ' ' + context + document.getElementById('"+ num1.ClientID +"').value; }";
  2.  
  3. Page.ClientScript.RegisterClientScriptBlock(this.GetType), "myscript", strScript, true);
  4.  
  5. string cbReference = Page.ClientScript.GetCallbackEventReference(this, "''", "ReceiveServerData", "'222'");
  6.  
  7. Button2.Attributes.Add("onclick", cbReference);
  8.  
  9.  
anothor as follows

Expand|Select|Wrap|Line Numbers
  1. string addItem = "function receiveData(arg, context){}";
  2.  
  3.  Page.ClientScript.RegisterClientScriptBlock(this.GetType), "addScript", addItem, true);
  4.  
  5.  string test = Page.ClientScript.GetCallbackEventReference(this, "''", "receiveData", "'555'");
  6.  
  7. Button3.Attributes.Add("onclick", test);
  8.  
  9.  
  10.  
Now, I want two different buttons(Button2 and Button3) onclick event to do somthing, but i do not know how to implement my RaiseCallbackEvent method and GetCallbackResult method.

Using one Javascript function is Ok that only write code on RaiseCallbackEvent method and GetCallbackResult method.

Is this callback bottleneck for only one Javascript function?

Could anyone answer my problem.

Thanks for any kindly assistance.

Jim.
Sep 4 '07 #1
2 1007
jhardman
3,406 Expert 2GB
moved to javascript forum. if this isn't a javascript issue it might be a .NET issue, I'm not really sure.

Jared, moderator
ASP forum
Sep 4 '07 #2
acoder
16,027 Expert Mod 8TB
moved to javascript forum. if this isn't a javascript issue it might be a .NET issue, I'm not really sure.
More likely to get help in .NET. Moved to .NET forum.
Sep 5 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: Marian Aldenhövel | last post by:
Hi, I am using the FMOD audio-library with the pyFMOD python bindings. pyFMOD uses ctypes. It is possible to register callback functions with FMOD that are called at certain points in the...
1
by: pvdm | last post by:
Hi, I am writing an app which encapsulates a multimedia timer. I implemented a TimerProc as static member function and a static member variable pThis as pseudo this variable to access in the...
3
by: Tomaz Rotovnik | last post by:
Hi I created very simple dll (vc++) which has three functions (start, stop and initialization). it starts capturing sound from soundblaster and when the buffer is filled with the data, dll calls...
1
by: Mohamed Fysal | last post by:
I have written a Regular DLL with many Export Functions and one CALLBACK fun ction . The callback function declared in the .cpp file of the Regular DLL is as fol lows: typedef BOOL...
15
by: Felix Kater | last post by:
Hi, in a given library I register callback functions with this function: bool set_callback(int index, int (*callback_function)(long)); I need the callback function to also pass the index...
1
by: Timbo | last post by:
Hi all, This is my first message here so i'll try and include all the information that will help you help me out, if possible. Basically I am using C# in ASP.NET 2.0 and have a Repeater...
3
by: ryan.mitchley | last post by:
Hi all I have a class (cPort) that is designed to receive objects and, depending on the type, call a handler (callback) in any descendant of a cProcessBlock class. Callback functions take a...
10
by: SQACPP | last post by:
Hi, I try to figure out how to use Callback procedure in a C++ form project The following code *work* perfectly on a console project #include "Windows.h" BOOL CALLBACK...
0
by: Tim Spens | last post by:
--- On Fri, 6/27/08, Tim Spens <t_spens@yahoo.comwrote: I think I know where the problem is but I'm unsure how to fix it. When I call Register_Handler(...) from python via...
5
by: Jef Driesen | last post by:
I have a C DLL that I want to use from a C# project. The C header file contains these declarations: typedef void (*callback_t) (const unsigned char *data, unsigned int size, void *userdata);...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...

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.