Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Combine + functions?

Status
Not open for further replies.

Bramvg

IS-IT--Management
Jan 16, 2001
135
BE
Hi,

I'm not familiar with Javascript, but I have a question that must be easy ;-)

I searched for 2 seperated javascripts on the net, and found them. But, when I change of form field the two functions must be run.

Now, I would like to combine those two.
e.g.:
onKeyUp="return autoTab(this, 3, event);" +
onChange="setRubriek(this.form)"

Is there a whay to put them into one input type=text field?

I thought that I would need to define a new function that will contain a 'link' to these two functions, and call that function.

But how do I do that?

e.g.:

function autoTab
{
onKeyUp="return autoTab(this, 3, event);" +
onChange="setRubriek(this.form)"
}

I don't know how to format the code either ;-(

tnx
bram



 

<input type=&quot;text&quot; onchange=&quot;alert('change');&quot; onKeyUp=&quot;alert('keyup');&quot;>


<input type=&quot;text&quot; onKeyUp=&quot;return autoTab(this, 3, event);&quot;
onChange=&quot;setRubriek(this.form);&quot;>

That puts both your functions on the text box ...
Hope its what you wanted
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top