JavaScript to C# ?

  • Thread starter Mattia Saccotelli
  • Start date
M

Mattia Saccotelli

How to convert this JS:

function btnShowOrderDetails::OnClick(eventObj)
{
// Show the order details for the order that this button corresponds to.
if (eventObj.Source.baseName == "Orders")
ShowOrderDetails(eventObj.Source.getAttribute("OrderID"));
}

to C# code?

May be to this?

public void btnTest_OnClick(DocActionEvent e) {
e.Source.attributes.getNamedItem("OrderID") [...]
}

??
 
M

Mattia Saccotelli

this works (with a dynamic button in a repeating table with controls):

thisXDocument.UI.Alert(
"" + e.Source.attributes.length + " " +
e.Source.xml + " " +
e.Source.attributes[0].text + " " +
e.Source.attributes.getNamedItem("ID").text
);
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top