HTML Button - Script Not Working?

I'm looking to dress up a form by adding in some HTML buttons that have images (basically the ItemType image).

I've got methods linked to normal buttons on the form and those are working as expected.

When I do an HTML button they look like I want, but the script doesn't seem to be firing.  Here's a code snippet:

	function meeting() {
	// Create an Innovator object

    var inn = aras.newIOMInnovator();
    var thisItem = parent.thisItem;

    var mtg = inn.newItem("Meeting","add");
    mtg.setProperty("_project", thisItem.getID());

    var results = mtg.apply();
    top.aras.uiShowItemEx(results.node, "tab view", true, true);

<button class="button-meeting" onClick="meeting()">

What have I got wrong here?  The script is copy/paste from the method.  Thanks in advance!

  • Welcome to the club to design less ugly buttons in Innovator.

    To help you with your question: Closing bracket } missing?

    One tip, especially for large functions (but I would always do it this way): Don´t use the script directly in Form, but an "onLoad" Method that adds an eventlistener to the button. It´s so much more convenient to code when you can use the Method editor. In addition the Method is more obvious to see then some hidden embedded scripts. Especially update team hates them...

    As alternative you can also add the stylesheets used for CUI buttons to the regular Form buttons. This gives you a result like this and working with images is much more easy:

    ---Unfortunately couldn´t add the screenshot, but basically it shows a CUI button inside of a Form. You can use the debugger to get an overview of CUI styling.

  • Yup, that was it...  Darn missing bracket!

    I'll look at the event listener bit.  I really didn't like putting the script in the Form vs a method, so thanks for that.

Reply Children
No Data