AJAX in UCM

Is there built in AJAX framework in UCM with Site Studio?
I need to go to the server when user clicks button, run query on DB (as function of user input) and display the formatted results without refreshing the page.
Thanks.

Yes, in fact there is a built in library to do things exaclty like what you're talking about.
You need to look in the <weblayout>/resources/sitestudio/ssajax directory and examine the javascript files.
It isn't really documented, so finding out exactly how to go about using it will be a process of exploration.
The library supports calling Content Server services as well as parsing and using the response from Content Server. Additionally it has a whole set of functionality for DHTML to do things like take that resulting data and place it in a DIV on your page, etc.
-Jason Stortz
http://www.corecontentonly.com
http://www.redstonecontentsolutions.com

Similar Messages

  • HOW TO: do external db lookups with AJAX on UCM checkin pages

    Several folks have been asking how to use ajax in UCM and how to do external data source lookups.
    So we posted the step by step for you on our C4 blog:
    http://bit.ly/bgOfm2
    The post is full of code-goodness and addresses
    * Custom Components
    * Custom Services
    * Database Providers
    * Custom Query Resources
    * Custom Java Service Handlers
    * MergeInclude
    * Resource Includes
    it assumes you are familiar with:
    * basic UCM component architecture
    * creating components using the Component Wizard
    * creating a database provider in the UCM interface
    * how to create a custom class and include it in a component.
    * how to take sample code and make it your own
    If you are not familiar with those things or if you want supported components that work on 10 and 11g then reach out to us directly and we will help
    Warmly,
    Billy Cripe
    Fishbowl Solutions

    Several folks have been asking how to use ajax in UCM and how to do external data source lookups.
    So we posted the step by step for you on our C4 blog:
    http://bit.ly/bgOfm2
    The post is full of code-goodness and addresses
    * Custom Components
    * Custom Services
    * Database Providers
    * Custom Query Resources
    * Custom Java Service Handlers
    * MergeInclude
    * Resource Includes
    it assumes you are familiar with:
    * basic UCM component architecture
    * creating components using the Component Wizard
    * creating a database provider in the UCM interface
    * how to create a custom class and include it in a component.
    * how to take sample code and make it your own
    If you are not familiar with those things or if you want supported components that work on 10 and 11g then reach out to us directly and we will help
    Warmly,
    Billy Cripe
    Fishbowl Solutions

  • UCM integration sharepoint search webparts ajax error

    Context
    I am looking at an error with the Search page in the SharePoint web part integration with Oracle UCM.
    There are two web servers in the SharePoint web farm handing incoming requests.
    The search page has the Search Query and Search Results web parts on it.
    Problem
    When opening the Search page it contacts the Oracle server to populate the menu items: saved queries etc.
    Sometimes this causes an error...
    AJAX error:
    Status: 400
    Status Text: Bad Request
    Message:
    StellentWebRequestHandlers.SearchMgr error: The WSS cache file 'C:Program Files
    (x86)\Oracle\WSS\WebSupportServerCache\WSS<random characters>\SessionSearches_Name_
    Content_Cache.xml' could not be loaded. Requested as RequestResource.
    This appears in a dialog box over the browser presumably thrown by client AJAX code.
    The folder exists only on one of the two servers. The file is missing from that folder.
    Question
    I am looking for any information on the way the cache works. E.g.:
    - How it should be configured in a load-balanced web farm environment?
    - What permissions are required?
    Thanks for any advice and sources of information.
    Peter

    Can the images selected in wysiwyg editor come from external sources like sharepoint system?Yes and no. If you want to use UCM's features (like selecting the correct rendition, using UCM 's security model, etc.) you will have to check in the item to UCM. However, you can also use just a link to an external resource (with no guarantee that it will be available, though). I'm not sure how much this approach integrates with wysiwyg.
    Can the WCM content be pushed to sharepoint server on publish? Can webparts be used for this? What is the format of content that will be sent to sharepoint. I mean, can sharepoint understyand and create the imported content in it's system? Please help.In general, you can publish content from UCM almost anywhere - for instance, you can publish documents to create a static website, which is not run by UCM at all. However, you will most likely want to have not only the content itself, but also metadata.
    The cardinal question is: why do you want to have two repositories? If MSSO is a must, you could use it as front-end only and UCM would be back-end storing all the documents. This would resolve both problems in one go. And moreover, this is actually quite a common scenario, so there is an experience to support your implementation.

  • Blogs in UCM

    Hi,
    I am working on a website which is being developed on UCM.
    I want implement blogs in my site that will include Blogs, Blog Comments, Search in Blogs functionality ....
    In UCM, it is not difficult to create Blogs ....
    My Problem is that My site will not be served from UCM. My site will be published using SSPU...
    SSPU will publish the whole site as static ....
    And my published site environment cannot access UCM environment .... :(
    Experts , Please me in finding out the solution for this problem ... Please suggest me how should i implement Blogs in my site...
    Thanks ....

    Which part is throwing you exactly?
    You will still have a contribution server where your authors will contribute blog posts. Those pages should publish out statically just fine. You'll have fragments on the page like number of posts in the last month, etc., but as you add new posts SSPU will update the pages that have that snippet.
    Things like search for users becomes a bigger issue, but you can handle that by using AJAX with your search box to reach back to content server, perform the search and then display results that you forge in your JavaScript. I suggest jQuery as the framework of choice for this, but there are tons of great alternatives to that.
    Security MIGHT be a concern. Are any of your blog posts secured away?
    Hmm, comments might be fun. Similar to other sites when people submit a comment it might not show up right away. You could do comments with the treaded discussion component and alittle integration with site studio...but you'd have to wait for the publishing for the comments to show up.

  • Integrate external domain data (Flickr, etc) into UCM pages

    We have many Site Studio sites built in UCM deploying via SSPU to remote web servers. We seem to always run up against the challenge of getting external data (e.g. Flickr) into our Site Studio templates written in IdocScript because of cross-domain issues with AJAX.
    Has anyone come up with a solution for this? Would the best approach be to write a Java component to extend IdocScript or create a new Content Server service?
    Thanks,
    -Jason

    This question is resolved. We ended up activating purchasing module and used purchasing documents PR/ PO to integrate with third party purchasing system.
    Anand.

  • Firefox 6.0.2 keeps on crashing, problems with ajax calls

    Hi,
    I am using the jquery form plugin to make ajax calls on my sites, when i invoke the plugin and have Firebug open I get this message:
    Could not convert JavaScript argument arg 0 [nsISupports.QueryInterface]
    [Break On This Error] callback.data = aElem....getComputedStyle(callback.data, '');
    rfhelper32.js
    Firebug also tells me that it's limit has been reached 1571 entries shown.
    Can someone tell me why this is happening; is there a problem with Firefox that will be fixed. It's not happening in IE9
    Here is the information from a recent crash report (which may or not be related to the above problem!)
    AdapterDeviceID: 0a66
    AdapterVendorID: 10de
    Add-ons: [email protected]:3.0.4,{6AC85730-7D0F-4de0-B3FA-21142DD85326}:2.5.5,{8f8fe09b-0bd3-4470-bc1b-8cad42b8203a}:0.17,{e968fc70-8f95-4ab9-9e79-304de2a71ee1}:0.7.3,{f36c6cd1-da73-491d-b290-8fc9115bfa55}:2.2.0,{BBDA0591-3099-440a-AA10-41764D9DB4DB}:3.1,[email protected]:1.8.2,{2D3F3651-74B9-4795-BDEC-6DA2F431CB62}:2011.7.1.3,{972ce4c6-7e08-4474-a285-3208198ce6fd}:6.0.2
    AvailableVirtualMemory: 174600192
    BuildID: 20110902133214
    CrashTime: 1316093326
    EMCheckCompatibility: true
    Email: [email protected]
    FramePoisonBase: 00000000f0de0000
    FramePoisonSize: 65536
    InstallTime: 1315406279
    Notes: AdapterVendorID: 10de, AdapterDeviceID: 0a66, AdapterDriverVersion: 8.16.11.9104
    D3D10 Layers? D3D10 Layers-
    D3D9 Layers? D3D9 Layers-
    WebGL? WebGL-
    ProductName: Firefox
    ReleaseChannel: release
    SecondsSinceLastCrash: 160793
    StartupTime: 1316067225
    SystemMemoryUsePercentage: 86
    Theme: classic/1.0
    Throttleable: 1
    TotalVirtualMemory: 2147352576
    URL: https://s-static.ak.fbcdn.net/connect/xd_proxy.php?version=3#cb=f1ae6be54ac01b4&origin=https%3A%2F%2Fwww.paypal-business.co.uk%2Ffd558408b2cb6c&relation=parent.parent&transport=postmessage&type=resize&height=20&ackData[id]=1&width=250
    Vendor: Mozilla
    Version: 6.0.2
    Winsock_LSP: MSAFD Tcpip [TCP/IP] : 2 : 1 :
    MSAFD Tcpip [UDP/IP] : 2 : 2 : %SystemRoot%\system32\mswsock.dll
    MSAFD Tcpip [RAW/IP] : 2 : 3 :
    MSAFD Tcpip [TCP/IPv6] : 2 : 1 : %SystemRoot%\system32\mswsock.dll
    MSAFD Tcpip [UDP/IPv6] : 2 : 2 :
    MSAFD Tcpip [RAW/IPv6] : 2 : 3 : %SystemRoot%\system32\mswsock.dll
    RSVP TCPv6 Service Provider : 2 : 1 :
    RSVP TCP Service Provider : 2 : 1 : %SystemRoot%\system32\mswsock.dll
    RSVP UDPv6 Service Provider : 2 : 2 :
    RSVP UDP Service Provider : 2 : 2 : %SystemRoot%\system32\mswsock.dll
    MSAFD NetBIOS [\Device\NetBT_Tcpip_{91C733AA-510D-41D3-B67A-4441103BAE50}] SEQPACKET 1 : 2 : 5 :
    MSAFD NetBIOS [\Device\NetBT_Tcpip_{91C733AA-510D-41D3-B67A-4441103BAE50}] DATAGRAM 1 : 2 : 2 : %SystemRoot%\system32\mswsock.dll
    MSAFD NetBIOS [\Device\NetBT_Tcpip_{4A8E4D1C-24D8-40C3-BC41-D04B5D505F39}] SEQPACKET 5 : 2 : 5 :
    MSAFD NetBIOS [\Device\NetBT_Tcpip_{4A8E4D1C-24D8-40C3-BC41-D04B5D505F39}] DATAGRAM 5 : 2 : 2 : %SystemRoot%\system32\mswsock.dll
    MSAFD NetBIOS [\Device\NetBT_Tcpip_{C8F77A1D-B3A2-4DE2-AE72-C377BBD10D9A}] SEQPACKET 7 : 2 : 5 :
    MSAFD NetBIOS [\Device\NetBT_Tcpip_{C8F77A1D-B3A2-4DE2-AE72-C377BBD10D9A}] DATAGRAM 7 : 2 : 2 : %SystemRoot%\system32\mswsock.dll
    MSAFD NetBIOS [\Device\NetBT_Tcpip6_{C8F77A1D-B3A2-4DE2-AE72-C377BBD10D9A}] SEQPACKET 8 : 2 : 5 :
    MSAFD NetBIOS [\Device\NetBT_Tcpip6_{C8F77A1D-B3A2-4DE2-AE72-C377BBD10D9A}] DATAGRAM 8 : 2 : 2 : %SystemRoot%\system32\mswsock.dll
    MSAFD NetBIOS [\Device\NetBT_Tcpip6_{4A8E4D1C-24D8-40C3-BC41-D04B5D505F39}] SEQPACKET 6 : 2 : 5 :
    MSAFD NetBIOS [\Device\NetBT_Tcpip6_{4A8E4D1C-24D8-40C3-BC41-D04B5D505F39}] DATAGRAM 6 : 2 : 2 : %SystemRoot%\system32\mswsock.dll
    MSAFD NetBIOS [\Device\NetBT_Tcpip6_{3D95D40E-1835-44C6-A621-968094D90452}] SEQPACKET 10 : 2 : 5 :
    MSAFD NetBIOS [\Device\NetBT_Tcpip6_{3D95D40E-1835-44C6-A621-968094D90452}] DATAGRAM 10 : 2 : 2 : %SystemRoot%\system32\mswsock.dll
    MSAFD NetBIOS [\Device\NetBT_Tcpip6_{D6AD3B6C-2F8E-49B4-BDCD-DB35518116E7}] SEQPACKET 9 : 2 : 5 :
    MSAFD NetBIOS [\Device\NetBT_Tcpip6_{D6AD3B6C-2F8E-49B4-BDCD-DB35518116E7}] DATAGRAM 9 : 2 : 2 : %SystemRoot%\system32\mswsock.dll
    MSAFD NetBIOS [\Device\NetBT_Tcpip6_{18908ACF-76C1-4139-8C1C-89DF049156C5}] SEQPACKET 4 : 2 : 5 :
    MSAFD NetBIOS [\Device\NetBT_Tcpip6_{18908ACF-76C1-4139-8C1C-89DF049156C5}] DATAGRAM 4 : 2 : 2 : %SystemRoot%\system32\mswsock.dll
    MSAFD NetBIOS [\Device\NetBT_Tcpip6_{4112C824-372C-4014-87AE-1BC13EA6E4CD}] SEQPACKET 3 : 2 : 5 :
    MSAFD NetBIOS [\Device\NetBT_Tcpip6_{4112C824-372C-4014-87AE-1BC13EA6E4CD}] DATAGRAM 3 : 2 : 2 : %SystemRoot%\system32\mswsock.dll
    MSAFD NetBIOS [\Device\NetBT_Tcpip6_{2E408326-9611-4C41-B766-C4CB82734986}] SEQPACKET 0 : 2 : 5 :
    MSAFD NetBIOS [\Device\NetBT_Tcpip6_{2E408326-9611-4C41-B766-C4CB82734986}] DATAGRAM 0 : 2 : 2 : %SystemRoot%\system32\mswsock.dll
    MSAFD NetBIOS [\Device\NetBT_Tcpip6_{91C733AA-510D-41D3-B67A-4441103BAE50}] SEQPACKET 2 : 2 : 5 :
    MSAFD NetBIOS [\Device\NetBT_Tcpip6_{91C733AA-510D-41D3-B67A-4441103BAE50}] DATAGRAM 2 : 2 : 2 : %SystemRoot%\system32\mswsock.dll
    VMCI sockets DGRAM : 0 : 2 :
    VMCI sockets STREAM : 0 : 1 : C:\Program Files\VMware\VMware Workstation\vsocklib.dll
    This report also contains technical information about the state of the application when it crashed.

    Try the Firefox SafeMode to see how it works there. <br />
    ''A troubleshooting mode, which disables most Add-ons.'' <br />
    ''(If you're not using it, switch to the Default Theme.)''
    * You can open the Firefox 4/5/6/7 SafeMode by holding the '''Shft''' key when you use the Firefox desktop or Start menu shortcut.
    * Or use the Help menu item, click on '''Restart with Add-ons Disabled...''' while Firefox is running. <br />
    ''Don't select anything right now, just use "Continue in SafeMode."''
    ''To exit the Firefox Safe Mode, just close Firefox and wait a few seconds before using the Firefox shortcut (without the Shft key) to open it again.''
    If it is good in the Firefox SafeMode, your problem is probably caused by an extension, and you need to figure out which one. <br />
    http://support.mozilla.com/en-US/kb/troubleshooting+extensions+and+themes

  • How Can I call a UCM service from SOAP request

    Hi,
    I have created one custom service and I would like to call that service from 3rd Party system via SOAP call. The 3rd Party system does not have the capability to call through RIDC.
    Now I have exposed my service and tried to call but authentication exception was coming status code 401.
    So I created one sample ADF application and tried to call the DocInfo service for testing (I thought let's try DocInfo then I will check my custom service). I downloaded the DocInfo service from UCM and  uploaded the WSDL into the project and got the client DocInfoSoapClient.java file.
    public class DocInfoSoapClient
      @WebServiceRef
      private static DocInfo docInfo;
      public static void main(String [] args)
        docInfo = new DocInfo();
        DocInfoSoap docInfoSoap = docInfo.getDocInfoSoap();
        DocInfoByNameResult res = docInfoSoap.docInfoByName("TEST_001603", null);
        System.out.println(res.getContentInfo());
        // Add your code to call the desired methods.
    The error is coming like:
    Exception in thread "main" com.sun.xml.ws.client.ClientTransportAccessException: The server sent HTTP status code 401: Unauthorized: http://xxxxxxxx:16200/_dav/cs/idcplg
      at com.sun.xml.ws.transport.http.client.HttpTransportPipe.getClientTransportException(HttpTransportPipe.java:340)
    I tried a lot but same error. There should be some process by which I can send the userid and password but failed. Even I tried to send the properties as key value pair in IdcPropertyList but I know that is wrong.
    I checked the Issue: https://community.oracle.com/thread/2424460
    But there was no answer.
    Can anyone help on it?
    Regards,
    Santanu

    Hi Santanu,
    You need to write SoapHandler in order to pass username and pwd. You will need 2 classes namely HeaderHandlerResolver & SoapHandler. This is how i do in in my JAX-WS clients. I generate stubs and then attach handler to webserviceinterface
    PFA HeaderHandlerResolver.java and SoapHandler.java you would attach soap handler something like this in your code i have never done this via ADF so not sure.
    HeaderHandlerResolver soapHandlerResolver = new HeaderHandlerResolver();
    docInfo.setHandlerResolver(soapHandlerResolver);
    In SoapHandler class you will mention username and pwd like this
    soapMessageContext.put(BindingProvider.USERNAME_PROPERTY,"username");
    soapMessageContext.put(BindingProvider.PASSWORD_PROPERTY,"pwd");
    Regards,
    Amol Gavali

  • Error while importing N Accounts to 1 Address with UCM Batch Manager

    Hi,
    I got a problem with importing Accounts using the UCM Batch Manager. Previous steps were loading the EIM Tables EIM_UCM_ORG and EIM_UCM_ADRPER. To associate addresses I used the column EIM_UCM_ADRPER.PAR_UCM_ACCNT_UID. No errors occured during an Enterprise Integration Mgr jobs to load the data into SDH tables.
    The error described below occurs if I have N Accounts using one Address. Example:
    h5. Account Name --> City --> Postal Code --> State --> Street
    Account #1 --- Munich --- 80331 --- N/A --- Some Street 1
    Account #2 --- Munich --- 80331 --- N/A --- Some Street 1
    h5. If I try to get the Accounts into the Base tables using the UCM Batch Manager I get the following message from the log file:
    ObjMgrBusCompLog     Error     1     000003084c571160:0     2010-08-03 19:11:14     (odbccon.cpp (2097)) SBL-DBC-00111: An error has occurred writing to a record.
    Please continue or ask your systems administrator to check your application configuration if the problem persists.
    DBCLog     DBCLogError     1     000003084c571160:0     2010-08-03 19:11:14     SQLError: [23000],[Microsoft][SQL Native Client][SQL Server]Cannot insert duplicate key row in object 'dbo.S_ADDR_PER'-Objekt with unique index 'S_ADDR_PER_U1'.
    DBCLog     DBCLogError     1     000003084c571160:0     2010-08-03 19:11:14     SQLError: [01000],[Microsoft][SQL Native Client][SQL Server]The statement has been terminated.
    ObjMgrBusCompLog     Error     1     000003084c571160:0     2010-08-03 19:11:14     (sqlobj.cpp (43735)) SBL-DAT-00381: A record that contains identical values to the record you have created already exists.
    If you would like to enter a new record, please ensure that the field values are unique.
    ObjMgrLog     Error     1     000003084c571160:0     2010-08-03 19:11:14     (adptutils.cpp (5715)) SBL-EAI-04381: For instance of Integration Component 'Account_Business Address', using user key '[City] = "Munich" AND [Postal Code] = "80331" AND [State] = "N/A" AND [Street Address] = "Some Street 1"', a record with identical values already exists in the Siebel database.
    Please ensure that the field values in the input message are unique.
    EAISiebAdpt     EAISiebAdptErr     1     000003084c571160:0     2010-08-03 19:11:15     [0] For instance of Integration Component 'Account_Business Address', using user key '[City] = "Munich" AND [Postal Code] = "80331" AND [State] = "N/A" AND [Street Address] = "Some Street 1"', a record with identical values already exists in the Siebel database.
    Please ensure that the field values in the input message are unique.(SBL-EAI-04381) (0x75017d)
    h5. Result:
    Account #1 gets inserted with Record Type: "Source-Insert"
    Account #2 will not be imported and gets Record Type: "Incomplete"
    Does anyone know how to handle this problem?
    Many Thanks
    Sebastian
    Edited by: user13098670 on 04.08.2010 06:34

    I have selected the option
    Add new metadata and replace existing objetcs. But it is not importing. Also I tried other options like
    1. deleting the existing mapping and tried.
    2. Putting the mapping in recycle bin and try.
    3. Take it from recycle bin.Even during taking it from recycle it is giving me the following error .
    Error occurred importing mapping
    <DWH_CMMDTY_INVC_FACT_MAP/DWH_CMMDTY_INVC_FACT_MAP>
    (at line 141).
    Detailed Error Message:
    API2014: Internal Error: Error in createStage:
    In above all cases it is giving me the error.
    Could you please help?

  • Error message when trying to sign in to HP ePrint "ajax submit failed: error = 403, forbidden"

    HP Photosmart 7525
    Windows 7
    Ajax submit failed: error = 403, Forbidden
    Installed new printer: Photosmart 7525
    I am trying to set up my ePrint account and add my printer and it won't let me sign in or create a new account.
    Thanks for your help!
    Deb
    This question was solved.
    View Solution.

    One can also restart the computer.After it shuts down leave it off for at least a minute and then reattempt access the site once computer is back on and running. I would also check to make sure that Java is up to date and that Adobe Flash is up to date. 
    I am a former employee of HP...
    How do I give Kudos?| How do I mark a post as Solved?

  • UCM workflow: Unable to capture the reject event.

    Hi guys,
    We are using UCM 11.1.1.5
    We want to customize our workflow with 3 stages. If a particular user rejects the workflow, we want to display a error message and abort the reject action.
    hence we wrote under the Entry event of the previous stage as follows
    <$if wfAction like "REJECT"$>
    <$abortToErrorPage("Sorry you cannot reject this stage.")$>
    <$endif$>
    But we found that the script was not triggered when a user clicks on Reject button. Is there anyway we can capture the Reject Action?
    Is it a bug in UCM 11.1.1.5? Anybody faced similar problem.
    Please help us
    THanks & Regards
    Jacob

    hi,
    Unfortunately I don't have the solution as I also am facing the same issue. You can also follow my thread here at the forum. Search for "workflow issue using wfAction" here at the forum.
    Have you tried to run the test under the Test tab and what results do you get?
    cheers,
    Ibrahim

  • How do i change the path of data ajax false from returning to homepage, when using a PHP mail form in jquery mobile?

    I have a put a php mail form in the quote page of my mobile site. However when i send the form it returns to the route page rather than the quote page, i have used the data ajax false action as i dont want to send via ajax. i have left the thanks page blank as i want it to remain on the same page showing sent or declined message.  Can someone help please? 
    <?php
    // OPTIONS - PLEASE CONFIGURE THESE BEFORE USE!
    $yourEmail = "[email protected]"; // the email address you wish to receive these mails through
    $yourWebsite = "www.firstcalltransport.co.uk"; // the name of your website
    $thanksPage = ''; // URL to 'thanks for sending mail' page; leave empty to keep message on the same page
    $maxPoints = 4; // max points a person can hit before it refuses to submit - recommend 4
    $requiredFields = "name,email,collection,delivery,comments"; // names of the fields you'd like to be required as a minimum, separate each field with a comma
    // DO NOT EDIT BELOW HERE
    $error_msg = array();
    $result = null;
    $requiredFields = explode(",", $requiredFields);
    function clean($data) {
      $data = trim(stripslashes(strip_tags($data)));
      return $data;
    function isBot() {
      $bots = array("Indy", "Blaiz", "Java", "libwww-perl", "Python", "OutfoxBot", "User-Agent", "PycURL", "AlphaServer", "T8Abot", "Syntryx", "WinHttp", "WebBandit", "nicebot", "Teoma", "alexa", "froogle", "inktomi", "looksmart", "URL_Spider_SQL", "Firefly", "NationalDirectory", "Ask Jeeves", "TECNOSEEK", "InfoSeek", "WebFindBot", "girafabot", "crawler", "www.galaxy.com", "Googlebot", "Scooter", "Slurp", "appie", "FAST", "WebBug", "Spade", "ZyBorg", "rabaz");
      foreach ($bots as $bot)
      if (stripos($_SERVER['HTTP_USER_AGENT'], $bot) !== false)
      return true;
      if (empty($_SERVER['HTTP_USER_AGENT']) || $_SERVER['HTTP_USER_AGENT'] == " ")
      return true;
      return false;
    if ($_SERVER['REQUEST_METHOD'] == "POST") {
      if (isBot() !== false)
      $error_msg[] = "No bots please! UA reported as: ".$_SERVER['HTTP_USER_AGENT'];
      // lets check a few things - not enough to trigger an error on their own, but worth assigning a spam score..
      // score quickly adds up therefore allowing genuine users with 'accidental' score through but cutting out real spam
      $points = (int)0;
      foreach ($badwords as $word)
      if (
      strpos(strtolower($_POST['comments']), $word) !== false ||
      strpos(strtolower($_POST['name']), $word) !== false
      $points += 2;
      if (strpos($_POST['comments'], "http://") !== false || strpos($_POST['comments'], "www.") !== false)
      $points += 2;
      if (isset($_POST['nojs']))
      $points += 1;
      if (preg_match("/(<.*>)/i", $_POST['comments']))
      $points += 2;
      if (strlen($_POST['name']) < 3)
      $points += 1;
      if (strlen($_POST['comments']) < 15 || strlen($_POST['comments'] > 1500))
      $points += 2;
      if (preg_match("/[bcdfghjklmnpqrstvwxyz]{7,}/i", $_POST['comments']))
      $points += 1;
      // end score assignments
      foreach($requiredFields as $field) {
      trim($_POST[$field]);
      if (!isset($_POST[$field]) || empty($_POST[$field]) && array_pop($error_msg) != "Please fill in all the required fields and submit again.\r\n")
      $error_msg[] = "Please fill in all the required fields and submit again.";
      if (!empty($_POST['name']) && !preg_match("/^[a-zA-Z-'\s]*$/", stripslashes($_POST['name'])))
      $error_msg[] = "The name field must not contain special characters.\r\n";
      if (!empty($_POST['email']) && !preg_match('/^([a-z0-9])(([-a-z0-9._])*([a-z0-9]))*\@([a-z0-9])(([a-z0-9-])*([a-z0-9]))+ ' . '(\.([a-z0-9])([-a-z0-9_-])?([a-z0-9])+)+$/i', strtolower($_POST['email'])))
      $error_msg[] = "That is not a valid e-mail address.\r\n";
      if (!empty($_POST['url']) && !preg_match('/^(http|https):\/\/(([A-Z0-9][A-Z0-9_-]*)(\.[A-Z0-9][A-Z0-9_-]*)+)(:(\d+))?\ /?/i', $_POST['url']))
      $error_msg[] = "Invalid website url.\r\n";
      if ($error_msg == NULL && $points <= $maxPoints) {
      $subject = "Automatic Form Email";
      $message = "You received this e-mail message through your website: \n\n";
      foreach ($_POST as $key => $val) {
      if (is_array($val)) {
      foreach ($val as $subval) {
      $message .= ucwords($key) . ": " . clean($subval) . "\r\n";
      } else {
      $message .= ucwords($key) . ": " . clean($val) . "\r\n";
      $message .= "\r\n";
      $message .= 'IP: '.$_SERVER['REMOTE_ADDR']."\r\n";
      $message .= 'Browser: '.$_SERVER['HTTP_USER_AGENT']."\r\n";
      $message .= 'Points: '.$points;
      if (strstr($_SERVER['SERVER_SOFTWARE'], "Win")) {
      $headers   = "From: $yourEmail\r\n";
      } else {
      $headers   = "From: $yourWebsite <$yourEmail>\r\n";
      $headers  .= "Reply-To: {$_POST['email']}\r\n";
      if (mail($yourEmail,$subject,$message,$headers)) {
      if (!empty($thanksPage)) {
      header("Location: $thanksPage");
      exit;
      } else {
      $result = 'Your mail was successfully sent.';
      $disable = true;
      } else {
      $error_msg[] = 'Your mail could not be sent this time. ['.$points.']';
      } else {
      if (empty($error_msg))
      $error_msg[] = 'Your mail looks too much like spam, and could not be sent this time. ['.$points.']';
    function get_data($var) {
      if (isset($_POST[$var]))
      echo htmlspecialchars($_POST[$var]);
    ?>
    <!DOCTYPE HTML>
    <html>
    <head>
    <meta charset="utf-8">
    <title>Untitled Document</title>
    <link href="CSS/stylesheetnew.css" rel="stylesheet" type="text/css">
    <link href="../jquery-mobile/jquery.mobile-1.0a3.min.css" rel="stylesheet" type="text/css">
    <script src="../jquery-mobile/jquery-1.5.min.js" type="text/javascript"></script>
    <script src="../jquery-mobile/jquery.mobile-1.0a3.min.js" type="text/javascript"></script>
    <style type="text/css">
      p.error, p.success {
      font-weight: bold;
      padding: 10px;
      border: 1px solid;
      p.error {
      background: #ffc0c0;
      color: #F00;
      p.success {
      background: #b3ff69;
      color: #4fa000;
    </style>
    </head>
    <body>
    <div data-role="page" id="home">
      <div data-role="header" data-position="fixed">
       <h1>FIRSTCALL TRANSPORT</h1>
    </div>
        <div data-role="navbar" data-position="fixed">
                                    <ul>
                                      <li><a href="#about">About</a></li>
                                      <li><a href="#services">Services</a></li>
                                      <li><a href="#contact">Contact</a></li>
                                      <li><a href="#quote">Quote</a></li>
                                    </ul>
      </div>
      <div data-role="content"> </div>
         <div data-role="footer" data-position="fixed" > </div>
    </div>
    </div>
    <div data-role="page" id="quote">
      <div data-role="header" data-position="fixed">
        <h1>GET A QUOTE</h1>
      </div>
      <div data-role="content">
       <?php
    if (!empty($error_msg)) {
      echo '<p class="error">ERROR: '. implode("<br />", $error_msg) . "</p>";
    if ($result != NULL) {
      echo '<p class="success">'. $result . "</p>";
    ?>
    <form action="<?php echo basename(__FILE__); ?>" method="post" data-ajax="false"  >
    <noscript>
      <p><input type="hidden" name="nojs" id="nojs" /></p>
    </noscript>
    <p>
      <label for="name">Name: *</label>
      <input type="text" name="name" id="name" value="<?php get_data("name"); ?>" /><br />
      <label for="email">E-mail: *</label>
      <input type="text" name="email" id="email" value="<?php get_data("email"); ?>" /><br />
            <label for="company">Company:</label>
      <input type="text" name="company" id="company" value="<?php get_data("company"); ?>" /><br />
      <label for="collection">Collection: *</label>
      <input type="text" name="collection" id="collection" value="<?php get_data("collection"); ?>" /><br />
        <label for="delivery">Delivery: *</label>
      <input type="text" name="delivery" id="delivery" value="<?php get_data("delivery"); ?>" /><br />
      <label for="comments">Message: *</label>
      <textarea name="comments" id="comments" rows="5" cols="20"><?php get_data("comments"); ?></textarea><br />
      <input type="submit" name="submit" id="submit" value="Send" <?php if (isset($disable) && $disable === true) echo ' disabled="disabled"'; ?> />
    </p>
    </form>  </div>
         <div data-role="footer" >  </div>
      </div>
      </div>           
    </body>
    </html>

    My wife has left me for four weeks, favouring to be with our son who lives 4,000 km away. I now have to cook for myself and the steaks taste horrible. What am I doing wrong?
    If you do not know what I have (not) done to make the steak taste horrible, my question is as hard to answer as your question above.
    Please give us more info like giving us the code that sends the page to the homepage rather than to the previous page.

  • Error-Message "Item not defined on current page" after Page submit - AJAX

    Hello,
    a lot of subpages (regions) are loaded over htmldb_get and displayed on a master page.
    The parts loaded over AJAX are reports. The report regions of these reports contain a hidden and protected field, which hold the page number (&APP_PAGE_ID.)
    This was necessary because I had to overwrite the standard pagination function $a_report on the master page. Otherwise the standard pagination function uses always the page number of the master page and not the page number of the loaded subpages. The overwritten function $a_report is placed in the master page header and searchs for the hidden + proteced field, containing the page number of the loaded subpage.
    This works already fine.
    But after submitting the master page with before loaded subpages over htmldb_get, I get following error message:
    Error Item ID (15348310159873659) is not an item defined on the current page .
    Setting the hidden + protected field on the subpage to never display, the error message disappear, but the pagination function doesn´t work any more.
    Where is the mistake I made?
    Greetings
    Michael

    Hello Ben,
    yesterday evening I read in short your answer, but today I can´t see your answer. Have you edited it again?
    My pagination function works fine and I would maintain it if possible.
    But now a new feature is requiered, which require a submit on the master page. The submit on the master page is not possible due to the hidden field on the loaded subpage, containing the page number for the pagination function.
    Using a normal text field (not saving state) works as long as the text field is visible (condiational view != never). But this information shouldn´t be visible to the user.
    I thought, perhaps a cleanworkaround exists.
    As dirty workaround I could place the information about the actual page number in the report themself (static invisible column). But as soon as the column is invisible (not shown), I have no access on this value
    With a normal hidden html-input-element (not a APEX-Item) in the report regions header of the subpage, holding the page number, I get a http 400 error on page submit.
    An I-Frame is not really a solution, because the master page contains several subpages, which should only be loaded and displayed on demand and not immediatly on page load.
    Greetings
    Michael
    Edited by: user6044915 on 31.03.2009 00:27

  • How to access UCM Web Service in Oracle.

    Hi All,
    I am trying to call UCM Web Service (CheckIn.wsdl) using oracle.
    But these web services are secured and expecting username/password.
    Any one have any idea to pass username/password in oracle function.
    My Code :-
    CREATE OR REPLACE FUNCTION checkin (dDocName IN VARCHAR2,dDocTitle IN VARCHAR2,dDocType IN VARCHAR2,
    dDocAuthor IN VARCHAR2,dSecurityGroup IN VARCHAR2,dDocAccount IN VARCHAR2,
    primaryFile IN VARCHAR2)                              
    return number
    AS
    l_service SYS.UTL_DBWS.service;
    l_call SYS.UTL_DBWS.call;
    newurl VARCHAR2(32767);
    l_wsdl_url VARCHAR2(32767);
    l_namespace VARCHAR2(32767);
    l_service_qname SYS.UTL_DBWS.qname;
    l_port_qname SYS.UTL_DBWS.qname;
    l_operation_qname SYS.UTL_DBWS.qname;
    l_xmltype_in SYS.XMLTYPE;
    l_xmltype_out SYS.XMLTYPE;
    BEGIN
    l_wsdl_url := 'http://localhost:16200/cs/groups/secure/wsdl/custom/CheckIn?wsdl';
    l_namespace := 'http://www.stellent.com/CheckIn/';
    l_service_qname := SYS.UTL_DBWS.to_qname(l_namespace, 'CheckIn');
    l_port_qname := SYS.UTL_DBWS.to_qname(l_namespace, 'CheckInSoap');
    l_operation_qname := SYS.UTL_DBWS.to_qname(l_namespace, 'CheckInUniversal');
    l_service := SYS.UTL_DBWS.create_service (
    wsdl_document_location => URIFACTORY.getURI(l_wsdl_url),
    service_name => l_service_qname);
    l_call := SYS.UTL_DBWS.create_call (
    service_handle => l_service,
    port_name => l_port_qname,
    operation_name => l_operation_qname);
    l_xmltype_in := SYS.XMLTYPE('<?xml version="1.0" encoding="utf-8"?>
    <CheckInUniversal xmlns="' || l_namespace || '">
    <VARCHAR2>' || dDocName || '</VARCHAR2>
    <VARCHAR2>' || dDocTitle || '</VARCHAR2>
    <VARCHAR2>' || dDocType || '</VARCHAR2>
    <VARCHAR2>' || dDocAuthor || '</VARCHAR2>
    <VARCHAR2>' || dSecurityGroup || '</VARCHAR2>
    <VARCHAR2>' || dDocAccount || '</VARCHAR2>
    <VARCHAR2>' || primaryFile || '</VARCHAR2>
    </CheckInUniversal>');
    l_xmltype_out := SYS.UTL_DBWS.invoke(call_Handle => l_call,
    request => l_xmltype_in);
    SYS.UTL_DBWS.release_call (call_handle => l_call);
    SYS.UTL_DBWS.release_service (service_handle => l_service);
    END;
    It's compiling successfully.
    When ever i am trying to run using
    SELECT checkin ('WEBSERVICE009','WEBSERVICE009', 'Document','weblogic','Private','IT/EBA/Distributor_testuser','D:/ucmfiles/test_WebService_11.txt') FROM dual;
    It's expecting username/password...
    Any body have any idea.

    If you are using apex, you have access to the wwv_flow_web_services package that has all the procs you need to made this work. If not, you can use flex_ws_api, which, although a bit out of date, should still work. This can be found at: http://jastraub.blogspot.com/2009/11/flexwsapi-no-on-samplecodeoraclecom.html
    Hopefully this will get you the start you need. Don't forget soapUI. This has proved to be invaluable in my development just to prove something works. It becomes a very easy way when I keep hearing, "UCM doesn't work....".
    Check-In
    -- Modify and create select that will get filename and content from a table.
    -- set serverouput on
    -- make sure flex_ws_api package is installed in same schema that you run this.
    declare
    l_filename varchar2(100);
    l_login varchar2(20);
    l_ddocname varchar2(20);
    l_BLOB BLOB;
    l_CLOB CLOB;
    l_envelope CLOB;
    l_response_msg varchar2(32767);
    begin
      select name, content, ddocname
      into l_filename, l_BLOB, l_ddocname
      from pdfs
      where id = 1;
      l_login := 'kalee';
      l_CLOB := flex_ws_api.blob2clobbase64(l_BLOB);
      l_envelope := '<?xml version=''''1.0'''' encoding=''''UTF-8''''?>';
      l_envelope := l_envelope || '<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:chec="http://www.stellent.com/CheckIn/">';
      l_envelope := l_envelope || '<soapenv:Header/>';
      l_envelope := l_envelope || '  <soapenv:Body>';
      l_envelope := l_envelope || '     <chec:CheckInUniversal>';
      if length(ltrim(rtrim(l_ddocname))) > 0 then
        l_envelope := l_envelope || '        <chec:dDocName>'||l_ddocname||'</chec:dDocName>';
      end if;
      l_envelope := l_envelope || '        <chec:dDocTitle>'||l_filename||'</chec:dDocTitle>';
      l_envelope := l_envelope || '        <chec:dDocType>WebContent</chec:dDocType>';
      l_envelope := l_envelope || '        <chec:dDocAuthor>'||l_login||'</chec:dDocAuthor>';
      l_envelope := l_envelope || '        <chec:dSecurityGroup>Public</chec:dSecurityGroup>';
      l_envelope := l_envelope || '        <chec:dDocAccount>WebContent</chec:dDocAccount>';
      l_envelope := l_envelope || '        <chec:CustomDocMetaData>';
      l_envelope := l_envelope || '           <chec:property>';
      l_envelope := l_envelope || '              <chec:name>xDCSDProfileTrigger</chec:name>';
      l_envelope := l_envelope || '              <chec:value>WebContent</chec:value>';
      l_envelope := l_envelope || '           </chec:property>';
      l_envelope := l_envelope || '        </chec:CustomDocMetaData>';
      l_envelope := l_envelope || '        <chec:primaryFile>';
      l_envelope := l_envelope || '           <chec:fileName>'||l_filename||'</chec:fileName>';
      l_envelope := l_envelope || '           <chec:fileContent>'||l_CLOB||'</chec:fileContent>';
      l_envelope := l_envelope || '        </chec:primaryFile>';
      l_envelope := l_envelope || '     </chec:CheckInUniversal>';
      l_envelope := l_envelope || '  </soapenv:Body>';
      l_envelope := l_envelope || '</soapenv:Envelope>';
      l_xmltype := flex_ws_api.make_request(
        p_url               => 'https://ucmdev.dcsdk12.org/_dav/cs/idcplg',
        p_action            => 'http://www.stellent.com/Search/',
        p_envelope          => l_envelope,
        p_username          => 'admin',
        p_password          => 'password',
        p_wallet_path       => 'file:/u01/app/oracle/admin/SADD/wallet',
        p_wallet_pwd        => 'walletpassword'
      l_response_msg := flex_ws_api.parse_response(p_collection_name=>'STELLENT_CHECKIN',p_xpath=>'//idc:CheckInUniversalResponse/idc:CheckInUniversalResult/idc:StatusInfo/idc:statusMessage/text()',p_ns=>'xmlns:idc="http://www.stellent.com/CheckIn/"');
      dbms_output.put_line(l_response_msg);
    exception
      when others then
        dbms_output.put_line(l_response_msg);
        raise;
    end;
    /Search
    declare
      l_envelope CLOB;
      l_xmltype XMLTYPE;
      l_response varchar2(100);
      ecode NUMBER;
      emesg VARCHAR2(200);
      cursor searchresults_cur(p_xmltype xmltype) is
        SELECT
          extractvalue(column_value, '/idc:SearchResults/idc:dDocName','xmlns:idc="http://www.stellent.com/Search/"') DOCNAME,
          extractvalue(column_value, '/idc:SearchResults/idc:dDocTitle','xmlns:idc="http://www.stellent.com/Search/"') DOCTITLE
        FROM TABLE(XMLSequence(p_xmltype.extract('//idc:QuickSearchResponse/idc:QuickSearchResult/idc:SearchResults','xmlns:idc="http://www.stellent.com/Search/"')));
      searchresults_rec searchresults_cur%ROWTYPE;
    begin
      l_envelope := '<?xml version=''''1.0'''' encoding=''''UTF-8''''?>';
      l_envelope := l_envelope || '<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sear="http://www.stellent.com/Search/">';
      l_envelope := l_envelope || ' <soapenv:Header/>';
      l_envelope := l_envelope || ' <soapenv:Body>';
      l_envelope := l_envelope || '  <sear:QuickSearch>';
      l_envelope := l_envelope || '   <sear:queryText>dDocAuthor &lt;matches&gt; `kalee`</sear:queryText>';
      l_envelope := l_envelope || '  </sear:QuickSearch>';
      l_envelope := l_envelope || ' </soapenv:Body>';
      l_envelope := l_envelope || '</soapenv:Envelope>';
      -- dbms_output.put_line('(soapenv)='||l_envelope);
      l_xmltype := flex_ws_api.make_request(
        p_url               => 'https://ucm.yourdomain/_dav/cs/idcplg',
        p_action            => 'http://www.stellent.com/Search/',
        p_envelope          => l_envelope,
        p_username          => 'admin',
        p_password          => 'password',
        p_wallet_path       => 'file:/u01/app/oracle/admin/DATABASESID/wallet',
        p_wallet_pwd        => 'walletpassword'
      -- dbms_output.put_line('(xml)='||substr(l_xmltype.GetClobVal(),1,2000));
      open searchresults_cur(l_xmltype);
      loop
        fetch searchresults_cur into searchresults_rec;
        exit when searchresults_cur%NOTFOUND;
        dbms_output.put_line('(dDocName)='||searchresults_rec.DOCNAME||' (dDocTitle)='||searchresults_rec.DOCTITLE); 
      end loop;
      if searchresults_cur%ROWCOUNT = 0 then
        dbms_output.put_line('No records found!'); 
      end if;
      close searchresults_cur;
    exception
      when others then
        ecode := SQLCODE;
        emesg := SQLERRM;
        --insert into log_table (code,message,info) values (0,TO_CHAR(ecode) || '-' || emesg,'.CheckinDocument emesg');
        --commit;
        raise;
    end;
    /

  • Shuttle and AJaX

    Hello all,
    I have an interesting issue to do with population of a shuttle in 3.1 using AJaX. The session state of selected items is what's causing me dramas, details as follows:
    The left side of the shuttle is populated according to a series of cascading select lists with an optional 'filter' checkbox on each. So every time the value of a select is changed or a checkbox checked/unchecked the ajax process is fired to repopulate the list accordingly.
    My Javascript is:
    function get_ITEMS(){
    var l_Count = 0
    var l_Return = null;
    var l_Select = $x('P2_ITEMS_LEFT');
    var get = new htmldb_Get(null,$v('pFlowId'),
    'APPLICATION_PROCESS=BUILD_ITEMS_SEL',0);
    get.addParam('x01',$v('P2_PRODFILTER'));
    get.addParam('x02',$v('P2_WORKFILTER'));
    get.addParam('x03',$v('P2_COREFILTER'));
    get.addParam('x04',$v('P2_PRODUCT'));
    get.addParam('x05',$v('P2_WORK_TYPE'));
    get.addParam('x06',$v('P2_CORESYSTEM'));
    get.addParam('x07',$v('P2_DISCIPLINE'));
    gReturn = get.get('XML');
    if(gReturn && l_Select){
    l_Count = gReturn.getElementsByTagName("option").length;
    l_Select.length = 0;
    for(var k=0;k<l_Count;k++){
    var l_Opt_Xml = gReturn.getElementsByTagName("option")[k];
    appendToSelect(l_Select, l_Opt_Xml.getAttribute('value'),
    l_Opt_Xml.firstChild.nodeValue)
    get = null;
    and the application level process BUILD_ITEMS_SEL is:
    DECLARE
    v_doprod varchar2(3);
    v_dowork varchar2(3);
    v_docore varchar2(3);
    v_prod varchar2(30);
    v_work varchar2(30);
    v_core varchar2(30);
    v_disc varchar2(30);
    BEGIN
    v_doprod := wwv_flow.g_x01;
    v_dowork := wwv_flow.g_x02;
    v_docore := wwv_flow.g_x03;
    v_prod := wwv_flow.g_x04;
    v_work := wwv_flow.g_x05;
    v_core := wwv_flow.g_x06;
    v_disc := wwv_flow.g_x07;
    owa_util.mime_header('text/xml', FALSE );
    htp.p('Cache-Control: no-cache');
    htp.p('Pragma: no-cache');
    owa_util.http_header_close;
    htp.prn('<select>');
    FOR rec IN (
    SELECT distinct(item) as "ITEM"
    FROM TBL_ROVE_GRADINGS
    WHERE bus_unit = :P2_BUSUNIT
    AND discipline = v_disc
    AND ((product = v_prod or product = 'all') or v_doprod = 'No')
    AND ((work_required = v_work or work_required = 'all') or v_dowork = 'No')
    AND ((core_system like '%'||v_core||'%' or core_system = 'all') or v_docore = 'No')
    order by item asc
    LOOP
    htp.prn('<option value="' || rec."ITEM"|| '">' || rec."ITEM"|| '</option>');
    END LOOP;
    htp.prn('</select>');
    END;
    This all works perfectly well. I can change my cascading selects, select items, refilter and select other items, the AJaX does its lovely stuff and I've got beautiful process flow. I can have the right-hand side populated from multiple different left-hand lists according to filtering choices.
    The problem is when I need to have the selected items remembered in session state. If I navigate away and then return my left-side has retained its session state (it's rebuilt onload from the currently selected cascading select values) but the right-hand side is blank.
    I've got a nasty suspicion that the core of the issue is because the left side may no longer have the values that the right-side session state is looking for to mark as 'selected'.
    Essentially, what I need is a solution that will 'force' the right-side to have the values previously selected for various filtered choices in the left.
    Any thoughts?
    Thanks :D

    Hello Frank,
    >> If I navigate away and then return my left-side has retained its session state
    I’m assuming that “navigate away” means redirecting from the page (without submitting it). In this case, the session state of the page is not saved, and none of the AJAX components you are using save it either, so you are left with a session state that represent page loading time.
    The addParam() method doesn’t save state. You should use the add() method, which do set session state. For example
    get.add(' P2_PRODFILTER',$v('P2_PRODFILTER'));This will save the session state for all your select lists. Of course, you will have to change the on-demand process accordingly.
    The second thing is to handle the shuttle value. You need to remember that for the APEX engine, a shuttle value is a colon-delimited string. You should generate this value in your on-demand process, and use the APEX_UTIL.SET_SESSION_STATE procedure to save it into session state. If you anticipate that this value will include options that don’t exist on your shuttle left side (left is relative, so let’s say your source column) you should set the LOV option of “Display Extra Values” to Yes.
    Regards,
    Arie.
    &diams; Please remember to mark appropriate posts as correct/helpful. For the long run, it will benefit us all.
    &diams; Author of Oracle Application Express 3.2 – The Essentials and More

  • How to use Ajax Get Multiple Values in Tabular form?

    Hi All-
    I am trying to use AJAX to get multiple values in tabular form by using Denes Kubicek's example in the following link -
    http://apex.oracle.com/pls/otn/f?p=31517:239:9172467565606::NO:::
    Basically, I want to use the drop down list to populate rest of the values on the form.
    I have created the example(Ajax Get Multiple Values, application 54522) on Oracle site -
    http://apex.oracle.com/pls/apex/f?p=4550:1:0:::::
    Workspace: iConnect
    login: demo
    password: demo
    I was able to duplicate his example on page 1 (home page).
    However, I want to use system generate tabular form to finish this example, and was not able to populate the data correctly.
    Page 2 (method 2) is the one that I am having trouble to populate the column values. When I checked application item values in Session, and the values seems to be populated correctly.
    This is what I have done on this page:
    1. Create an Application Process On Demand - Set_Multi_Items_Tabular2:
    DECLARE
      v_subject my_book_store.subject%TYPE;
      v_price my_book_store.price%TYPE;
      v_author my_book_store.author%TYPE;
      v_qty NUMBER;
      CURSOR cur_c
      IS
      SELECT subject, price, author, 1 qty
      FROM my_book_store
      WHERE book_id = :temporary_application_item2;
    BEGIN
      FOR c IN cur_c
      LOOP
      v_subject := c.subject;
      v_price := c.price;
      v_author := c.author;
      v_qty := c.qty;
      END LOOP;
      OWA_UTIL.mime_header ('text/xml', FALSE);
      HTP.p ('Cache-Control: no-cache');
      HTP.p ('Pragma: no-cache');
      OWA_UTIL.http_header_close;
      HTP.prn ('<body>');
      HTP.prn ('<desc>this xml genericly sets multiple items</desc>');
      HTP.prn ('<item id="f04_' || :t_rownum || '">' || v_subject || '</item>');
      HTP.prn ('<item id="f05_' || :t_rownum || '">' || v_price || '</item>');
      HTP.prn ('<item id="f06_' || :t_rownum || '">' || v_author || '</item>');
      HTP.prn ('<item id="f07_' || :t_rownum || '">' || v_qty || '</item>');
      HTP.prn ('</body>');
    END;
    2. Create two application items - TEMPORARY_APPLICATION_ITEM2, T_ROWNUM2
    3. Put the following in the Page Header:
    <script language="JavaScript" type="text/javascript">
    function f_set_multi_items_tabular2(pValue, pRow){
        var get = new htmldb_Get(null,html_GetElement('pFlowId').value,
    'APPLICATION_PROCESS=Set_Multi_Items_Tabular2',0);
    if(pValue){
    get.add('TEMPORARY_APPLICATION_ITEM2',pValue)
    get.add('T_ROWNUM2',pRow)
    }else{
    get.add('TEMPORARY_APPLICATION_ITEM2','null')
        gReturn = get.get('XML');
        if(gReturn){
            var l_Count = gReturn.getElementsByTagName("item").length;
            for(var i = 0;i<l_Count;i++){
                var l_Opt_Xml = gReturn.getElementsByTagName("item")[i];
                var l_ID = l_Opt_Xml.getAttribute('id');
                var l_El = html_GetElement(l_ID);   
                if(l_Opt_Xml.firstChild){
                    var l_Value = l_Opt_Xml.firstChild.nodeValue;
                }else{
                    var l_Value = '';
                if(l_El){
                    if(l_El.tagName == 'INPUT'){
                        l_El.value = l_Value;
                    }else if(l_El.tagName == 'SPAN' && l_El.className == 'grabber'){
                        l_El.parentNode.innerHTML = l_Value;
                        l_El.parentNode.id = l_ID;
                    }else{
                        l_El.innerHTML = l_Value;
        get = null;
    </script>
    Add the follwing to the end of the above JavaScript:
    <script language="JavaScript" type="text/javascript">
    function setLOV(filter, list2)
    var s = filter.id;
    var item = s.substring(3,8);
    var field2 = list2 + item;
    f_set_multi_items_tabular2(filter, field2);
    4. Tabular form query:
    select
    "BOOK_ID",
    "BOOK",
    "SUBJECT",
    "PRICE",
    "AUTHOR",
    "QTY",
    "BOOK_ID" BOOK_ID_DISPLAY
    from "#OWNER#"."MY_BOOK_STORE"
    5. In Book_ID_DISPLAY column attribute:
    Add the following code to element attributes: onchange="javascript:f_set_multi_items_tabular2(this.value,'#ROWNUM#');"
    Changed to -> onchange="javascript:setLOV(this,'f03');"
    Now,  T_ROWNUM2 returns value as f03_0001. But, TEMPORARY_APPLICATION_ITEM2 returns as [object HTMLSelectElement]...
    Please help me to see how I can populate the data with this tabular form format. Thanks a lot in advanced!!!
    Ling
    Updated code in Red..

    Ling
    Lets start with looking at what the javascript code is doing.
    function f_set_multi_items_tabular(pValue, pRow){
      /*This will initiate the url for the demand process to run*/
      var get = new htmldb_Get(null,html_GetElement('pFlowId').value,
                              'APPLICATION_PROCESS=Set_Multi_Items_Tabular',0);
      if(pValue){
        /*If there is an value than submit item name with value*/
        get.add('TEMPORARY_APPLICATION_ITEM',pValue)
        get.add('T_ROWNUM',pRow)
      }else{
        /*Else set the item TEMPORARY_APPLICATION_ITEM to null*/
        get.add('TEMPORARY_APPLICATION_ITEM','null')
      /*Submit the url and te returned document is of type XML*/
      gReturn = get.get('XML');
      if(gReturn){
        /*There is something returned*/
        var l_Count = gReturn.getElementsByTagName("item").length;
        /*For all elements of the tag item*/
        for(var i = 0;i<l_Count;i++){
          /*Get the item out of the XML*/
          var l_Opt_Xml = gReturn.getElementsByTagName("item")[i];
          /*Get the id of the item*/
          var l_ID = l_Opt_Xml.getAttribute('id');
          /*Get the element in the original page with the same id as
          **the item we have in the XML produced by the ondemand process
          var l_El = html_GetElement(l_ID);
          /*Now get the value of the item form the XML*/
          if(l_Opt_Xml.firstChild){
            var l_Value = l_Opt_Xml.firstChild.nodeValue;
          }else{
            /*There is no value*/
            var l_Value = '';
          if(l_El){
            /*There is an element with the same id as the item we are processing*/
            if(l_El.tagName == 'INPUT'){
              /*The element is an input item just set the value*/
              l_El.value = l_Value;
            }else if(l_El.tagName == 'SPAN' && l_El.className == 'grabber'){
              /*If it is a span elment and has the class grabber
              **Then set the innerHTML of the parent to the value
              **and the id of the parent to the id
              l_El.parentNode.innerHTML = l_Value;
              l_El.parentNode.id = l_ID;
            }else{
              /*Else set the value as innerHTML*/
              l_El.innerHTML = l_Value;
      get = null;
    Now where it went wrong in your initial post
    The XML that was returned by your XML process would be something like
    <body>
      <desc>this xml genericly sets multiple items</desc>
      <item id="f02_1">CSS Mastery</item>
      <item id="f03_1">22</item>
      <item id="f04_1">Andy Budd</item>
      <item id="f05_1">1</item>
    </body>
    When you don't use apex_item to create your tabular form a item in the table will look like
    <input id="f02_0001" type="text" value="CSS Mastery" maxlength="2000" size="16" name="f05" autocomplete="off">
    Notice the id's f02_1 and f02_0001 don't match.
    So to make it work the XML would have to look like
    <body>
      <desc>this xml genericly sets multiple items</desc>
      <item id="f02_0001">CSS Mastery</item>
      <item id="f03_0001">22</item>
      <item id="f04_0001">Andy Budd</item>
      <item id="f05_0001">1</item>
    </body>
    To do that simply use lpad in the ondemand process like
    HTP.prn ('<item id="f02_' || lpad(:t_rownum,4,'0') || '">' || v_subject || '</item>');
    HTP.prn ('<item id="f03_' || lpad(:t_rownum,4,'0') || '">' || v_price || '</item>');
    HTP.prn ('<item id="f04_' || lpad(:t_rownum,4,'0') || '">' || v_author || '</item>');
    HTP.prn ('<item id="f05_' || lpad(:t_rownum,4,'0') || '">' || v_qty || '</item>');
    Keep in mind that the above is based on your original post and #ROWNUM# not being lpadded with zero's.
    Nicolette

Maybe you are looking for