2.0. I'm wondering if that even matters since what I want to do is on the client side. So how do I get .NET to generate the correct html/scripting code to do this.
Main Topics
Browse All TopicsWhen a user clicks a button on a webpage I need to create an object on the client and invoke a method in that object. How do I do this from a asp.net page?
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Below code works for all Verions
Add a Button Control in web page.
In Page Load event... write below statemnt
page_load()
{
Button1.Add( "onclick", "fun1()" );
}
In HTML web page write below statement
<script language='javascript'>
function fun1()
{
//Create client side object here
var x = new ActiveXObject( "Microsoft.XMLHTTP" );
...........
}
</script>
itsvtk
Can you help me with this too. This is the code that I have in the click event of the button. I'm getting errors because it doesn't know what obj3270 is. In the createtool call I pass in obj3270 and it is supposed to return the object in the variable I pass. My thoughts are that I have to do something special to pass a variable by reference instead of by value in java. Is this true. If so how do I do it? Do you think this is what is causing my problem?
function Button1_onclick() {
var objDirector = new ActiveXObject("atlDirector
var obj3270;
var errmsg;
var strLoanNumber;
if (objDirector.CreateTool("3
{
strLoanNumber = obj3270.LoanNo;
obj3270.ClearScreen(true, errmsg);
obj3270.sendkeystrokes("zt
}
}
In this case Javascript doesn't work... But VBScript works....
Here is the VBScript version of the above Javascript functon
function Button1_onclick()
dim objDirector : set objDirector = new ActiveXObject("atlDirector
dim obj3270
dim errmsg
dim strLoanNumber
if (objDirector.CreateTool("3
strLoanNumber = obj3270.LoanNo
call obj3270.ClearScreen(true, errmsg)
call obj3270.sendkeystrokes("zt
end if
End Function
===============
itsvtk
Ooooops....!
Try this on
=======
function Button1_onclick()
dim objDirector : set objDirector = CreateObject("atlDirectorO
dim obj3270
dim errmsg
dim strLoanNumber
if (objDirector.CreateTool("3
strLoanNumber = obj3270.LoanNo
call obj3270.ClearScreen(true, errmsg)
call obj3270.sendkeystrokes("zt
end if
End Function
itsvtk
Business Accounts
Answer for Membership
by: itsvtkPosted on 2006-12-12 at 12:30:34ID: 18125645
What is the Version .NET Framework?