Application Development and Automation 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: 
Read only

HTMLB Forms and Events

Former Member
0 Likes
803

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
Read only

Former Member
0 Likes
755

Hi Roman,

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

Regards,

Arun.

5 REPLIES 5
Read only

Former Member
0 Likes
756

Hi Roman,

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

Regards,

Arun.

Read only

0 Likes
755

Thanks Arun! This solved it!!

Read only

0 Likes
755

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

Read only

0 Likes
755

Hi Rohit Pathak ,

Post this in BSP forum.

Regards

Raja

Read only

Former Member
0 Likes
755

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