[SOLVED]SC_BLOCK_DISPLAY() is not working under ONLOAD form event

I’m trying to make work this piece of code on a FORM (single record form)
under ONLOAD event:

//// facturacion libre?

if ({facturacion_libre} == 1) {

sc_block_display (facturacion_libre,'on');
//sc_error_message("facturacion libre on");
//sc_error_exit();

} else {

sc_block_display (facturacion_libre,'off');
//sc_error_message("facturacion libre off");
//sc_error_exit();
}

If I enable sc_error_messages, I get “facturacion libre off”, how ever
script case server not hide the block.

I use a similar code under onClick ajax event, and sc_block_display
work perfect.

I think this is a Bug.
I’m using last SC version 6.00.0033

thank you
andres.

Hello,

I have reported this issue to our bugs team for further testing.

regards,
Bernhard Bernsmann

See the scope of the macro in our documentation, the onload event is not available for this macro.

http://downloads.scriptcase.com.br/downloads/v7/manual/en_us/webhelp/manual_mp/28-Macros/00-macros_sc.htm#sc_block_display

It doesn’t make sense that the sc_block_display macro is not available for ajax events as the sc_field_display macro is ? I am forced to manipulate the fields in a block individually using the sc_field_display macro…not fun when you have a number of fields…