Results 1 to 2 of 2

Thread: Click an Action Panel Button with JavaScript? (Callback with parameters)

  1. #1
    Join Date
    Apr 2014

    Question Click an Action Panel Button with JavaScript? (Callback with parameters)

    Hello fantastic people!

    I need help clicking a button in our support portal. It has a workflow behind push buttons that ask the user questions. I want to make a very simple 'Submit' button for them as its a little complicated currently. This will be added to a much friendlier instruction box on the bottom of my page.

    Please can anyone advise how i would click 'SubmitOrder' in JavaScript? Below is the code from inspecting the element:

    <li class="actionPanelItem" callback="" params="{ "function_name": "SubmitOrder", "function_type": "None", …lse, "is_multiselect": false, "custom_function_params": "" }">
    I will be clicking this from an iFrame embedded in the page as i cant edit the core code.

    Thanks for any guidance!


  2. #2
    Join Date
    Mar 2005
    Behind you...
    Looks like there is something else involved in regard to that button. It's obviously not an actual button (or input element for that matter) and there are no direct event handlers set for it. This means there is something somewhere in the javascript of the main page that attaches event handlers to this element and probably uses the data in the 'params' attribute as well. As a side note, I'm not sure how that's valid as the params attribute is wrapped in double quotes (") but the string contained also uses double quotes, which should break the value and cause issues with the element...

    Anyway, if you want to 'click that button', you'll need to find out where in the javascript it's setting the event handlers. This is where you can find what function or event to trigger in order to submit the form.
    "Given billions of tries, could a spilled bottle of ink ever fall into the words of Shakespeare?"

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center