Jump to content

How and where to call javascript function on back office


jahyax

Recommended Posts

Good day,

 

 

 

on price.js  i created a function like:

 

public function myFunction(){

..................

}

 

and on price.tpl i added custom input just below Pre tax retail price

 

<tr>

<td><input type="text" name="custom_input" class=''custom_input" value=""></td>

</tr>

 

i would my function to called when i hit the save button and verify if the input is correct like:

.....alert('your input is not a number, please input a proper value'),

 

can someone please point me to the right direction where to call the function 'myFunction' so that it will prompt the user to input a proper value before even saving the value into the database..

Link to comment
Share on other sites

Vekia Good day!

 

thanks for giving the link for javascript form validation. but what i really want to know is where do I place or call the function 'myFunction' so that when I click the save button on the header the value will be validated first before it is being saved..

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...