```i have a client script in a suitelet and I need...
# suitescript
m
Copy code
i have a client script in a suitelet and I need to execute a function from that Client script once the form has been loaded. I have added my custom function to the CS like this:
return {
  showMessage: showMessage
}
and code in my suitelet with an INLINE HTML like this:
Copy code
form.addField({
 id: "custpage_js",
type: serverWidget.FieldType.INLINEHTML,
label: " "
}).defaultValue = ´<script>window.addEventListener('load', function(){ showMessage()}) </script>´
the js code works but the showMessage funtion cannot be found. Any suggestion?
n
why not add a client script path to the form and do it in pageInit
m
thank you
n
Oops that is the wrong link
m
i knwo what you mean
noworries
n
r
@razer456