I have a form that contains a number of links, one of which is as follows:
View Checklist
In the JSHeader of the form, I have placed the following function:
function test(){
alert(‘TEST’);
}
When I click the link, I get an Error on Page message in the lower left hand corner of the status bar, which when double-clicked displays a dialog box contiaining ‘Error: Object expected’
My database has the Use javascript when generating pages option selected.
Any ideas or suggestions as to why this is not working would be greatly appreciated - thanks in advance.
Subject: Call to javascript function in form - Code Included
Can’t see any reason why it shouldn’t work, and tested your code exactly as pasted and it works fine for me in R6.5.1
I would suggest viewing the source of the HTML page generated and looking to see if you can find the test() function. One mistake I frequently make is to put code in the “Client” section of JS Header when it was meant for the “Web” section.
HTH - Rufus.
Subject: RE: Call to javascript function in form - Code Included
I was thinking the same thing - so I pasted the code in both the client and web section!
This is so strange, I have a form in the same database with the exact same setup - I compared the form properties and cannot find any difference.
Maybe I will reboot my system.
I’ll look into finding the error. Thanks for your response - I’ll let you know how it goes.