Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

HTMLB Forms and Events

Former Member
0 Kudos

Hi All,

I have an HTMLB form where I have a submit button with an onClientClick javascript check function.

When I hit submit, the javascript executes, finds an error and then allows the form to go on with processing which is what I do not want to do.

I want the HTMLB form to suspend execution in case the JavaScript function returns an error.

I trigger the error by adding

return false;

to the end of js function.

Is there another way to do this?

Thanks,

Roman

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Roman,

Use the statement "htmlbevent.cancelsubmit" in the javascript check function .

Regards,

Arun.

5 REPLIES 5

Former Member
0 Kudos

Hi Roman,

Use the statement "htmlbevent.cancelsubmit" in the javascript check function .

Regards,

Arun.

0 Kudos

Thanks Arun! This solved it!!

0 Kudos

Hello When we have set the submit button as the default button and press return the htmlbevent.cancelsubmit is not executed meaning it does not prevent the submission do you have any idea why it is behaving like that

0 Kudos

Hi Rohit Pathak ,

Post this in BSP forum.

Regards

Raja

Former Member
0 Kudos

HI

GOOD

YOU CAN DO THE SAME THING USING THE IF LOOP

IF THE EVENT IS TRUE THAN YOU CAN COMEOUT FROM THE JAVA SCRIPT FORM.

THANKS

MRUTYUN