cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X

Javascript, XUI and ACL

pzorrilla
1-Newbie

Javascript, XUI and ACL

Hello Experts!!

Today I'm facing a problem with my ACL code, I've implemented a
radioGroup in order to define a sort of options to the user, I did this
implementation using XUI, but now what I'm needing is to get the value
picked by the user. I though that using java this would be easy, but I
just can't get the elements according to the radio group, so I decided
to use javascript, however I'm still facing certain problems. Here's
part of my code:

<<xuiwindow.js>>
var doc = e.target.ownerWindow.activeView.document;
var xuiwin = Application.event.view.window;
var grid = Application.event.target.parentNode;
var nodelist = grid.getElementsByAttribute('checked','true', 1);
if (nodelist.length > 0) {
var label = nodelist.item(0).getAttribute('id');
Application.alert("Label: " + label);
}

As you can see I'm trying to pass the event which in my case is click
one button, however I can not pass this value, in my acl code I have
something like this:

function walktroughXML(win, dlgitem, event, data, appdata){
if (event == "ITEM_CHANGED") {
js_source("xuiWindow.js",$event);
}
}

and this function is called since another acl command:
dlgitem_add_callback($win, 'cool_stuff_bn',
'walkThrough::walktroughXML'); (which I call when I create the XUI window)

So, my question is: Does anybody knows a better way to get values from
my radioGroup in my XUI window to my ACL code? Do you recommend to use
javascript? Or do you think is better Java? Also I would like to know if
there's any tutorial where I can find more information related with this
stuff 🙂

As always I really appreciate your help, time and support.


Regards!!
Paulette Zorrilla

0 REPLIES 0
Top Tags