Web Connection 5.0
Testing WC540 beta
10/06/2008
11:23:09 AM
2HC0OEKZN Show this entire thread in new window
From:
Sean Moynihan
To:
Rick Strahl
Attachments:
None
Rick , testing WC540 and strangely enough this piece of code ( in the previous post ) fails , I have added
SET PROCEDURE TO WebControlsAjax.prg additive
in the Main.prg onload().

Get the following message in Firebug
__doPostBack is not defined

The code that fails is

FUNCTION editDetails()
lcRet=[<a href="javascript:__doPostBack('Page','cmdShowDevUpdate_click',']+TRANSFORM(PK)+[')">]+[<img title="Edit Record Details" src='images/act1.gif'/></a>]
RETURN lcRet
ENDFUNC

Maybe it is related to your previous comment , was not sure exactly what you meant by 'use Page.GetPostbackEventReference' to change the syntax.

Other than that , all apps are working fine in 540 , plus all the WC537 apps work fine with the WC540 script folder , so nothing is broken if I need to go back to 537



One little nit: You should use Page.GetPostbackEventReference to creating the post back links. While not really any less verbose it's safer to use this in case the implementation is changed in the future...

+++ Rick ---

yep , using the Expression method is very handy , I've also used it to include the kind of small images you see on web grids ( e.g. little pics of Waste Baskets , Magnify Glass etc ) by wrapping href tags around the image

Expression="this.page.editDetails()

FUNCTION editDetails()
lcRet=[<a href="javascript:__doPostBack('Page','cmdShowDevUpdate_click',']+TRANSFORM(PK)+[')">]+;
[<img title="Edit Record Details" src='images/act1.gif'/></a>]
RETURN lcRet
ENDFUNC

Is there a way to add wwWebButton control (or any wc web controls) to a wwWebDataGridColumn?