Welcome Guest Search | Active Topics | Sign In | Register

Grid ClientSideOnItemSelected Javascript Options
Steve Peters
Posted: Monday, April 28, 2008 12:46:21 PM
Rank: Member
Groups: Member

Joined: 3/3/2008
Posts: 17
I originally wrote routines in VB code behind for the Microsoft Grid control. Now I am trying to convert that code to Javascript using your Grid's ClientSideOnItemSelected. I don't have much experience with Java.

Is there a way to call VB code behind from Javascript?

OR

Why does the Label1.Text not get set in the following snippet?

templabeltext = "Not Selected";
myLabelElement = document.getElementById("Label1");
if (!myLabelElement)
{ alert("This Label element doesn't exist!");
}
else
{ alert("This Label element does exist! " );
}

myLabelElement.Text = templabeltext ;

I have tried this in Server, Client and Callback modes without success. Again, very new to Java.
Is there by any chance a Server Side Control that will allow running VB script when an Item is selected?

Thanks in advance.
Steve
eo_support
Posted: Monday, April 28, 2008 1:04:42 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,083
Hi Steve,

Thanks for posting in the forum. Your questions are very generic Web programming questions and well beyond the scope of our support, so we will not be able to cover in great details. A few pointers are provided below:

Java and JavaScript are totally different things. I assume you meant JavaScript. You don't need to know anything about Java to work on web pages. But JavaScript is pretty much a must. JavaScript itself is a rather big topic. This page might be a good starting point:

http://www.w3schools.com/JS/default.asp

Not only JavaScript itself is a big topic, it is also always used together with DHTML, which means you also have to know DHTML pretty well to be able to use JavaScript effectively. Your code appears to have the JavaScript part right, but had the DHTML part wrong. Specifically, by writing "myLabelElement.Text", you assumed that myLabelElement is a "Label". It is not. "Label" is a server side thing and does not exist on the client side. You will need to find out the corresponding DHTML object on the client side and then use the DHTML object's interface to work with anything on the client side.

As for calling VB code behind from JavaScript, you will be looking into AJAX. That again is another huge topic. You can start with ASP.NET AJAX or our CallbackPanel to get an idea of how it works.

If you still have questions on these issues, you may want to consult other resources. Our support only covers questions that are directly related to our product and our official support doesn’t go beyond that. You can review our support policy at here:

http://www.essentialobjects.com/Forum/Default.aspx?g=posts&t=1368

Thanks
Steve Peters
Posted: Monday, April 28, 2008 2:00:37 PM
Rank: Member
Groups: Member

Joined: 3/3/2008
Posts: 17
Thanks. Believe it or not this was all I needed. I am going to use AJAX ASP.Net. Thanks again.
Steve


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.