Change "choiseListe" values with javascript

Dear,
Is it possible to change "choiseListe"  values  with javascript.
Exemple il have a choseListe :
     Country //// Values
      USA            us
      France         fr
      Spain           sp
When il click in a botton i whant to change this choceListe :
     Country //// Values
      Morocco           ma
     Portugal           pt
Thanks

Hi,
Listboxes and dropdowns can be scripted against without too much difficulty.
You would need something like this in the click event of the button:
listbox1.rawValue = null; //clear previous choice
listbox1.clearItems(); //clear the list items
listbox1.addItem("Moocco", "ma"); //add new list items
listbox1.additem("Portugal", "pt");
Hope that helps,
Niall

Similar Messages

  • Change TextView value with Javascript

    Hello,
    I'm trying to find a way of changing the value of an HTMLB TextView on the client side with javascript.
    Do you know how to do that ? Cannot work it out...
    Many thanks
    Nicolas

    Hi,
    this can be a bit tricky, because you have to know, how to access the element. that means you need an unique id or an absolute position of the TextView-element
    if you can see, how to access the specific element in your client-pagesource, a possible javascript could be:
    document.getElementById("<id of element>").firstChild.nodeValue="My new Text"
    or access by name/count of the element:
    document.getElementsByName("<name of element>")[#position of occurance].firstChild.nodeValue="My new Text"
    kr, achim

  • Change page attribute with JavaScript

    Hi,
    hope someone can help.
    Is it possible to change a BSP page attribute with JavaScript??
    I have a JavaScript array with some serialnumbers. After push a save button, i want to save the array data into a page attribute.
    Some ideas?
    Regards Anton

    Hi,
    The only way of passing vars from JS to page attributes is submitting them via (hidden) values in a form or via params in an URL.
    Alternatively, you can try to let JS store things in a client cookie and let the BSP read that cookie.
    I didn't try that out yet though.
    Eddy
    PS.
    Put yourself on the SDN world map (http://sdn.idizaai.be/sdn_world/sdn_world.html) and earn 25 points.
    Spread the wor(l)d!

  • Changing applet parameters with Javascript

    Is it possible to have an applet read a param value which has been changed with Javascript after the applet loads?
    I've tried changing the param value in this way, but the applet doesn't read the new value. It reads the default value in the HTML when the applet loads, and getParameter is in the main loop of the applet which runs and updates other (internal) values fine...

    Well that page says that param values can't be changed at run-time. Never mind though because I read some more and found out how to implement a method in the applet (which can be called from Javascript) that reads the host page's DOM, thereby achieving the same result.
    Thanks for the pointer.

  • How to change a value with reference if inside of a tabControl?

    Hello,
    i have a Vi with a tabcontrol and two pages. On each page is a string-control (string1 and string2).
    Now i have second vi that gets the file-reference of the first vi and is called inside of the first vi.
    This reference do i want to use to change the value of the string-control.
    But i dont have access to "pages" when using the reference.
    Attached the two vis.
    Thanks for the help
    Attachments:
    main.vi ‏7 KB
    ref.vi ‏11 KB

    Easiest way that I know is to right click on the control itself and select "Create->Reference".
    Mark Yedinak
    "Does anyone know where the love of God goes when the waves turn the minutes to hours?"
    Wreck of the Edmund Fitzgerald - Gordon Lightfoot

  • Change 3D views with JavaScript code?

    I am looking for a way to change 3D views using JavaScript. I want to obtain similar result as the predefine action (Go to a 3D view) but with code.
    More preciselly, I want to connect items within a list box to different 3D views.
    Any ideas or suggestion would be greatly appreciated.
    Thank you
    Tutorial on how to use the Go to a 3D view action:
    Connecting Document JavaScript to 3D Views (PDF: 2.3M)
    http://partners.adobe.com/public/developer/en/tips/topic_tip3.pdf
    Related topics:
    looking for a way to switch views using Javascript
    http://www.adobeforums.com/cgi-bin/webx/.3bbed722/0
    SMOOTH TRANSITION BETWEEN VIEWS?
    http://www.adobeforums.com/cgi-bin/webx/.3bc0ce56
    Cameras vs. views; views.xml
    http://www.adobeforums.com/cgi-bin/webx/.3bbf0748/3

    hello maybe other have same problem i found a simple solution for me
    use the javascript bridge and juse the f4m manifest files
    function changeSrc(playerdivId,src){
                var player = document.getElementById(playerdivId);
                player.setMediaResourceURL(src);
    src multicast fm4 manifest like this
    http://sourceforge.net/apps/mediawiki/osmf.adobe/index.php?title=Flash_Media_Manifest_(F4M )_File_Format
    best regards

  • Getting hidden value with javascript problem

    <html>
    <body>
    <form>
    <input type="hidden" id="code" value="123">
    </form>
    </html>
    when open the html file and type "javascript:alert(document.getElementById("code").value)" in the address bar, I get a message box with "123".
    but when i do in the jsp with
    <input type="hidden" id="code" value="<%=request.getParameter("code")%>">
    and type the javascript in the address bar, i get "object not supported".
    Can anyone tell me how to get hidden value in jsp with javascript?
    thank you.

    There is no difference between a JSP or plain html, since javascript executes on the client side after the JSP is done processing. There is obviously something wrong with the HTML content after you input the request value, so check the generated HTML in your browser to see if there are any unwanted quotes in there or something.

  • Extended rebate - change payment values with Badi RBT_ENH_BADI_SETTLE

    Dear all
    I am trying to change payment values for an extended rebate agreement credit memo.
    According to the documentation it can be done using BADI
    RBT_ENH_BADI_SETTLE .
    I am using  method BONUS_VALUES_MODIFY , but no values
    has been changed in the credit memo.
    Does anyone have experience using the BADI ? Or any other idea how to change the payment values (not manually )?
    Thanks ,
    Miriam Harel

    Hello Miriam,
    I've got the same needs. Did you use finally this Badi ?
    If yes could you kindly tell me how did you use it?
    BR.
    Frédéric TURILLON.

  • Capturing form values with javascript (not working in Safari!)

    Hi
    I'm working on a site and I need to be able to take the values of one form (that the user has entered) and use them to populate a second form (more details) in the appropriate input boxes. This works on all browser except Safari. It seems to me a javascript problem (as getElementById does not work properly) but I'm not entirely sure. The code I use to grab the form elements is as follows:
    obj = $('formslider".$this->id."');
    obj.getElementById('registerfirstname".$this->id."').value = callbackfirstname".$this->id.";
    obj.getElementById('registersurname".$this->id."').value = callbacksurname".$this->id.";
    obj.getElementById('registeremail_addr".$this->id."').value = callbackemail".$this->id.";
    obj.getElementById('registertelephone".$this->id."').value = callbacktelephone".$this->id.";
    obj.getElementById('registerrequest_type".$this->id."').value = requesttype_callback".$this->id.";
    This basically takes the values of the "callback" form and places them into the appropriate input boxes of the "register" form. However it seems to lose the values when moving to the next form. Please note, I am not refreshing - I am using Ajax to change the form so new content simply replaces an existing content, not transfering to another page. I use Sessions so it shouldn't forget the values.
    Can anyone help? It's quite an important thing as I need to migrate hidden form inputs too which are needed for this particular request system.
    Thanks
    Michael

    I'm seeing this same issue in Mavericks, 10.9.2.  Althought JavaScript is enabled in Safari, it just doesn't work, for any pages.
    I've tried different user accounts, including a new account, on the same machine, but they all do the same thing, so it's a machine-wide issue.
    I have plenty of other Mavericks machines, including my own, where it is working just fine, however, with the same settings.

  • Retaining BSP Page values with Javascript popup window

    Hi Experts
    We are using a customized BSP application for our performance
    Management. To propmt users for saving their appraisal documents
    before a session timeout,we used an Javascript popup message(alert
    window). This window doesnot affect the BSP page in any way.(code
    provided below)
    Per changed requirement,we now have to retain the BSP page values once
    the user clicks 'OK' on this javascript popup window. I used the page
    refresh option with script. But this is erasing the earlier values.
    Can anyone tell me,how i can holdback the BSP page values after the
    user action on the popup window. If a piece of code is provided,it
    would be greatly appreciated.
    Thanks in Advance
    Alan
    Existing code for timeout popup
    javascript code
    function remind (){
    var msg = "Your Session will expire in the next 10 minutes. Please
    save your data.";
    alert the msg(using alert box)
    <%
    data: v_rem type string.
    DATA: port TYPE STRING.
    data: l_timer type string.
    port = request->get_header_field(
    if_http_header_fields_sap=>server_port ).
    DATA: services TYPE TABLE OF ICM_SINFO.
    CALL FUNCTION 'ICM_GET_INFO' TABLES SERVLIST = services.
    FIELD-SYMBOLS: <service> TYPE ICM_SINFO.
    DATA: wait TYPE STRING.
    READ TABLE services ASSIGNING <service> WITH KEY service = port.
    wait = <service>-KEEPALIVE - 10.
    CONDENSE wait.
    ****Start Changes: Timeout
    **l_timer = wait * 60 * 1000.
    l_timer = 1 * 60 * 1000.
    ****End Changes
    concatenate `'remind(` wait `)',` l_timer into v_rem.
    %>
    <htmlb:content design            = "DESIGN2002+DESIGN2003"
                   sessionManagement = "TRUE"
                   controlRendering = "SAP">
    <htmlb:page title = "<%= otr(ZPMDGL/TITLE_DOCUMENT) %>"
                  disableBackspaceNavigation = "TRUE" onLoad pass v_rem as a  parameter to setTimeout
    Edited by: Bala Subramanyam Duvvuri on Apr 8, 2008 6:32 AM
    Edited by: Bala Subramanyam Duvvuri on Apr 8, 2008 6:34 AM
    Edited by: Bala Subramanyam Duvvuri on Apr 8, 2008 6:35 AM
    Edited by: Bala Subramanyam Duvvuri on Apr 8, 2008 6:36 AM
    Edited by: Bala Subramanyam Duvvuri on Apr 8, 2008 6:36 AM
    Edited by: Bala Subramanyam Duvvuri on Apr 8, 2008 6:37 AM
    Edited by: Bala Subramanyam Duvvuri on Apr 8, 2008 6:38 AM
    Edited by: Bala Subramanyam Duvvuri on Apr 8, 2008 6:39 AM
    Edited by: Bala Subramanyam Duvvuri on Apr 8, 2008 6:40 AM
    Edited by: Bala Subramanyam Duvvuri on Apr 8, 2008 6:40 AM
    Edited by: Bala Subramanyam Duvvuri on Apr 8, 2008 6:44 AM
    Edited by: Bala Subramanyam Duvvuri on Apr 8, 2008 6:46 AM

    If the BSP page is refrehed, all the user input it sent back to the server. If you don't do anything special, the input is lost and not sent back to the client again. You can go to your controller class' DO_HANDLE_DATA to read the user input, and store it in the controller class to send it back to the client.
    If you don't use controller classes, the equivalent would be onInputProcessing. A more advanced alternative would be to use MVC model binding, which would do most of the stuff automatically for you.

  • Assigning a DataProvider filter value with JavaScript

    I have a "Fiscal Yr/Period" filter characteristic in my web application that I am assigning the value of the current month and year when the web application is loaded.  In other words, this filter is applied to the DataProvider when the application loads (code below):
    <object>
             <param name="OWNER" value="SAP_BW"/>
             <param name="CMD" value="SET_DATA_PROVIDER"/>
             <param name="NAME" value="C_LPR_Q018"/>
             <param name="QUERY" value="C_LPR_Q018"/>
             <param name="INFOCUBE" value="ZPP_C01"/>
             <param name='FILTER_IOBJNM' value='0FISCPER'/>
             <param name='FILTER_VALUE' value='H12004010'/>
             DATA_PROVIDER:             C_LPR_Q018
    </object>
    As you can see above, the value for the '0FISCPER' object is hardcoded and thus requires me to change this monthly.  I have written some JavaScript code to calculate the current mo. and yr. however I can't get my JavaScript variable that holds the value I need assigned to the FILTER VALUE.  Can I even assign a JavaScript variable as the filter value?  Is there another way?  Any help would be greatly appreciated.

    Hi Allen,
    if you want to change any param of an object, try the function SAPBWOpenURL, which should be sent against the object you want to change. Documentation is at :
    http://help.sap.com/saphelp_bw33/helpdata/en/f1/0a5a2ee09411d2acb90000e829fbfe/frameset.htm -> Business Explorer ->
    Web Application ... -> Befehl URLs
    Concat the date in JavaScript and call
    SAPBWOpenURL(SAP_BW_URL_Get()+'&item=...&FILTER_IOBJNM="0FISCPER"&FILTER_VALUE="TheDateYouWant"') (I hope I set the " and ' correctly, better you should check).
    For example you can insert :
    <HEAD>
    <script>
        function callTheTableWithTheDate()
            SAPBWOpenURL(like above);
    </script>
    </HEAD>
    <BODY onload="JavaScript:callTheTableWithTheDate()">
    It's only a hint, adjust it for your requirements. You can save the date in a cookie too and reuse it whenever you want. You know how to handle cookies ?
        Bye
        Ralf

  • Change php variable with javascript??

    Hey Guys
    I need to know how can i send the form to a different email address if someone selects an option from the "BSU(area)" on the HTML from.
    So basically if the are on the html form and they select NewCastle from the "BSU(area)" for example i want the script to change the email address to the address assigned to that option.
    How can i achieve this? If you guys need to see my PHP script let me know.
    Help please!!
    Here's the link: http://flyingant.co.za/invite.html
    yours
    Ashveer

    Yes i agree with you.
    Here's my script tell me where i am going wrong?
    <?php
    // Build message.
    $my_email = "";
    global $my_email;
    function build_message($request_input){if(!isset($message_output)){$message_output ="";}if(!is_array($request_input)){$message_output = $request_input;}else{foreach($request_input as $key => $value){if(!empty($value)){if(!is_numeric($key)){$message_output .= str_replace("_"," ",ucfirst($key)).": ".build_message($value).PHP_EOL.PHP_EOL;}else{$message_output .= build_message($value).", ";}}}}return rtrim($message_output,", ");}
    $message = build_message($_REQUEST);
    $message = $message . PHP_EOL.PHP_EOL."-- ".PHP_EOL."";
    $message = stripslashes($message);
    $subject = "Form To Email Comments";
    $headers = "From: " . $_REQUEST['Email'];
    mail($my_email,$subject,$message,$headers);
    ?>
    <?php
    function getValue($Result){
    //$Item = form.BSUarea.selectedIndex;
    $Item = $_POST["BSUarea"];
    //$Result = form.BSUarea.options[Item].text;
    $Result = $_POST["BSUarea"];
    switch ($Result) {
    case ($Result = "Gauteng"):
    //$Gauteng = "[email protected]";
    $my_email = "[email protected]";
    //$my_email = $Gauteng;
    break;
    /*case ($Result = CapeTown):
    CapeTown = "[email protected]";
    $my_email = CapeTown;
    break;
    case ($Result = Richards_Bay):
    Richards_Bay = "[email protected]";
    $my_email = Richards_Bay;
    break;
    case ($Result = Pinetown):
    Pinetown = "[email protected]";
    $my_email = Pinetown;
    break;
    case ($Result = Pietermaritzburg):
    Pietermaritzburg = "[email protected]";
    $my_email = Pietermaritzburg;
    break;
    case ($Result = NewCastle):
    New Castle = "[email protected]";
    $my_email = NewCastle;
    break;
    case ($Result = George):
    George = "[email protected]";
    $my_email = George;
    break;*/
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>BSU - Evite</title>
    </head>
    <body>
    <div class="main">
    <div class="content"></div>
    <form id="form1" name="myform" method="post" action="#build_message">
    <table width="525" border="0">
    <tr>
    <td width="270"><label><strong>BSU(area)</strong></label></td>
    <td width="10"> </td>
    <td width="240" align="left">
    <select name="BSUarea" id="BSUarea" onchange="getValue($Result)">
    <option value="Durban">Durban</option>
    <option value="Richards_Bay">Richards Bay</option>
    <option value="Gauteng">Gauteng</option>
    <option value="CapeTown">Cape Town</option>
    <option value="George">George</option>
    <option value="NewCastle" >NewCastle</option>
    <option value="Pietermaritzburg" >Pietermaritzburg</option>
    <option value="Pinetown">Pinetown</option>
    <option value="Polokwane">Polokwane</option>
    </select></td>
    </tr>
    <td width="270"></td>
    <td width="10"> </td>
    <td width="240"><label>
    <input type="reset" name="Reset" id="Reset" value="Reset" />
    <input type="submit" id="Submit" value="Submit" />
    </label></td>
    </tr>
    </table>
    </form>
    </div>
    </body>
    </html>

  • USOBT_C almost empty after changing default values with SU24

    After the implementation of OSS Notes 0001378328, 0001382895 and 0001404093 I performed a change in SU24 on the default values of authorization object (2nd tab) S_ALV_LAYO for all transactions involved.
    I filtered all transactions with default value u2018Yesu2019 for this object and selected all these entries and changed them to u2018Nou2019.
    When creating new roles afterwards I noticed that no objects were pulled in in PFCG and when checking table USOBT_C I noticed that, apart from the 328 records I changed to No for S_ALV_LAYO the whole table was empty! In the development client  there are now just 328 records in this table whereas in de acceptance client there are 233,124 entries!
    Could you please find out the following:
    -          How could this happen?
    -          What can I do to restore table USOBT_C?
    I reported this bug also on OSS but maybe someone of you has had the same experience and can share the causes and solutions.
    Thank you!
    Lodewijk Borsboom

    > > To read such a huge text in the above suggested notes may become tiresome of not ofcourse worthless.
    > What is the use of posting a list of links or randon OSS note hits, when you are not sure whether they are usefull or not?
    >
    hmm.... though I am not sure and agree with the raise of OSS message for this issue, but when I read these notes after reading the query I found them to be notified to op.
    > Lodewijk can do that simple search himself. I always assume that the person asking a question has done a search before hand...
    >
    Agreed again. But not sure of his search result. May be his string missed some of these notes and can help him to check the program errors rectified in couple of Notes in 2009. But of course I confess about the uncertainty of the exact solution from my side.
    > If it is a basic requestion and easy answer with a link, then I delete it. It has no value to SDN. You are just attempting to do someone else's work for them, and that it not the case here.
    >
    > Please read the question carefully and answer specifically.
    >
    read and then posted the message. Also as I was not sure of solution to this particular error I surrendered in advance [mainly for you ]. Still I would like op to view the following notes on SAP Default value maintenance and if he has already done then that is great and I am just not helping with proper suggestion.
    [Note 1287998 - Problems when you maintain default authorization values|https://websmp230.sap-ag.de/sap%28bD1lbiZjPTAwMQ==%29/bc/bsp/spn/sapnotes/index2.htm?numm=1287998]
    [Note 1378328 - SU24: Error after deleting authorization default values|https://websmp230.sap-ag.de/sap%28bD1lbiZjPTAwMQ==%29/bc/bsp/spn/sapnotes/index2.htm?numm=1378328]
    Note 1382895 - SU24|Default value maintenance for authorization objects
    Note 1235912 - SU24|Display and maintenance of authorization default values|
    Hi Lodewijk,
    Did you check the change header for USOBT_C in CDHDR and CDPOS? Also let us updated with the reply from OSS please.
    regards,
    Dipanjan

  • Changing Global Spot with Javascript

    Hello,<br /><br />I'm trying to update a swatch (global, spot) that is linked to a path object, say, a rectangle.<br /><br />In Illustrator, if I double-click the swatch, change the CMYK values and click ok, the path object fill colour updates to the new swatch colour.<br /><br />I want to replicate this with script.<br /><br />So far I have written:<br /><br />if (app.documents.length > 0){<br />     var swatches = app.activeDocument.swatches;<br />     for(i=0;i<swatches.length;i++){<br />          var currSwatch = swatches[i];<br />          if(currSwatch.name == "Prim1"){<br />               var newColor = new CMYKColor();<br />               newColor.cyan = 35;<br />               newColor.magenta = 0;<br />               newColor.yellow = 50;<br />               newColor.black = 0;<br />               currSwatch.color = newColor;<br />          }<br />     }<br />}<br /><br />Which updates my swatch "Prim1" and changes the colour as it's supposed to.<br /><br />However.<br /><br />The link to the object is lost, and the swatch is no longer global. Basically, it updates the swatch, and not the object (that's bound to it by its original global setup).<br /><br />Am I missing a line that tells my swatch to keep its global property?

    Just in case you haven't gotten a reply<br /><br />Try<br /><br />if (app.documents.length > 0){<br />var swatches = app.activeDocument.spots;<br />for(i=0;i<swatches.length;i++){ var currSwatch = swatches[i]; if(currSwatch.name == "Prim1"){ var newColor = new CMYKColor(); newColor.cyan = 35; newColor.magenta = 0; newColor.yellow = 50; newColor.black = 0; currSwatch.color = newColor; } } }<br /><br />I would like to change the name also - Any ideas?<br /><br />Good Luck<br /><br />Nick

  • How do I change elements values with DOM?

    Hi, I'm trying to get to understand the DOM tutorials but I'm struggling with some things.. Basically I need to take an xml structure, read it and then change it to another xml structure. For instance, if I have the html sentence:
    <p id="id10">One flight was found </p>
    I would like to change it to a vxml sentence like
    <vxml:prompt vxml:id="id10" vxml:bargein="false">One flight was found.</vxml:prompt>
    And I need to do that to an entire file. I can read the html with the DOM (I'm following the http://java.sun.com/webservices/jaxp/dist/1.1/docs/tutorial/dom/index.html tutorial) and show it without troubles, but I don't know and I can't find the functions that would allow me to modify the values. By values I mean both the element tags such as converting <p>..</p> to <prompt>..</prompt> and the attributes (like the id attribute). Could anybody help me here please?

    Thanks for that, but still can't do it. I'm using Xerces as you suggested. The following chunk is not actually what I need to do but I can't manage to get it working either. Shouldn't this:
    Document doc= new DocumentImpl();
    Element item = doc.createElement("name");
    item.setNodeValue("nameChanged");
    change the <name> tag to a <nameChanged> tag? When I output it it's still <name>.
    I'm getting awfully confused with all the factories and models (yes, sorry, quite a newcomer, but I still need to do this somehow). If the following task is not too long/troublesome, could somebody please help me out with the code? Imagine you have a file with the content:
    <label id="1">Hello</label>
    and using xerces you want to create another file, without changing the first one, with the content:
    <anotherLabel id="1">Hello<anotherLabel>
    Edited by: victorNik on Sep 13, 2007 6:02 AM

Maybe you are looking for

  • Error while scheduling  in infopackage!!

    Heya all,      i need immediate help in this area.Plz help me out.I am having these problems   I created infoobjects IO_MATNO(from fufu book   example)and created 2 infopackage 1 for attr and another for text and tried loading them.Everything went we

  • Problem with Changing Data while Import through Excel Sheet

    Hi Experts, I am new to SAP LUMIRA and I am facing an issue with it. Actually, I am importing the data for analysis from an Excel sheet into SAP LUMIRA. I am able to prepare the visualization in the first go. But If I am changing the number of column

  • Ease in/Ease out is clunky for pan/zooms

    I'm using FCP 5 with 10.5.6. When panning and zooming around in a still image (photo), I just can't get an easy landing or stop at the end of the motion, no matter how I adjust the ease in/ease out speed. After choosing Ease in/ Ease out on a keyfram

  • Timed out

    Safari 3, unlike Safari 2 and other browsers, stops loading any website after about 40 to 60 seconds. Images are displayed as a question mark, text doesn't show. Activity window gives the red "timed out" for the unloaded parts. Only after reloading 2

  • Fields not visible after replication ?(hide tick removed)

    Hi experts, I have added fields from LO communication structure to extract structure and i have removed the Hide option in maintain datasource.When i am  replicating in BI those fields are not visible.What is the reason? I am eagerly waiting for repl