Controlling Browser Elements via JavaScript or ActionScript

From within one Flash movie, I'd like to open another browser
window containing a different Flash movie. The movie opens just
fine, but I'd like to deactivate the menu bar, address bar, and
toolbar.
Questions:
• Can I control/set these elements?
• Should this be done with AS? With JavaScript?
• I've heard that using JS to perform such a task is
problematic in some browsers?
Any help shedding light on these questions is greatly
appreciated.
Octothorpe

I would suggest getting yourself a javascript primer if
you're going to do any sort of web programming. I've found some
free tutorials hosted by
http://www.w3schools.com/
really helps. Second, it looks like Dave's script is using a
javascript function that's he's added to the page, it's not part of
the standard javascript library. The real javascript command is
window.open(params). There are many many examples on the web of how
to do this given the right search. Just be aware that it's real
easy to get confused on the quotes and parentheses required for any
getURL command that calls javascript.

Similar Messages

  • Can I control an Applet via JavaScript?????????????

    Please Guys! Can I control an applet via JavaScript?
    How????????????
    Thanks
    Renato

    Great to see you back, bbritta! Problems with the
    reauthentication stuff?The reauthentication was just another annoyance. I was getting fed up with answering posts for a variety of reasons (mostly because I don't have the patience you seem to have).
    I got assigned to modify some old ColdFusion code. I thought it would be a nice change of pace having never done it before. Yick... Gak... I should have started over with JSP's, but the user insisted they wanted the old code modified. I have never seen so much cut and paste coding in my life. They actually got hold of the old developer and he was so proud of his code that I didn't have the heart to tell him what I thought of his efforts.
    Anyway, a couple of weeks ago, I ran into a problem with an applet I wrote about a year ago and wanted to search the bug database. I reauthenticated fairly easily, but found out nothing had changed.
    A couple of days ago, there was a post in advanced topics asking if the forums were any use. I saw Dana respond and I thought it might be a chance to discuss some of the problems I saw with the forum. I came back to see if there was any response, but it looks like there will never be any meaningful discussion between Sun & the members about the forums.
    I have tried for a couple of years to just post a link to a search page if the answer could be easily found by searching. It seemed like a better thing to do than just saying 'Do a search!' I'm not sure anybody gets it though.

  • Targetting elements via javascript... how?

    The following is code for a navigation menu where only one option appears lit at a time (based on code sent to me by the amazing Jon Fritz II).
    CSS:
    a#button0, a#button1 {
        display:block;
        float:left;
        width:55px;
        height:67px;
        margin:0;
    a#button0.inactive
    { background:url(/carousel_home.png) -55 0 no-repeat }
    a#button0.active
    { background:url(/carousel_home.png) 0 0 no-repeat }
    a#button1.inactive
    { background:url(/carousel_vip.png) -55px 0 no-repeat }
    a#button1.active
    { background:url(/carousel_vip.png) 0 0 no-repeat }
    HTML:
    <a href="#" onclick="changeClass(this)" class="inactive menu" id="button0"> </a>
    <a href="#" onclick="changeClass(this)" class="inactive menu" id="button1"> </a>
    JSCRIPT:
    <script>
    function changeClass(elClass) {
      var divsLength =  document.getElementsByClassName("menu").length;
      for (i = 0; i < divsLength; i++) {
        document.getElementsByClassName("menu")[i].className = "inactive menu";
      elClass.className = "active menu"; 
    </script>
    What this does is swap the class of a clicked button (in a menu) while reverting all the other buttons back to their original state, so only 1 button appears "lit" at a time. The A tags are used as block elements that simply shift the background image so as to produce a "lit" and "unlit" state.
    My question is... via javascript (or anything else), is it possible to trigger class changes for the buttons from an area OUTSIDE the menu? In other words, can we make a text link on the page itself trigger which button in the menu to "light up". Something like <a href="javascript:slide('div1'); javascript:(go light up button1)">Example</a>
    The reason is that this menu is not the ONLY way to get from one section to another. So if I click on a link in another DIV on the same page that takes me to another area, ideally, I'd like to see the button representing that area in the nav menu light up like it's been clicked on -- even if it hasn't. And of course, the other buttons would NOT be lit.
    Thanks!

    I hadn't even noticed you changed the name of the function from changeClass to setClass, which of course who immediately explain why it started working on those elements that were still calling changeClass... except that when I changed the individual calls to setClass, they still wouldn't work.
    Was I supposed to leave the former changeClass function in the javascript? Is your setClass function supposed to be used in conjuction with the other one? Because I replaced one with the other, and ever since then, the new behavior works but the old one (clicking directly on the icon) does not.
    Here is my menu :
    <a href="javascript:slide('div-home')" onclick="setClass(this)" class="inactive menu" id="button0"> </a>
    <a href="javascript:slide('div-vip1')" onclick="setClass(this)" class="inactive menu" id="button1"> </a>
    <a href="javascript:slide('div-vip2')" onclick="setClass(this)" class="inactive menu" id="button2"> </a>
    <a href="javascript:slide('div-vip4')" onclick="setClass(this)" class="inactive menu" id="button4"> </a>
    <a href="javascript:slide('div-vip5')" onclick="setClass(this)" class="inactive menu" id="button5"> </a>
    <a href="javascript:slide('div-done')" onclick="setClass(this)" class="inactive menu" id="button6"> </a>

  • Controll HTMLB:Checkbox via JavaScript

    Hi all,
    I`ve created a BSP application containing HTMLB:Checkbox components.
    In this example the checkboxes are organized as a three of 2 levels.
    When clicking/checking the parent checkbox, I want the rest of the checkboxes (children) to change status depending on their parent's status. e.g checked=true/false and disabled=true/false. The checkboxes become disabled/enabled, but you cannot see any change in their checked/unchecked status.
    Though this works fine with design="classic", it doesn't when using design="design2003"...
    I have to use design2003 in my application, and want to use HTMLB:Checkbox instead of regular HTML Checkbox- which also works.
    The javascript syntax follows:
    (it's from a loop containing all the children checkboxes)
    nodeEl = elements<i>;
    nodeEl.checked = true/false;
    nodeEl.disabled = false/false;
    I would have appreciated any kind of help.
    Ogert

    This is my intire code, Raja T. The Javascript works fine with regular HTML Checkbox, or HTMLB:Checkbox combined with classic design.
    **HTML CODE
    <%@page language="abap"%>
    <%@extension name="htmlb" prefix="htmlb"%>
    <%<htmlb:content design="classic">%>
    <htmlb:content design="design2003">
      <htmlb:document>
      <htmlb:documentHead>
      <script language='javascript' src='control_checkbox.js'></script>
      </htmlb:documentHead>
        <htmlb:form>
    <table width="309" border="1">
      <tr>
        <td width="299" bgcolor="#999999">
        <htmlb:checkbox id        = "E1"
                        text      = "Parent"
                        checked   = "true"
                        onClientClick = "check_chkbox('E1');"/>
        </td>
      </tr>
      <tr>
        <td><htmlb:checkbox id        = "00111820|Chk0102|E1"
                        text      = "Child 1.1.1.2"/>
        </td>
      </tr>
      <tr>
        <td><htmlb:checkbox id        = "00111820|Chk0103|E1"
                        text      = "Child 1.1.1.3"/>
        </td>
      </tr>
        </htmlb:form>
      </htmlb:document>
    </htmlb:content>
    **Javascript Code:
    var forms;
    var elements;
    function check_chkbox(id) {
      var el;
      var nodeEl;
      var splitname;
      var ind = 2;
      var name = id;
      var tempname = split_name(id,'',ind);
      if(tempname != '') {
        ind = 1;
        name = tempname;
      getCheckBoxes();
      el = document.getElementById(id);
      if(!eval(el.checked)) {
        for(i = 0; i < elements.length; i++) {
          splitname = split_name(elements<i>.id,name,ind);
          if(splitname != '') {
            if(elements<i>.id != id && name == splitname) {
              nodeEl = elements<i>;
              nodeEl.checked = false;
              nodeEl.disabled = true;
      else {
        for(i = 0; i < elements.length; i++) {
          splitname = split_name(elements<i>.id,name,ind);
          if(splitname != '') {
            if(elements<i>.id != id && name == splitname) {
              nodeEl = elements<i>;
              nodeEl.checked = true;
              nodeEl.disabled = false;
    function split_name(name,splitname,ind) {
      var split_array = name.split("|");
      var size = split_array.length;
      var string;
      if(size == 3) {
        if(splitname != '') {
          string = split_array[ind];
          array = string.split(splitname);
          if(array[0] == '') {
            return splitname;
        string = split_array[1];
        return string;
      return '';
    function getCheckBoxes() {
      var tempArray = new Array();
      if(elements == null) {
        tempArray = document.all;
    <%--    case Firefox, Netscape --%>
        if(tempArray == null) {
          forms = document.forms;
          tempArray = forms[0];
        elements = new Array();
        for(i = 0; i < tempArray.length; i++) {
          if(tempArray<i>.getAttribute("type") == "checkbox") {
            elements[elements.length] = tempArray<i>;

  • Controling the flv via javascript

    I am looking for some tutorials on how to change the flv
    being played in a flash video component using javascript.
    Anyone have an idea of some good reading?

    I am looking for some tutorials on how to change the flv
    being played in a flash video component using javascript.
    Anyone have an idea of some good reading?

  • How to get elements in a multi-value field via javascript?

    The following will set variables.variable1 to variables.variable2 when the "Script Link" component is clicked...
    <Field>
    <Display class='Javascript'>
    <String>
    function myScript() {
    el=getElement(document.mainform,"variables.variable1");
    el2=getElement(document.mainform,"variables.variable2");
    el.value=el2.value;
    </String>
    </Display>
    </Field>
    <Field name='Script Link'>
    <Display class='Link'>
    <Property name='URL'>
    <String>javascript:myScript();submitCommand(document.mainform,%20'Recalculate');</String>
    </Property>
    </Display>
    </Field>
    My issue is, if variables.variabl2 is a list / multivalued, i get errors trying to traverse through the "array".
    How can i read and set an a list element via javascript function above? I've tried things like get() , and variables.variable2[0] .
    any help would be appreciated....
    is there an API somewhere i can reference?

    Hi,
    thanks for your reply!
    If I have the parameters in the URL and use the method GET it works all right.
    but I need the method to be POST. I suppose, I have the wrong way identifying the parameter name
    This is from VB
    varTarget = "http://localhost:9090/gm/getData" ' getData is my servlet
    xmlSendStr = "SQLStmt=SELECT TCPD_Cars.* From TCPD_Cars WHERE (((TCPD_Cars.CarIdent)=45));"
        xmlHttp.Open "POST", varTarget, True   'True means asynchronous
        xmlHttp.Send xmlSendStrthis is part of my Servlet
         protected void doPost(HttpServletRequest request, HttpServletResponse response)
                   throws ServletException, IOException {
              response.setContentType("text/html");
              PrintWriter writer  = response.getWriter();
              String SQLStmt = request.getParameter("SQLStmt") ;
            //make the database query and get the returns
            writer.println(GetSQLData(SQLStmt));
            //close the write
            writer.close();                    
         }I would appreciate any suggestions

  • Open PDF in browser - but cant control/close window from javascript

    Hi
    I hope I picked the correct forum
    Basically I have a site in asp classic. From a button I opens 2
    windows via javascript.
    One contains info, one shows a related file ( could be tiff or pdf ).
    When user closes info-window, I also close the file window via javascript, so that user only hav to click once.
    That works with tiff, but not with pdf, '!file.closed' returns that window are already closed.
    Somehow I simply loose contact to that window when I open pdf.
    My Adobe is set  with "open pdf in browser", version 10.1.2
    Any Ideas ?
    Overview what I do:
    function openTwoWindows(jnr,vikar,hvorfra){
              var left, top,vikar;
              width = (window.screen.availWidth/2)+80;
              width2 = (window.screen.availWidth/2)-80;
              height  = (window.screen.availHeight);
              info = window.open('info.asp'','top=0,left=0,height='+height+',width='+width+',resizable=yes,scr ollbars=yes,status=yes');
              var settings= 'toolbar=no,location=no,directories=no,'+
              'status=no,menubar=no,scrollbars=no,resizable=yes, top=0, left='+width+', height='+height+',width='+width2;
              file = window.open('showfile.asp?strJnr='+jnr+'&print=false','file',settings);
              info.focus();
    function closeFileWindow(){
                if(file && !file.closed){
                             file.close();
    if the file is a pdf -> showfile code in asp classic:
    Response.AddHeader "Content-Disposition","inline;filename=filename.pdf"
    Response.ContentType = "Application/pdf"
    'Response.Clear
    Response.Buffer = true
    // fetch file from database
    Response.BinaryWrite rsTmp("Fil")
    Response.Flush
    Response.End

    Read this:
    http://forums.adobe.com/thread/535609?tstart=0

  • Uploading a File with AppleScript via JavaScript

    Hi everybody,
    being new to AppleScripting and JavaScripting I'm faced with the following problem:
    Is it possible to make AppleScript to input the path for a file to be uploaded via JavaScript? If yes, what should be the correct Path Format and how to wrap it up the JavaScript action into AppleScript? I've tried a few comands but to no success.
    On the webpage in question, there's a "Choose" button, that is defined as follows:
    <input type=​"file" class=​"gwt-FileUpload" name=​"swfFile">​
    I've been trying to use the following syntax:
    do JavaScript "document.getElementsByName('swfFile')[0].value('Macintosh HD:Users:myaccount:Desktop:Scrapbook:!动画.swf')" in document 1
    as well as this one, where the Path is definitelly understood by shellscript:
    do JavaScript "document.getElementsByName('swfFile')[0].value('/Users/myaccount/Desktop/Scrap book/!动画.swf')" in document 1
    The name of the file is (and must remain) in chinese, but for testing purposes I have also tried files with english names, without success.
    Currently I'm using a solution with JavaScript comand:
    do JavaScript "document.getElementsByName('swfFile')[0].click()" in document 1
    to click the finder  window to browse for the file, and manipulating  keystrokes by using System Events to find the right file, but it's not  infallible with a number of files and it's hardly an ellegant sollution.
    Any idea what I'm doing wrong?
    Cheers!

    @twtwtw
    the do JavaScript "document.forms[0].submit()" command didn't work, so I kept the original way of submitting by clicking the button. The submitting part works, but not the input file part.
    That's the code I used
        tell application "Safari"
            do JavaScript "document.getElementById('gwt-uid-13').value='on'" in document 1
            do JavaScript "document.forms[0].elements['swfFile'].value=" & "'" & SWFFilePath & "'" in document 1
            do JavaScript "document.getElementsByClassName('gwt-SubmitButton')[0].click()" in document 1  
            delay 1
        end tell
    with SWFFilePath set as the POSIX path as well as the default file format
    Macintosh HD:Users:myaccount:Desktop:Scrapbook:!动画.swf'
    but it did not work.
    If you've got the time, feel free to upload an .swf. The service is free and the server delats uploaded files after 15 min. (if you don't have any, you may try an empty .txt file instead - it won't get converted, but the point is just to get it into the input box).
    In the meantime, I'll have a look at adayzdone's suggestion. It's not perfect (the downside being that it requires the window to be active, so I can't run the script in the background or with my screensaver & password on), but it's still more reliable than my sollution with navigating arrowkeyes.

  • Calling a function in Flash via JavaScript

    My project is in Flash CS3 ActionScript 2. I am using
    JavaScript elements in my project that are called within Flash. The
    following code placed on frame 1 of my main timeline goes to frame
    2 and displays the JavaScript element = that works. Here's the
    code;
    HS_Film_Button.onRelease = function ()
    gotoAndStop(2);
    flash.external.ExternalInterface.call("firehs");
    Now when on frame 2, I want the JavaScript "close button" in
    the element to go to frame 1 on my Flash main timeline. Right now
    what it does is closing itself in frame 2 of my Flash page, so I
    added a flash button in there to go to frame 1. Thus the need to
    double click to finally end up on frame 1. But I want the
    JavaScript element to do that in the first place!
    The real issue here is that the JavaScript element was once
    on my main single frame timeline but its performance (display speed
    and such) was greatly affected by my Flash Time and Date and Frame
    rate calculations. This JavaScript element is based on miliseconds
    and I suspect that my Flash file is based in seconds and that my
    Flash calculations are grabbed by the Browser and directing my
    JavaScript element.....Hey I am getting lost I hope you kind of see
    what I mean. Anyways, if I could just get rid of frame 2 all
    together and have some kind of coding that would eighther have
    Flash calculate in miliseconds rather than seconds????? to match my
    JavaScript one.... Or codify JavaScript so that when called it
    would take over and tell the Browser to change its calculations
    rates?
    If you wish please have a look at the Forum topic postings
    where all of this is evolving with questions examples and
    answers....This link gets you right in the posting.
    Highslide
    JS Forum
    This is where Flash meets JavaScript! I need help please.
    Kind Regards
    Pierre

    Hi, Since your reply I have been trying to follow your
    direction and found a couple of things,
    My flash site is based on the AC_FL_RunContent JS file
    not the
    <object classid= ..............>
    <param name="allowScriptAccess" value="
    sameDomain" /> which element in bold should probably be
    repalced by "always" for the externalinterface addCallback() to
    work properly. The question being what code I have to ad to the
    AC_FL_RunContent JS file for allowScriptAccess.......
    quote:
    ExternalInterface is similar in functionality to the
    CallFrame() method but is more flexible and more generally
    applicable. ExternalInterface is the preferred method for
    JavaScript–ActionScript communication in Flash Player 8 and
    later.
    So I see I could use externalinterface addCallFrame() for
    achieving Javascript to ActionScript communication ; when
    Javascript close button is pressed Flash goes to frame 1........
    The latest hint I got from Highslide JS was to add the
    following in the Head section;
    <script type="text/javascript">
    hs.Expander.prototype.onBeforeClose = function (sender) {
    return confirm("Do you really want to close this nice
    image?");
    </script>
    The line in bold should be the code to call to go to frame 1
    in Flash and the onBeforeClose should probably be onAfterClose.
    Anyways, I am completely lost in space = could you really hep
    me out with this code by code and where to put those exact
    codes.....please
    Pierre

  • Resize an Object via javascript

    Resize an Object via javascript
    How do I...
    I want to select an object in my document, onscreen, (an image, or text) then run a script that will discern the object selected, and show a dialog box that will allow me to input a sizing percentage for that object (with anchor corner/center)(Press enter and object resizes).

    No they don't.
    Acrobat may be bundled with Creative Suite collections but the APIs has nothing in common other than the use of JavaScript. CS apps use the ExtendScript system, Acrobat has its own internal API and an SDK for inter-application control.
    PDF is an end-destination format - the page content is not designed to be edited, so while there are tools in the user interface to allow touchups and corrections to page objects those features are not available for automation. The JavaScript engine does not have access to the low-level document structure, it can only see markup (comments and form elements) and a limited range of document properties.
    bdmasha wrote:
    They are all part of a suite of tools that share a common access to internal api's via scripting/programming languages.
    InDesign is not Photoshop is not Illustrator, but they have much in common when accessing their api's that Acrobat does not allow--and Acrobat is part of that Adobe suite.
    Thanks again.

  • Modifying File Browse item through Javascript

    I would like to modify the value of a File Browse item with javascript in my Submit button under certain circumstances. I would like to remove the file name (and path) from the File Browse field, so that the file is not automatically uploaded when the Submit button is pressed. It would seem I could "null" out the filename within the javascript function and then follow that with doSubmit ('SUBMIT'). The rest of the page values would be posted to the database, but the file would not get loaded. However, I cannot figure out how to access and modify the filename in the File Browse field with javascript. I've tried using ".value" and ".src" but to no avail. Saw a thread that says there is a bug with File Browse items in versions earlier that 2.2 (I'm using 2.0), and that you needed to fall back on the "p_t xx" notation, but I can't find any information on what that is. Appreciate any help.

    I apologize for the multiple threads. The response to my initial inquiry on thread Inserting/uploading data without inserting/uploading a document was that "others" would be better equipped to help me than the initial responder, so I didn't think I was supposed to continue with that thread. (Haven't used this forum much.) I found a second thread (the one with the "p_tXX" notation, and responded to it, but wasn't sure if all older threads were still active, so I also iniitiated a thread on my own.
    In response to the inquiry about why not using an after submit computation to null out the File Browse item, what I am trying to prevent is the uploading of a file to the WWV_FLOW_FILE_OBJECT$ table, if there is an entry in my File Browse item, when all the user really wants to do is update some data items on the main portion of the page. I have a Apply Changes button on the main data entry form, and then I also have (at my user's request) a separate form and Submit button on the page where the user may enter a file name to upload. The trouble exists when the user is only trying to modify data in the main form, but has also left an entry in the File Browse item. When the page is submitted, the data is uploaded OK, but the file is also uploaded via HTMLDB_APPLICATION_FILES, since there is an entry in the File Browse item. What I'm trying to do, is clear that File Browse item out when the user presses the main form Apply Changes button, so that the file does not get uploaded. The users want the ability to upload a file, but only when that is their direct intent. Obviously, I do not want to clear out the File Browse item under those circumstances. Hope this is clear; sometimes difficult to satisfy the users needs (whims?). Appreciate any help.

  • Flash inserted via Javascript not working in IE.

    I am having issues viewing flash that has been inserted via
    javascript in Internet Explorer. I had to uninstall my flash about
    a week ago. I've since reinstalled flash and reinstalled flash
    player for all my browsers. All flash shows where it hasn't been
    inserted via javascript (ie. youtube.com) but javascript flash is
    not showing at all in IE. Firefox is working fine. Any help in
    resolving this issue for IE would be greatly appreciated.
    Duncan

    I'm having the same exact problem. I've uninstalled,
    reinstalled, the works. Flash works great in my alternate browser,
    Opera, but not with IE.

  • How to include HTML file in JSP using HTML elements or Javascript?

    Hi,
    I have around 15000 static html files one for each item which we display each upon invoking an item.The HTML file should be part of a JSP file.
    Please note that the name of the HTML file is determined dynamically
    Placing all the HTML files within the web application does not give us good performance so i would like to put all of them in the webserver.
    I am not able to include the file in the JSP using the jsp:include attribute if i place the HTML files in the webserver ,
    in order to do that i think should use either HTML element or javascript to include the HTML in the JSP.is there any alternative to <Jsp:include>
    Does anyone have an idea how to include the HTML file and take advan tage of webserver?
    Any ideas are appreciated

    What you need to do is simply read the HTML file from the disk and dump it out to the outputstream. It really is that simple.
    There's no reason you need to include all 15000 files in the actual WAR, you can place those files any place handy that is easy for the application to see (in another directory, or accessible from a file server if you have multiple front ends).
    Then, just write a utiility function that takes the output stream (i.e. the 'out' JSP variable), and the file name, read the file, and write it to the stream.
    If you start noticing performance issues, then you can try doing some caching, but truth is your OS should be doing that for you.
    But, truth be told that's the only practical way to do it.
    Another solution would be to use JavaScriipt and XMLHttpRequest (i.e "AJAX") to load the file at the client side, and simply replace a tag with the results.
    That's also pretty trivial to write, any web site talking about AJAX should give you hint there.
    Of course, that won't work for folks who have JavaScript turned off, or some other incompatible browser, whereas the server side solution obviously works everywhere.

  • Control browser properties from a java application while launching a browse

    How to control the properties of a browser when it is launched from a java application?
    I am using the command " Runtime.getRuntime().exec("rundll32 url.dll,FileProtocolHandler "+url); " to launch the browser. The syntax of "exec" command is "public Process exec(String command,String[] envp) throws IOException". I would like to know whether we can give the arguments in this command to control the browser properties.
    If you know any other option by which we can open a URL in a controlled browser, please share it.
    Thanks in advance :).
    Surekha_Venugopal

    Hi All,
    I have found a solution to control browser parameters from Java applications.
    1. Create an intermediate HTML file at runtime which contains Javascript to launch a browser. Pass the parameters like the URL and browser control parameters to the Javascript of this HTML file.
    2. Open this HTML file and invoke the javascript while loading the file. Javascript will launch the required URL in a controlled browser.
    3. Close the intermediate HTML file.
    Limitation:
    1. There will be a flickering of windows.
    2. Applets will have permission issues with the above solution. For applets a better solution is JSobject. No need of an intermediate file here.
    Hope this will be useful for someone. :-)
    Cheers,
    Surekha_Venugopal

  • Sun IdM: How to set a multi-value field on document.mainform via javascript

    The following will set variables.variable1 to variables.variable2 when the "Script Link" component is clicked. I would like to modify
    this so that el2 references a multi-valued element (e.g. a list generated by a Select Field)
    <Field>
    <Display class='Javascript'>
    <String>
    function myScript() {
    el=getElement(document.mainform,"variables.variable1");
    el2=getElement(document.mainform,"variables.variable2");
    el.value=el2.value;
    </String>
    </Display>
    </Field>
    <Field name='Script Link'>
    <Display class='Link'>
    <Property name='URL'>
    <String>javascript:myScript();submitCommand(document.mainform,%20'Recalculate');</String>
    </Property>
    </Display>
    </Field>
    My issue is, if variables.variable2 is a list / multivalued, i get errors trying to traverse through the "array".
    How can i read and set a list element via the javascript function above? I've tried things like get(), put() , as well
    as path expressions like variables.variable2[0] .
    any help would be appreciated....
    is there an API somewhere i can reference?

    The MultiSelect field-type is a little different than the rest of the fields. If you use the applet version, then selecting/deselecting values cannot be captured by referencing the field directly in javascript.
    The way to identify the selections is to use the javascript methods includes/MultiSelect.js file (IDM form submission uses the same method):
    fixMultiSelectAppletBeforeSubmit( )
    fixMultiSelectNonAppletBeforeSubmit( )
    .. and then referencing the "<multiselect-field>_selected" form element.
    So in your case, the code should look something like this:
    function myScript() {
        fixMultiSelectAppletBeforeSubmit(document.mainform,"variables.variable1");
        var el1 = getElement(document.mainform,"variables.variable1_selected");
        // assign the value to variable2..
        el2 = getElement(document.mainform,"variables.variable2");
        el2.value = el1.value;
    }Just make sure ":variables.variable2" is not a multi-select field, else the value set here will be reset during form submission.
    Adi
    [www.xpressutils.com|http://www.xpressutils.com]

Maybe you are looking for