Javascript + Ajax + MRU

Hi,
Need help with using an SQL Query (updateable report - MRU) together with Ajax when it comes to cascading select lists.
Basically have two select lists in my MRU where the column names within the HTML code are f13 and f14 (i.e view page source)
My problem is, I am using an onChange="getSelectList(this,'f14_nnnn')" within f13 column form element but I am unsure how to obtain the html id value for column f14 and for the row I am currently on, so that I can pass this information into my onChange call here.
As an example, if I have two rows currently in my MRU, I would therefore need a means of passing both f14_0001 and f14_0002 depending on the row that I am on.
My question is, how can I obtain the html id of column f14, which I could pass into the onChange javascript call?
Is there something that will tell me which row I am on in the form or 0001 or 0002 as I need this to perform my Ajax functionality?
Thanks.
fs.

Tony,
<script type="text/javascript">
function get_select_list(this)
    var v_this_id = Substr($x(this).id, 4);
    var v_second_sel_list = 'f14_' + v_this_id;
</script>will give you the id for the current row. You just need to concatenate this id with the
second element name.
Denes Kubicek
http://deneskubicek.blogspot.com/
http://www.opal-consulting.de/training
http://htmldb.oracle.com/pls/otn/f?p=31517:1
-------------------------------------------------------------------

Similar Messages

  • Adobe AIR (JavaScript/AJAX) is dead?

    Hi all,
    I used to code in AIR for JavaScript / Ajax in v1 and v1.5 of AIR. I am trying to refresh my coding skills into this platform but there seems to be very poor knowledge base and material at the web, I am wondering whether this platform is somehow deprecated and whether only Adobe AIR (Flex) is supported.
    Can you please clarify?
    thank you,
    George

    Bump! I'd like to know, too. We have a large html/javascript app and are wanting to use it on Android or iOS, but it kinda seems like everything is Flex based now.... ???
    - Jack

  • JavaScript / Ajax Technology

    Hi,
    I am not familiar with JavaScript and Ajax technology. What is the best tutorial/web sites/books to start learning this...
    NB: the example in Carl and Vikas are a littre be complicated for me (example : show_hide...)
    Cheers

    Hello,
    This site has very good beginner tutorials on javascript , ajax and css
    http://www.w3schools.com/js/default.asp
    Carl

  • Custom JSP, Javascript (Ajax) request.url

    Hi,
    Im very new to java. Maybee Im not in the right forum :-/ could be a tomcat question.
    I create a custom jsp for teaming and trying to load some information from database.
    Using javascript(Ajax) request.url to call "get.jsp" to load from db.
    PHP Code:
      var url="companyDetails.jsp?companyId=" +tmp
                       http.open("GET", url, true);
                       http.onreadystatechange = callBack; 
    On my development machine everything right. But on teaming prod we get a 404.
    Placing the *.jsp files in the clustom_jsp folder.
    Q1: Maybee I tried wrong URL ?
    Q2: May I have to use webServices like SOA ?.
    In this case Is the Ajax call = a WebService ?
    Q4: Or I have to auth over url at server level.
    Thanks
    *T

    Originally Posted by tbrinkmann
    re...
    are there some teaming, vibe jsp, java application programmer in case of custom application programming in the forum ?
    Ore only admins and users ?
    Thanks
    *T
    Maybe you will get better answers here: Kablink Vibe
    Thomas

  • Javascript/AJAX - Show image whilst update is done and then hide it.

    I want to do an update with AJAX but I want a "waiting" image to display before the update and then hide afterwards. That way, if there is a delay in the update or a row lock, the screen doesn't just freeze, it shows a "please wait" icon.
    I am using code like this to save to the database when a field is de-selected (done for ease of testing):
    <script type="text/javascript">
    function deselect_field(f) {
      f.disabled=true;
      f.className=f.className + " saving";
      var v=new htmldb_Get(null,&APP_ID.,'APPLICATION_PROCESS=SC_TEST',0);
      v.add(f.name,f.value);
      v.get()
      f.className=f.className.replace("saving"," ");
      f.disabled=false;
    </script>The saving class sets the background. I have tested this without the un-setting and it works fine. I think the issue is the ajax call is made too quickly, ie before the screen has had chance to update.
    SO - my question is, how can I have the image (moving gif) display whilst the AJAX call is processing and then hide it at the end?!
    Rather not use JQuery if possible.
    Thanks

    Hi,
    Thanks for the link. The issue I'm having now is that the process isn't firing (it's just updating a row in a table). Also, readyState of 4 never seems to get returned. I seem to get the call for readyState of 1 and then that's it. I've modified my code:
    <script type="text/javascript">
    var z;
    function deselect_field(f) {
      z=f;    
      var v=new htmldb_Get(null,&APP_ID.,'APPLICATION_PROCESS=SC_TEST',0);
      v.add(f.name,f.value);
      v.GetAsync(f_async);
      v=null;
    function f_async() { alert(p.readyState);
      if (p.readyState==1) {
        z.disabled=true;
        z.className=z.className.replace("highlight_field"," ");
        z.className=z.className + " saving";
      else if (p.readyState==4) {
        z.className=z.className.replace("saving"," ");
        z.disabled=false;
    </script>As you can see, I have a debugging alert message in there. This only pops up the once with a value of "1".
    Any ideas?! Apart from using classes instead of displaying the HTML element, I can't see much else that is drastically different? Even so, I wouldn't have thought that would have any effect anyway?
    Thanks,

  • Calling setter on backing bean via JavaScript / AJAX using JSF2

    My application requires me to invoke a setter on a backing bean instance. I am trying to do this using the following javascript code:
    var stateListWidth = document.getElementById("myform:stateListWidth");
    stateListWidth.setAttribute("value", 100);
    jsf.ajax.request(this, event, {execute: 'stateListWidth', render: 'stateListWidth'});and added a hidden field as follows:
    <h:form id="myform">
    <h:inputHidden id="stateListWidth" value="#{cityController.stateListWidth}"/>However my setter method is never called. I can see the parameters (myform:stateListWidth = 100) are POST'd to the server side, but not translated into a setter invocation. Any ideas if this is possible and how to do this.

    I got it working. Had to specify the full ID of the element myform:stateListWidth rather then just stateListWidth.
    var stateListWidth = document.getElementById(myform:stateListWidth);
    stateListWidth.setAttribute("value", 100);
    jsf.ajax.request(this, event, {execute: 'myform:stateListWidth', render: 'myform:stateListWidth' });I still wonder if there is a better way without using a hidden field to get this working?

  • Reset report pagination using javascript / ajax ?

    Hiho,
    i have a page where i pull a ppr report from a different page using htmldb_get like described in Carls excellent examples. The first page also contains a textfield to set a where condition in the report, for examle to search a streetname..
    Now i need a way to reset the pagination of the report using javascript.
    Example:
    I search for street_name_1 and the report returns 100 rows, 10 rows on each page. Now i use the pagination links to switch throught report pages to page 5.
    Now i search for street_name_2 and the report returns 5 rows, so this would only be one page in the report. But the report pagination still is on page 5, so no results are shown. And no pagination buttons either.
    What can i do to reset the pagination before i pull the report without submitting the page?
    Thanks for help,
    DIrk

    I have similar problem with AJAX report pagination. When I click the pagination for next set of rows, it gives "undefined" error. I'm trying to call "get.clear('RP');" in the javascript function as susggested in above url, but doen't work. any examples are appreciated.
    thanks,
    Surya

  • Javascript ajax loaded in adobe air

    Hello to all,
    I come on this forum because i meet a problem with AJAX and JAVASCRIPT.
    In my main script of ADOBE air, i load with "Ajax" the javascript contents but this javascript not execute not.
    All my functions are in the < head > only the calls are in the contents
    in charge of contents loaded with and the functions are called by onclick.
    That here is my  script for the forum, but is characteristic of my problem:
    <head>
    <script type="text/javascript">
    function getRequeteHttp() {
    ////the contents was supprimed for the example////
    function sendRequete(url) {
    ////the contents was supprimed for the example////
    function receiveReponse(requeteHttp) {
    if (requeteHttp.readyState==4) {
    (requeteHttp.status==200) {
    visibleReponse(requeteHttp.responseText);
    else {
    alert("error");
    function visibleReponse(rep) {
    document.getElementById("back2").innerHTML=rep;
    function action() {
    sendRequete('tryscript.html');
    function yiu(){
    alert('rooooooo');
    </script>
    </head>
    <body style="margin:0px;padding:0px;font-family:'Trebuchet MS';background:gray;" >
    <div>
    <input type="button" value="click" onclick="action();" />
    <div id="back2">
    <!--Contents loaded with ajax-->
    <input type="button" value="click2" onclick="yiu();" />
    <!---->
    </div>
    </div>
    </body>
    </html>
    Thank you for your assistants and forgiveness for my English

    Thank you for your answer,
    I'll go to read content's  links, once this made, i'll come back to explain my new situation.
    Cordially, thank you one more time.

  • JavaScript/Ajax not working on /localhost/

    I installed PHP (5.2.4), it's running fine. On the website I'm building in Dreamweaver, the HTML, PHP, and Flash work fine, running on my computer (http://localhost/mywebsite.php). But none of the Spry elements work. Spry is Adobe's framework for Ajax, and Ajax is version of JavaScript. My guess is that JavaScript isn't enabled on my computer. The website works fine on the remote host, so I know that the files are good and Safari has JavaScript enabled. How do I make JavaScript run locally?

    I played around with it more, the problem was either that I'd moved the folder with all the Dreamweaver website files and either some files weren't moved or the paths to the files changed. Javascript is client-side so it should never have to be installed on a server.

  • How do I fix this 'funny' JavaScript/Ajax behavior?

    Hello all!
    I have this kind of funny problem, or, well, a funny result...
    The problem is almost solved tho, but it's just this strange behavior that I can't solve.
    You can see what I mean here:
    http://apex.oracle.com/pls/apex/f?p=9949:101:1370355978553401
    Username: visitor
    Password: visitor
    Login first, then edit the URL to go to page 24 (or just click on "Web Platform", then in the submenu click on "Meals and templates", and then in the custom menu on the left click on "Show templates".
    If you have done that, click on any of the two links in the report.
    You'll see that suddenly, the whole page seems to be shown inside another region (the region named "Menu2", underneath the normal menu region).
    It's like... A page within a page. Pageception (Inception... Pageception... Get it?).
    Now, all this happens WITHOUT refreshing. Yes, I want this to be dynamic. My question is:
    How do I change my code in such a way, that it does NOT display the whole page 24 inside that menu2 region? Because I want to display a popup, not a page within a page...
    My code for doing so is in my Page Attributes. In the JavaScript tab, I have the following code for the popup, and in it you will find the code to get these values in the page items as well:
    $( function(){
      $('#ModalForm').dialog(
         modal: true,
         autoOpen: false,
         width: 500,
         height: 350,
         buttons:{ Calculate: function(){calculateTotal();},
                   Close: function(){closeForm();}        
    function openForm(pFoodTemplateId, pMealTypeId)
    var getone = new htmldb_Get('shiny',&APP_ID., null, 24); // initialize get
    getone.add('P24_TEMPLATEID', pFoodTemplateId);
    getone.add('P24_MEALID', pMealTypeId);
    gReturn = getone.get();
    getone = null;
    $('#ModalForm').dialog('open');
    function closeForm()
    { $('#ModalForm').dialog('close');}
    $(document).ready(function()
        {$('a.temppop').click(function() {openForm();});
    });"Shiny" is the name of the ID of my "menu2" region.
    In case I'm not clear (which I probably am, since I'm in a rush):
    I have 2 page items that get the value of the selected row's foodtemplateid and mealtypeid. The column link URL from my report is:
    javascript: openForm(#FOODTEMPLATEID#, #MEALTYPEID#); So, in a nutshell, item :P24_TEMPLATEID gets the value of the foodtemplateid that corresponds to the row you selected, and item :P24_MEALID gets the value of the mealtypeid that corresponds to the row you selected.
    Thank you for your time. I really appreciate it.
    Apex version: 4.1.1.00.23

    Hi,
    Maybe JavaScript should be something like this
    function openForm(pFoodTemplateId, pMealTypeId){
    $("#P24_TEMPLATEID").text(pFoodTemplateId);
    $("#P24_MEALID").text(pMealTypeId);
    var getone = new htmldb_Get(null, &APP_ID., "APPLICATION_PROCESS=DUMMY", &APP_PAGE_ID.);
    getone.add("P24_TEMPLATEID", pFoodTemplateId);
    getone.add("P24_MEALID", pMealTypeId);
    gReturn = getone.get();
    getone = null;
    $("#ModalForm").dialog("open");
    }Or
    function openForm(pFoodTemplateId, pMealTypeId){
    $s("P24_TEMPLATEID", pFoodTemplateId);
    $s("P24_MEALID", pMealTypeId);
    var getone = new htmldb_Get(null,&APP_ID.,"APPLICATION_PROCESS=DUMMY",&APP_PAGE_ID.);
    getone.add("P24_TEMPLATEID", pFoodTemplateId);
    getone.add("P24_MEALID", pMealTypeId);
    gReturn = getone.get();
    getone = null;
    $("#ModalForm").dialog("open");
    }Regards,
    Jari
    My Blog: http://dbswh.webhop.net/dbswh/f?p=BLOG:HOME:0
    Twitter: http://www.twitter.com/jariolai
    Edited by: jarola on Apr 19, 2012 3:56 PM

  • Printing in Adobe AIR (JavaScript / Ajax) whereas skipping the print dialogue

    Hi,
    Can I do what the topic says? Basically I would like to check with a timer a URL and once something appears there I want it to be sent directly to my default printer.
    Is that possible? And if Yes, how?
    thank you,
    George

    Hi, I have not investigated exactly your problem as yet but this seems to be related to it:
    http://anirudhs.chaosnet.org/blog/2008.02.15.html
    For me it was printing only the upper-left corner
    but specifing a Rectangle for size for PrintJob.addPage() second argument fixed that
    please consult
    http://www.adobe.com/livedocs/flash/9.0/main/wwhelp/wwhimpl/common/html/wwhelp.htm?context =LiveDocs_Parts&file=00000334.html
    for help on Rectangle. You can use geom instead of display;
    frameworks/libs/air/AIRAliases.js contains an alias directly to geom:
    air.Rectangle = window.runtime.flash.geom.Rectangle;
    so you may use directly air.Rectangle to construct the size.
    It works on AIR 1.5 as well as AIR 2 beta
    Code snippet I have used and worked:
    function doPrintAir()
        var pjob = new window.runtime.flash.printing.PrintJob;
        if ( pjob.start() )
            var poptions = new window.runtime.flash.printing.PrintJobOptions;
            var rectangle = new air.Rectangle(0, 0, 800, 800);
            poptions.printAsBitmap = true;
            /* poptions.pixelsPerInch = 300; */
            try
                pjob.addPage(window.htmlLoader, rectangle, poptions);
                pjob.send();
            catch (err)
                alert("exception: " + err);
        else
            alert("PrintJob couldn't start");
    //comment the line below if you do not want to mess with existing
    //window.print
    window.print = doPrintAir;
    this make js window.print() available for use as one would normay do.
    Let me know if this helps and fixes your problem.
    Best regards,
    Daniel Baragan - Adobe AIR Engineer

  • Set value of a display only item using javascript

    I was trying to find an answer in the forum but my searches gave me no results. How do
    I set a value of a display only item using javascript (ajax)?
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://htmldb.oracle.com/pls/otn/f?p=31517:1
    -------------------------------------------------------------------

    Vikas,
    Thanks for a fast responding. The type is Saves State. However, I tried to set the value
    of a display only item using:
    <script>
      function f_setDisplayOnly ()
        {$x('P80_X').parentNode.childNodes[4].nodeValue = 1;
    </script>without a result (or error). What am I doing wrong?
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://htmldb.oracle.com/pls/otn/f?p=31517:1
    -------------------------------------------------------------------

  • Integration of javascript libraries with Acrobat Document Level Javascript

    I have a requirement to build a custom SOAP message and process a PDF document as a SOAP attachment sent to a specific endpoint.
    Document level javascript presents a tool that when coupled with a third party javascript library could be used to capture the PDF document and send it as a custom SOAP message built entirely with Javascript.
    Does document level javascript allow for integration with third party libraries like Dojo or the like?
    Any examples available of document level javascript including known third party javascript/ajax libraries?

    Ajax and other JS libraries can't really be used in Acrobat. You can load them, of course, but they're built for JS that runs in web-browsers and will not be of much use in a PDF.

  • Database Ajax Requests

    Hi All,
    This is probably answered elsewhere in the forums but I'm having a difficult time finding it or knowing what to search for. Does Business Catalyst allow for me to access data in a database using javascript AJAX calls?
    I don't suppose it's possible to host a third party database in BC like MySQL or CouchDB, is there?
    Thanks!

    You can pull the data via a standard GET request but because BC outputs HTML embed in javascript rather than JSON or JSONP hosting anything external you run into cross site browser sandboxes and it wont work.
    I don't recommend this because you are re-inventing the wheel but if you wanted to call BC remotely and pull in content you would have to do it on an externally hosted solution server side and setup your BC (hosted) templates to only output the data you requested (rather than a full HTML page).
    You could also use the API, but it is not build for real time events and it is slow and cumbersome, more build for syncing and queries that don't require a quick reply.

  • Adobe air distribution problem. (AJax / html)

    Hi guys,
    I have written a sample application in javascript (ajax) and xhtml and successfully published with adobe air. The system works fine but my question is when i distribute the application (.air) I had to include all my javascript , images, xhtml. I dont have any problem in sending the images with .air package but sending javascript files is imposible that is be because, since im using ajax to show all the details I have to use full URL for all my ajax calls.
    so someone who knows about abobe air can use those same URL`s and create their own air application and steal my details from my server. (adobe air allow cross scripting)
    As a solution I have seen many applications (ex: ebay desktop) uses flash logins and check the login using flash and redirect user to a seperate page if the login is successful. so in this case i only need to package my .swf file since redirection will handdle from the flash end.
    Im not a flash developer so I wont be able to create the whole application using flash. thats why im looking for a javascript / html solution to overcome this problem.
    so my questions are,
    1. Is there any way i can publish my .air application without packaging js files?
    2. Is there is a posibility which i can use a flash login and if the login success open up a new window with the actual application and close the login window? and while logging off viseversa
    I hope you guys undestand my questions and any help highly appreciate it.
    Thanks in advanced,
    Best regards,
    niroshan

    There isn't any way to distribute an HTML/JS AIR application without the HTML/JavaScript source files. Because JavaScript is a run-time interpreted language, the HTML and JavaScript code has to be available at run time. The obvious downside to this is that the source code of your application is available in plain text on the users' hard drive.
    If your main concern is protecting data stored on the server from malicious users, the username/password strategy is probably a good one (and you wouldn't need to implement in using Flash at all -- you could do the same thing in HTML/JS.). What you need to do is:
    Set up your web server so that the user has to be authenticated with the web server in order to get any data or perform any of the calls (from ajax or anywhere else).
    When your app first starts or at some point, have a login form where the user enters their username/password for your serve. When you make the ajax calls to the server pass the username/password along (or use a session cookie, or some other similar technique for maintaining authentication).
    That way, even if an attacker knows the url of your server calls, they can't actually use them unless they have an account with you.
    From a practical standpoint, you should protect your server by requiring authentication in any case. Otherwise your only security defense is the fact that an attacker doesn't know your exact url. But there are ways to learn urls (for example, by monitoring network traffic) that make it so it isn't too hard for someone to discover the urls even without your app's source code.

Maybe you are looking for

  • 10.4.6 has slowed to a crawl - any suggestions

    My dual 2ghz G5 has been working perfectly happily with 10.4.6. I have 2.5 gig of Ram installed and have had no real problems. However today it has slowed down to a crawl. It takes at least 15 to 30 seconds to switch from one application to another a

  • PO Print out(Urgent)

    Dear Experts,Good Morning! I have got couple of enquiries...please help me.. 1.When we print a PO,it will give one print out.But user need two copies of PO at same time.One copy for Supplier and One copy for Purchasing...what settings i must do... Su

  • Dataguard broker setup - Licensing terms

    Hi, This is a simple question. I have searched Oracle documentation fairly elaborately, but could not find an answer. The question is: Can I co-host Dataguard Broker configuration with RMAN Catalog+EMGC ? We already have one host (Running EE) caterin

  • How to correct incorrect entry date?

    Hi, The scenario is as follows:- Employees are hired from 01.01.2000 Payroll has run till last month(28.02.2007) Now, few employees hire date has to be back-dated (01.01.1998) The following should not happen in the event of the date getting changed.

  • Internet Explorer issues after installing Update KB2955163 on Windows 8

    Dear, Since we've installed Windows update KB2955163 on Windows 8, we've been experiencing the following issues: - After using Internet Explorer for a long while (one hour or longer), some websites won't work properly anymore. For example: list boxes