Complicated? Yes!
Tags: development WebDevelopment
Today I received an email from a customer with an attached database. A ready designed and tested version which should go to production at the beginning of march. Attached was also a short documentation.
Because I didn't know the developer I seriously looked at the document and the database. But while reading I felt there might be something wrong with this application. No description of how to set the ACL. No description of the included agents. No description of the configuration within the database. Nothing. But hey, what is the test environmet for? So I took the nsf, copied it to the server and had a look.
Launch options for browser opens a frameset. And the frameset opens a welcome page and a form. After starting from the browser, there was an agent printing the following to the server console three times a second:
HTTP Server: Agent 'AgentName' error: Object variable not set
I closed the browser and the message was gone. Next step: a look to the form in the Designer. The form contains some fields, some buttons and some html. And there were two JavaScripts: JS Header and onLoad. I found the agent causing the error in one of the Buttons started with a @Command. But I didn't see the button in the browser and so I didn't press it. The Notes Hide when's were empty but I've found somethingin the Button Extra HTML: ID: button, Style: display=none. But where the heck is the developer starting the agent? There must be something I've overseen. Then I looked into the onLoad JavaScript and gues what I've found:
document.all.button.click()
This is the first agent I've seen, which is started on the web by a hidden button clicked from a JavaScript.
I don't think this application will be used on our production server in march...
Shoot the developer!
Today I received an email from a customer with an attached database. A ready designed and tested version which should go to production at the beginning of march. Attached was also a short documentation.
Because I didn't know the developer I seriously looked at the document and the database. But while reading I felt there might be something wrong with this application. No description of how to set the ACL. No description of the included agents. No description of the configuration within the database. Nothing. But hey, what is the test environmet for? So I took the nsf, copied it to the server and had a look.
Launch options for browser opens a frameset. And the frameset opens a welcome page and a form. After starting from the browser, there was an agent printing the following to the server console three times a second:
HTTP Server: Agent 'AgentName' error: Object variable not set
I closed the browser and the message was gone. Next step: a look to the form in the Designer. The form contains some fields, some buttons and some html. And there were two JavaScripts: JS Header and onLoad. I found the agent causing the error in one of the Buttons started with a @Command. But I didn't see the button in the browser and so I didn't press it. The Notes Hide when's were empty but I've found somethingin the Button Extra HTML: ID: button, Style: display=none. But where the heck is the developer starting the agent? There must be something I've overseen. Then I looked into the onLoad JavaScript and gues what I've found:
document.all.button.click()
This is the first agent I've seen, which is started on the web by a hidden button clicked from a JavaScript.
I don't think this application will be used on our production server in march...
Shoot the developer!










Comments
Posted by Jens Polster At 17:39:11 On 08.02.2008 | - Website - |
Posted by Thomas Lang At 17:46:52 On 08.02.2008 | - Website - |
not so uncommon. In the R5 days a popular workaround for (forgot for what) was to call buttons from JavaScript that did all sorts of ugly things.
Seeing this type of code makes shooting the
developerscode an act of mercy.Posted by Stephan H. Wissel At 18:54:39 On 08.02.2008 | - Website - |
Posted by John Vaughan At 21:46:51 On 08.02.2008 | - Website - |