How to pull URL parameters into my Captivate 6 flash

I want to be able to parse a parameter being passed in the URL to my Captivate video and then use it after the file is over.   e.g. a username that is picked up by another web page.  Is there an easy way to do this.
Looking through old posts, is see using the m_MovieHandle as the area to place my flash code, but everything so far I've tried doesn't bring in the variable.   I'm kinda new to flash.
Thanks

Put this JavaScript code in a separate .js file.  I called mine utilities.js:
     /* Utility to get a URL Parameters as queryString object */
     var queryString = (function(a) {
          if (a == "") return {};
          var b = {};
          for (var i = 0; i < a.length; ++i)
               var p=a[i].split('=');
               if (p.length != 2) continue;
               b[p[0]] = decodeURIComponent(p[1].replace(/\ /g, " "));
          return b;
     })(window.location.search.substr(1).split('&'));
     /* Utility function to Set a Captivate Variable with a URL Parameter */
      var setCpVariableWithURLParameter = function(cpUserVariableName, urlParameterName){
          /* Get the requested URL Parameter from the URLParams Object */
          var variableValue = queryString[urlParameterName];
          /* Check for HTML5 vs. SWF output */
          if (typeof window.cp==='undefined') {
               /* We have SWF output, so Get the Captivate Object */
               var objCp=document.getElementById('Captivate');
               if(objCp && objCp.cpEISetValue){
                    /* Set the Captivate User variable with the JavaScript variabe, variableValue */
                    objCp.cpEISetValue('m_VarHandle.' + cpUserVariableName, variableValue);
          } else {
               /* We have HTML5 output */
               if(cp.vm && cp.vm.setVariableValue){
                  cp.vm.setVariableValue(cpUserVariableName, variableValue);
Include this .js file in the header of the <ProjectName>.htm file of the swf published output by using a script tag:
<script src="utilities.js" type="text/javascript"></script>
Where utilities.js is at the root of the published project (where the published .swf file lives).
Also add this script tag to the header of the HTML5 output index.html file. 
To use the setCpVariableWithURLParameter() function, you would make this call inside of a JavaScript action in Captivate:
setCpVariableWithURLParameter('v_Name', 'userName');
Where 'v_Name' is the Captivate user Variable you want to set and 'userName' is the name of the URL parameter.
Give that a try and let us know how it goes.
Best,
Jim Leichliter

Similar Messages

  • How to read URL parameters of one wdp component into other WDP component?

    Dear Experts,
    Can anyone let me know how to read URL parameters of one wdp component into other WDP component?
    My requirement is i have one standard WDP component with 3 URL parameters and i needto
    read that URL parameters along with their values in my Z-WDP component.
    Thanks
    SK

    Hi Santosh,
    You can read parameters send from one WebDynpro Component to another component by adding code in "HANDLEDEFAULT" Event Handler method ( Window )of your target Web Dynpro Component.
    data: lt_parameter             type tihttpnvp,
             ls_parameter             type ihttpnvp.
    lo_api_controller ?= wd_this->wd_get_api( ).
       call method lo_api_controller->get_message_manager
         receiving
           message_manager = lo_message_manager.
       clear : ls_parameter.
       refresh : lt_parameter[].
    * Read all URL parameters
       wdevent->get_data( exporting name = if_wd_application=>all_url_parameters importing value = lt_parameter ).
    if not lt_parameter[] is initial.
         clear : ls_parameter.
         read table lt_parameter into ls_parameter index 1.
         if ls_parameter-name = 'ACTION' and
            ls_parameter-value is initial.
           lv_flag = 'X'.
           clear : lo_msg.
           lo_msg = 'Action Parameter Missing in URL Link !'.
    *         report message
           call method lo_message_manager->report_error_message
             exporting
               message_text = lo_msg.
         else.
         endif.
    Best Regards
    Priyesh Shah

  • CP8 - How to embed a pdf into a captivate slide (for LMS publication)?

    Hi,
    How to embed a pdf into a captivate slide (for LMS publication)?
    WebObject doesn't work...
    Thanks

    I accomplished this by publishing my PDF to a directory I called "PDFWebObjectEmbedFiles" on my webserver outside of where my published project lives.
    For example...the PDF to embed lived at:
    http://mydomain.com/PDFWebObjectEmbedFiles/file_name_of_PDF_to_embed.pdf
    Then I went inside of Captivate and inserted the Web Object widget.  I put the URL to my PDF inside the widget.  Then it loads perfectly with no problem.
    Hope this helps.

  • How to read URL Parameters

    Hi All,
      How to read URL parameters in another WDA.
    Thanks in advance

    here is the sample code.
    you can write this code in HANDLEDEFAULT method of Default Window of Application being called.
      DATA:
        wa_url TYPE LINE OF tihttpnvp,
        int_url TYPE tihttpnvp.
      wdevent->get_data(
        EXPORTING
          name = if_wd_application=>all_url_parameters
        IMPORTING
          value = int_url ).

  • How to pull the data into smartform after designing layout?

    how to pull the data into smartform after designing layout?

    call the smartform in your Driver program and pass your output internal tables in the smartforms paramaters
    Check the below Sample code.
    FORM label_print.
      DATA : g_fm_name TYPE rs38l_fnam,
             g_output  TYPE ssfcompop,
             g_control TYPE ssfctrlop,
             g_form TYPE tdsfname VALUE 'ZPRINT_LABELS',
             g_dest TYPE rspopname,
             g_printer TYPE rspoptype..
      REFRESH : i_out[],i_qals[].
      SELECT matnr maktx
             INTO TABLE i_out
             FROM makt
             FOR ALL ENTRIES IN i_mseg
             WHERE matnr = i_mseg-matnr
             AND   spras = sy-langu.
      SELECT prueflos objnr ersteldat erstelzeit matnr revlv charg mengeneinh
             INTO TABLE i_qals
             FROM qals
             FOR ALL ENTRIES IN i_mseg
             WHERE matnr = i_mseg-matnr
             AND   charg = i_mseg-charg.
    *FM to accept the device type and returns the short name of the output device
      CALL FUNCTION 'EFG_GET_PRINTER'
        EXPORTING
          x_no_dialog  = ' '
          x_obligatory = 'X'
        IMPORTING
          y_tddest     = g_dest
        EXCEPTIONS
          cancelled    = 1
          failed       = 2
          OTHERS       = 3.
    *device type name for the output device
      SELECT SINGLE patype                                  "#EC CI_NOFIELD
             FROM tsp03d
             INTO g_printer
             WHERE padest = g_dest.
    *printer setting
      g_control-no_dialog = 'X'.
      g_output-tdarmod = '1'.
      g_output-tdcopies = '001'.
      g_output-tddest = g_dest.
      g_output-tdprinter = g_printer.
      g_output-tdnewid = 'X'.
      g_output-tdimmed = 'X'.
      CLEAR wa_mseg.
      LOOP AT i_mseg INTO wa_mseg.
        READ TABLE i_out INTO wa_out WITH KEY matnr = wa_mseg-matnr.
    check for the status and filter the records
        CLEAR : wa_qals.
        LOOP AT i_qals INTO wa_qals WHERE matnr = wa_mseg-matnr
                                    AND charg = wa_mseg-charg.
          CALL FUNCTION 'STATUS_TEXT_EDIT'
            EXPORTING
              objnr            = wa_qals-objnr
              spras            = sy-langu
            IMPORTING
              line             = l_status
            EXCEPTIONS
              object_not_found = 1
              OTHERS           = 2.
          IF l_status CS 'LTCA' OR l_status CS 'SKIP'.
            DELETE i_qals.
          ENDIF.
        ENDLOOP.
        SORT i_qals BY ersteldat DESCENDING erstelzeit DESCENDING.
        IF i_qals IS INITIAL.
          l_msg = text-002.
        ELSE.
          READ TABLE i_qals INTO wa_qals INDEX 1.
          SELECT prueflos vbewertung
                 INTO TABLE i_qave
                 FROM qave
                 WHERE prueflos = wa_qals-prueflos
                 AND   kzart = 'L'.
          IF sy-subrc <> 0.
            l_msg1 = text-003.
          ENDIF.
          SORT i_qave.
          CLEAR : wa_qave.
          IF NOT i_qave IS INITIAL.
            READ TABLE i_qave INTO wa_qave INDEX 1.
            IF wa_qave-vbewertung = 'A'.
              l_msg = text-002.
            ELSEIF wa_qave-vbewertung = 'R'.
              l_msg1 = text-003.
            ELSE.
              l_msg1 = text-003.
            ENDIF.
          ENDIF.
        ENDIF.
        CLEAR : wa_ser03.
        READ TABLE i_ser03 INTO wa_ser03 WITH KEY mblnr = wa_mseg-mblnr.
    *Calling Smartform
        CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
          EXPORTING
            formname           = g_form
          IMPORTING
            fm_name            = g_fm_name
          EXCEPTIONS
            no_form            = 1
            no_function_module = 2
            OTHERS             = 3.
        LOOP AT i_objk INTO wa_objk WHERE obknr = wa_ser03-obknr.
    *Calling FM generated from the smartform
          DATA : l_date(10) TYPE c,
                 l_date1(10) TYPE c,
                 l_date2(10) TYPE c,
                 l_date3(10) TYPE c,
                 l_hyphen(1) TYPE c VALUE '-'.
          CLEAR : l_date,l_date1,l_date2,l_date3.
          l_date1 = wa_mseg-vfdat+0(4).
          l_date2 = wa_mseg-vfdat+4(2).
          l_date3 = wa_mseg-vfdat+6(2).
          CONCATENATE l_date1 l_hyphen l_date2 l_hyphen l_date3 INTO l_date.
          CALL FUNCTION g_fm_name
            EXPORTING
              control_parameters = g_control
              output_options     = g_output
              user_settings      = ' '
              g_matnr            = wa_mseg-matnr
              g_mat_text         = wa_out-maktx
              g_batch            = wa_mseg-charg
              g_rev              = wa_qals-revlv
              g_edate            = l_date
              g_lot              = wa_qals-prueflos
              g_qty              = wa_mseg-erfmg
              g_uom              = wa_mseg-erfme
              g_serial           = wa_objk-sernr
              g_smsg             = l_msg
              g_fmsg             = l_msg1
            EXCEPTIONS
              formatting_error   = 1
              internal_error     = 2
              send_error         = 3
              user_canceled      = 4
              OTHERS             = 5.
          CLEAR  g_output-tdnewid.
        ENDLOOP.
        IF sy-subrc <> 0.
          CLEAR : l_date,l_date1,l_date2,l_date3.
          l_date1 = wa_mseg-vfdat+0(4).
          l_date2 = wa_mseg-vfdat+4(2).
          l_date3 = wa_mseg-vfdat+6(2).
          CONCATENATE l_date1 l_hyphen l_date2 l_hyphen l_date3 INTO l_date.
          CALL FUNCTION g_fm_name
            EXPORTING
              control_parameters = g_control
              output_options     = g_output
              user_settings      = ' '
              g_matnr            = wa_mseg-matnr
              g_mat_text         = wa_out-maktx
              g_batch            = wa_mseg-charg
              g_rev              = wa_qals-revlv
              g_edate            = l_date
              g_lot              = wa_qals-prueflos
              g_qty              = wa_mseg-erfmg
              g_uom              = wa_mseg-erfme
              g_serial           = wa_objk-sernr
              g_smsg             = l_msg
              g_fmsg             = l_msg1
            EXCEPTIONS
              formatting_error   = 1
              internal_error     = 2
              send_error         = 3
              user_canceled      = 4
              OTHERS             = 5.
          CLEAR g_output-tdnewid.
        ENDIF.
      ENDLOOP.
      IF sy-subrc = 0.
        MESSAGE i000(zm).
      ENDIF.
    ENDFORM.                    " label_print

  • How to persist URL parameters in OAM portal inserts?

    Hi,
    We have a requirement to redirect the users to different XSLs based on the containers configured in OID (ou=employees,ou=customers). We have configured different style directories (employees and customers) in OAM. For Identity Administration activities we are using another style (adminStyle) used by OAM Identity Administrators.
    We are using OAM portal inserts for navigating from webapplication (integrated with OAM) to OAM modify profile page to change user attributes.
    Also webapplication using different authenitcation scheme in OAM.
    User login into webapplication using login.jsp (form based authentication scheme) and clicks on Modify profile link (URL will be portal insert URL).
    After the user session timeout (Configured in webgate) user is redirected to OAM login page (form based authentication). Once the user enters valid credentials user is redirected to OAM user manager application (only navigation bar with back button is displayed).
    The parameters comp=true, style=employees and program=modify are lost. Hence user not able to see OAM Modify profile page. Again user needs to click on back button (portalid) to get into Modify profile page. How to persist these parameters in the URL?
    Following is the portal insert URL we are using:
    http://<host>:<port>/identity/oblix/apps/userservcenter/bin/userservcenter.cgi?program=modify&uid=UserDN&style=employees&xsl=usc_profile.xsl&comp=true &portalid=webapphome
    Anypointers on this is appreciated.
    Thanks in advance.
    Regards,
    Srikanth
    Edited by: Srikanth_idam on 16-Apr-2010 04:30

    Hi Srikanth,
    That looks like a bug (6158232) that was fixed in version 10.1.4.2 of OAM Access Server (maybe WebGate too). Are you on an earlier version?
    Regards,
    Colin

  • How to read URL Parameters in ABAP WebDynpro ?

    Hi,
    How and where (which class, method) in ABAP WebDynpro we can read URL Parameters ? I found answers for WebDynpro JAVA but nothing for ABAP.
    Thanks
    Meenal

    Hi Meenal,
    Please see a post by Sanjay Agarwal titled 'Sequencing Problem in Web Dynpro ABAP'. I believe you will find your answer there.
    Cheers,
    Rich

  • How to config URL parameters dynamiclly in URL iView?

    Hi all,
    I have 2 iViews, iView1 is a WD application iView, iView2 is a URL iView with some URL parameters.
    Firstly I navigate from IView1 to iView2 with some parameters, then I hope to pass these parameters to the URL parameters configued in iView2.
    For example,
    <b>iView2 configuration:</b>
    URL: http://server1/app
    URL parameter name: param
    <b>Navigate from IView1 to iView2:</b>
    WDPortalNavigation.navigateAbsolute("ROLES:"+iview, WDPortalNavigationMode.SHOW_INPLACE,(String) null, (String) null, WDPortalNavigationHistoryMode.ALLOW_DUPLICATIONS,(String)null,(String) null, "value=123");
    Then how can I pass the value 123 from iView1 to the parameter 'param' in iView2?
    Best regards,
    Bean

    Hi Bean ,
    The approach you are following is correct ,refer to these links , there you can find the concept of WDportalnavigation properly,Also check for the relative navigation.
    http://help.sap.com/saphelp_nw04/helpdata/en/c3/235a428a1e9041e10000000a1550b0/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/c3/235a428a1e9041e10000000a1550b0/frameset.htm
    Thanx
    Pankaj

  • How to read url parameters from a decoded string

    Hi,
    Normally if I pass on a url string
    test.cfm?name=abc&num=8, I can do url.name and url.num
    to get the url parameters. But what if the url string is decoded by
    javascript escape() function? The above url string becomes
    test.cfm%3Fname%3Dabc%26num%3D8
    How can I read url.name and url.num from this string?
    Thanks!
    Min

    Escape is not really meant for urls because it encodes the
    delimiters: ? &
    http://www.w3schools.com/jsref/jsref_encodeURI.asp
    http://www.w3schools.com/jsref/jsref_encodeURIComponent.asp

  • How to encode URL parameters in pl/sql?

    How to encode url and its paramters in PL/SQL to call a page using html GET method? Is there any equiavlent method of java's URLEncoder.encode() method in pl/sql (in any web packages) ?
    Any help/pointers highly appreciated.
    P.S. : URGENT PLEASE!!!

    http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:371959198986

  • How to add PDF files into a slides? (Flash 8)

    I am new to flash and I am using Macromedia Flash 8. My task is simple enough: I need create a Presentation with Screens from PDF files: I have 10-12 PDF files which I want convert into flash presentation.
    I have read this tutorial:
    http://w3.id.tue.nl/fileadmin/id/objects/E-Atelier/Phidgets/Software/Flash/fl8_tutorials.p df
    Chapter 11: Basic Tasks: Create a Presentation with Screens.
    I'm having trouble how to add PDF files into a slides: I want insert a whole pdf file as separate slide, without splitting pdf file into separate elements: pictures, text, etc. I tried import pdf file into Flash, wheen import there is shown prompt how program should process this pdf file(add in stage, library, as keyframes, etc) , not clear which option is correct for my task. What I got is pdf file splitted into multiple images, text, - which is not what I want. I want keep PDF files without changes, preserve original design and formatting, just convert this pdf into flash, so presentation will consist of PDFs organized in correct order, then add navigation buttons and some effects. How to solve this task?

    Just to avoid potential confusion... PDF is an Adobe format, but Flash 8 is/was not.  Flash 8 came out before Adobe bought Macromedia.  Even today, I don't believe anything has been done to accomodate direct integration of PDF content in Flash.

  • How to access PPC contacts into my application using Flash

    Hi,
    I am new to flash lite anybody help me how to access PPC
    contacts into my application.

    Hi,
    I am new to flash lite anybody help me how to access PPC
    contacts into my application.

  • How to use URL parameters in Flex?

    Hello Everyone,
    I wanted to know how can the parameters passed in a URL be used in our Flex application. I searched in the forum and tried these links:
    http://forums.adobe.com/message/217950#217950
    http://www.danvega.org/blog/index.cfm/2009/2/5/Flex-FlashVars-in-local-development
    In the second link, this is the solution provided:
       1. // if we've detected an acceptable version
       2. // embed the Flash Content SWF when all tests are passed
       3. AC_FL_RunContent(
       4.         "src", "ffManager",
       5.         "width", "100%",
       6.         "height", "100%",
       7.         "align", "middle",
       8.         "id", "ffManager",
       9.         "quality", "high",
      10.         "bgcolor", "#869ca7",
      11.         "name", "FFManager",
      12.         "allowScriptAccess","sameDomain",
      13.         "type", "application/x-shockwave-flash",
      14.         "pluginspage", "http://www.adobe.com/go/getflashplayer",
      15.         "flashvars","username=dvega"
      16. );
    private function init():void {
        // grab the username so we can track who is logged in
        [Bindable] private var:username= Application.application.parameters.username;
    But here, I am getting the hardcoded value (ie.,dvega) as the data inside my flex application. Instead I would need the dynamic data that is passed through the URL. For Ex: if I use the URL, http://172.22.41.154/MH_2.html?myName=Arush
    I need would need to use the name 'Arush' inside the application. Can you please help me on how and what part of the code is to be modified?
    Thank you,
    Warm regards,
    Deepak

    That would come within flex.
    In my case, there is a SAP CRM web application which has a push button. On click of this button, flex URL is called(ie., http://172.22.41.154/MH_Bluebook_Integration2.html). On click of that button I need to pass an Object ID, which is passed withing that flex URL, something like this:
    http://172.22.41.154/MH_Bluebook_Integration2.html?objID=abcd
    I need to receive 'abcd' in the flex. Any way we could modify the HTML wrapper to send this value to swf? 

  • How to parse URL Data into an NSString Array in iphone application

    Hi Every one
    I am newbie to iphone programming. I am having problem with reading and displaying the data into the table view. My application has to be designed like this. There is a csv file in the server machine and I have to access that URL line by line. Each line consists of 8 comma separated values. Consider each line has first name, second name and so on. I have to parse the data with comma and a newline and store them in an array of first name, second name array an so on. The next thing is I have to set first name second name combined and must be displayed in the UITableView. Can anyone provide me with an example of how to do it? I know I am asking the solution but I encountered a problem in connection methods separately and parsing simultaneously. You help is much appreciated.
    Thanks

    What does that have to do with a URL?
    The only thing that doesn't sound good is "array of first name" and "second name array". For each row, extract all the field and store them in an NSDictionary. Add a derived field consisting of first name concatenated with last name. That will be easy to display in a table.

  • Puttin url parameters into a map

    Hi guys,
    I have to put all the parameters from a url query string into a map, and I was wondering if anybody knows some library (apache commons, or something like that to do it).
    I know it is not hard to do it from scratch, but I want something that I can really rely on.
    So, the method would be something like this :
    Map getMapFromURL(String url)

    Shouldn't be difficult. Split the string on & characters to break it into parameter name/value strings. Split each of those on = characters to break it into name and value. URL-decode the value part. Bung it into the map.
    Except... it isn't a rule of URLs that all the parameter names must be different. So you have to decide what to do with this:
    value=true&value=false

Maybe you are looking for