0

Greetings,

On reflection I have decided I was unclear in my last post so I thought I should have another go at it.

I have written an external script, located in validateform.js, that validates the information on a form. I have a second external script, date.js, that validated dates. I would like to call a function in dates.js from validateform.js but for the life of me I cannot figure out how.

Thanks again,

Jeff

3
Contributors
4
Replies
5
Views
7 Years
Discussion Span
Last Post by almostbob
0

Greetings,

On reflection I have decided I was unclear in my last post so I thought I should have another go at it.

I have written an external script, located in validateform.js, that validates the information on a form. I have a second external script, date.js, that validated dates. I would like to call a function in dates.js from validateform.js but for the life of me I cannot figure out how.

Thanks again,

Jeff

body onload?

0

well u can trigger a function with the <body onload="">
</body>

tag i assume u would put it in the external script but make it php? to call the other one?

0

as long as the scripts are in the <head> before any script is called, the scripts in a are available to b
they can be called just by calling their names

consider combining these separate scripts into one, since overhead in downloading separate small files is often more than the files themselves

in b if validating dates on submssion using a function val_date()
just type a line
val_date();
in the submission validate javascript

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.