Welcome Guest Search | Active Topics | Sign In | Register

Fire JS function after Grid Bind without PostBack (Inside callbackpanel) Options
Christiano
Posted: Tuesday, May 25, 2010 11:54:38 AM
Rank: Advanced Member
Groups: Member

Joined: 11/12/2008
Posts: 42
Hey there...

I have a CallbackPanel that holds a Refresh linkbutton, EO.GridView and a GoogleMaps DIV.

There is also an JS timer. When the timer reaches 0:00, an __doPostBack('lnkRefresh','') is called, and the Grid is refreshed from a Web Service.

But when it's refreshed, a "PopulateMap()" JS function must be fired to update the Map. Tried a lot of things and none of them worked, so far...

Is there any hint to make or the grid or the callbackpanel to fire this JS???

ClientScript.RegisterStartupScript is not working the Server side, because there is no postback to fire it.


tks in advance,
Christiano.
eo_support
Posted: Tuesday, May 25, 2010 12:51:52 PM
Rank: Administration
Groups: Administration

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

You can just put a Label in your page and then set the Label's Text to something like this:

Code: HTML/ASPX
<script type="text/javascript">whatever();</script>


Thanks!
Christiano
Posted: Thursday, May 27, 2010 9:15:50 AM
Rank: Advanced Member
Groups: Member

Joined: 11/12/2008
Posts: 42
Tks... Although I hadn't use it, and, as a matter of fact hadn't figured out how it was gonna work, I had a light that worked out...

I've used the ClientSideAfterUpdate='fn' on the callback panel to fire the function...
It took me a while to find out that this function doesn't accept parameters, like fn('gvMain')... Or it does and I'm doing wrong?


tks,
Christiano.
eo_support
Posted: Thursday, May 27, 2010 9:18:46 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
No. ClientSideAfterUpdate does not accept parameters. Please follow our original suggestions and it will work for you. Make sure you have the Label inside the CallbackPanel.

Thanks!


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.