cancel
Showing results for 
Search instead for 
Did you mean: 

How do you use two scripts for a button?

Former Member
0 Kudos

Hi all!

I'm referring to my earlier question posted in this topic:

In short: when I had the attribute 'jsObjectNeeded="true"' on a button and that was for a script that would start a function validating a field, and then at the same time had a script in the button that would activate the "pressing" of it through the hit of the "return" button, I got javascript error saying "Error: Objekt doesn't support this property or method"

Do you know a way to have both functionalitys connected to the button?

Best regards

Benny

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Benny,

Normally, buttons are triggered by pressing the "Enter" or "Return" key if they are Submit buttons inside a form. The browser knows that if the user's cursor is inside the browser and they press enter, to trigger the submit button.

Is this what you are trying to do?

Cheers,

Gareth.

Former Member
0 Kudos

Hi Gareth.

Yes, it's what I'm trying to do <u>but in combination</u> with a javascript that start validation of input fields.

Can you then add attribute "jsObjectNeeded" to the tag <input>? And can you have <td> and <hr> tags inside a submit form so that you can design it according to the rest of your systems look and feel?

Regards

Benny

Answers (2)

Answers (2)

Former Member
0 Kudos

HI Benny Lange,

<hbj: button

id="Button1"

text="Logon"

width="125px"

onClientClick="javascript func for validation"

//first onClientClick will be executed

onClick="call the method in JSPDYNPAGE"

//second onclick will be executed

disabled="false"

design="STANDARD" />

jsobjectneeded has nothing to do with onclick.this should work.post your code if you need help.

Message was edited by: Kirupanand venkatapathi

Former Member
0 Kudos

Hi Benny,

Check on to this link.this might help u in solving ur problem.

http://help.sap.com/saphelp_erp2005/helpdata/en/47/113ee4c77911d4ad320000e83539c3/frameset.htm

Hope this helps u,

Regards,

Nagarajan.