Welcome Guest Search | Active Topics | Sign In | Register

how to invoke the startTask method of the progress bar from vb code behind?? Options
wayne
Posted: Tuesday, September 23, 2008 10:16:19 AM
Rank: Newbie
Groups: Member

Joined: 9/23/2008
Posts: 2
Sorry - I'm at an intermediate level with asp.net 2

I've looked at your demo code for 4 hours - but still cannot figure out how to get the progress bar to "start" without someone having to click on a start button...

I simply want to start the progress bar IN VB when someone clicks a button that runs a series of update queries - then stop it when these are done....

The last thing I've tried is to create a java function in the source code:


function start_progress_bar()
{
eo_GetObject("ProgressBar1").startTask();
}


BUT - I dont know how to "call" this from VB - code behind -

I LOVE WHAT I'VE SEEN IN THE DEMOS! I sure hope you can help me so I will be able to buy and use ALL your products!

Thanks!!!!!!
eo_support
Posted: Tuesday, September 23, 2008 10:24:08 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,193
Hi,

JavaScript interface and code behind interface are totally different. One run on the client side and the other runs on the server side. So you will never be able to directly call client side interface from your server side code.

A workaround for this is to use a Label control, then set the Label's Text to some JavaScript code. For example, if you do this on the server side:

Label1.Text = "<script type='text/javascript'>window.alert('hi!');</script>"

The text will be dumped as is to the client side, which in turn is intercepted by the browser as client side JavaScript and executed on the client side.

Hope this helps.

Thanks
wayne
Posted: Tuesday, September 23, 2008 10:53:40 AM
Rank: Newbie
Groups: Member

Joined: 9/23/2008
Posts: 2
It took a few minutes - but I figured it out from your example! THANKS SO MUCH!!!!!!

1 I created a label called Label6
2. I placed this code code behind a button:
Label6.Text = "<script type='text/javascript'>eo_GetObject('ProgressBar1').startTask()</script>"




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.