Is it possible to embedded this code into DPS?

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
    <head>
        <title></title>
        <script language="javascript" type="text/javascript">
            $(document).ready(function () {
                              adobeDPS.initializationComplete.addOnce(
                                                                      function () {var analytics = adobeDPS.analyticsService;
                                                                      analytics.variables[analytics.predefined.variables.customVariable1] = “publishing”;
                                                                      analytics.variables[analytics.predefined.variables.customVariable2] = “app”;
                                                                      analytics.variables[analytics.predefined.variables.customVariable3] = “oando”;
                                                                      analytics.variables[analytics.predefined.variables.customVariable4] = “ipad magazine”;
                                                                      analytics.variables[analytics.predefined.variables.customVariable5] = “tablet”;
   </script>
    </head>
    <body>
        <!-- blank -->
    </body>
</html>
Been asked to try and embed this into the pages of a DPS document for extra tracking - or so I am told, however it seems to
hang the upload process to DPS, well completely bombs Indesign, when this is placed as a Webcontent overlay.
Is this the correct way to do this?

Your advice at least stopped the crashing, but unfortunately it doesn't seem to be sending any values. Basically what we are looking for is a static value to be fired into the Custom Variables ideally via the Content Views Event if not then via a Custom Event. Any clues how can we make this happen? I have set all the interactions up on the overlay that seem relevant, is there something else we need to be doing to see the variables in the script?

Similar Messages

  • How to restructure this code into separate classes?

    I have C# code that initializes a force feedback joystick and plays an effect file(vibrates the joystick). I have turn the console application into library
    code to make a dll so that I can use it in LabVIEW. 
    Right now all the code is written under one class, so went I put the dll in LabVIEW I can only select that one class. labVIEW guy told me that I need to
    restructure my C# code into separate classes. Each class that I want to access from LabVIEW needs to marked as public. Then I can instantiate that class in LabVIEW using a constructor, and call methods and set properties of that class using invoke nodes and
    property nodes.
    How can I do this correctly? I tried changing some of them into classes but doesn't work. Can you guys take a look at the code to see if it is even possible
    to break the code into separate classes? Also, if it is possible can you guide me, suggest some reading/video, etc.
    Thank you
    using System;
    using System.Drawing;
    using System.Collections;
    using System.Windows.Forms;
    using Microsoft.DirectX.DirectInput;
    namespace JoystickProject
    /// <summary>
    /// Summary description for Form1.
    /// </summary>
    public class Form1 : System.Windows.Forms.Form
    private System.Windows.Forms.Label label1;
    /// <summary>
    /// Required designer variable.
    /// </summary>
    private System.ComponentModel.Container components = null;
    private Device device = null;
    private bool running = true;
    private ArrayList effectList = new ArrayList();
    private string joyState = "";
    public bool InitializeInput()
    // Create our joystick device
    foreach(DeviceInstance di in Manager.GetDevices(DeviceClass.GameControl,
    EnumDevicesFlags.AttachedOnly | EnumDevicesFlags.ForceFeeback))
    // Pick the first attached joystick we see
    device = new Device(di.InstanceGuid);
    break;
    if (device == null) // We couldn't find a joystick
    return false;
    device.SetDataFormat(DeviceDataFormat.Joystick);
    device.SetCooperativeLevel(this, CooperativeLevelFlags.Exclusive | CooperativeLevelFlags.Background);
    device.Properties.AxisModeAbsolute = true;
    device.Properties.AutoCenter = false;
    device.Acquire();
    // Enumerate any axes
    foreach(DeviceObjectInstance doi in device.Objects)
    if ((doi.ObjectId & (int)DeviceObjectTypeFlags.Axis) != 0)
    // We found an axis, set the range to a max of 10,000
    device.Properties.SetRange(ParameterHow.ById,
    doi.ObjectId, new InputRange(-5000, 5000));
    // Load our feedback file
    EffectList effects = null;
    effects = device.GetEffects(@"C:\MyEffectFile.ffe",
    FileEffectsFlags.ModifyIfNeeded);
    foreach(FileEffect fe in effects)
    EffectObject myEffect = new EffectObject(fe.EffectGuid, fe.EffectStruct,
    device);
    myEffect.Download();
    effectList.Add(myEffect);
    while(running)
    UpdateInputState();
    Application.DoEvents();
    return true;
    public void PlayEffects()
    // See if our effects are playing.
    foreach(EffectObject myEffect in effectList)
    //if (button0pressed == true)
    //MessageBox.Show("Button Pressed.");
    // myEffect.Start(1, EffectStartFlags.NoDownload);
    if (!myEffect.EffectStatus.Playing)
    // If not, play them
    myEffect.Start(1, EffectStartFlags.NoDownload);
    //button0pressed = true;
    protected override void OnClosed(EventArgs e)
    running = false;
    private void UpdateInputState()
    PlayEffects();
    // Check the joystick state
    JoystickState state = device.CurrentJoystickState;
    device.Poll();
    joyState = "Using JoystickState: \r\n";
    joyState += device.Properties.ProductName;
    joyState += "\n";
    joyState += device.ForceFeedbackState;
    joyState += "\n";
    joyState += state.ToString();
    byte[] buttons = state.GetButtons();
    for(int i = 0; i < buttons.Length; i++)
    joyState += string.Format("Button {0} {1}\r\n", i, buttons[i] != 0 ? "Pressed" : "Not Pressed");
    label1.Text = joyState;
    //if(buttons[0] != 0)
    //button0pressed = true;
    public Form1()
    // Required for Windows Form Designer support
    InitializeComponent();
    // TODO: Add any constructor code after InitializeComponent call
    /// <summary>
    /// Clean up any resources being used.
    /// </summary>
    protected override void Dispose( bool disposing )
    if( disposing )
    if (components != null)
    components.Dispose();
    base.Dispose( disposing );
    #region Windows Form Designer generated code
    /// <summary>
    /// Required method for Designer support - do not modify
    /// the contents of this method with the code editor.
    /// </summary>
    public void InitializeComponent()
    this.label1 = new System.Windows.Forms.Label();
    this.SuspendLayout();
    // label1
    this.label1.BackColor = System.Drawing.SystemColors.ActiveCaptionText;
    this.label1.Location = new System.Drawing.Point(8, 8);
    this.label1.Name = "label1";
    this.label1.Size = new System.Drawing.Size(272, 488);
    this.label1.TabIndex = 0;
    // Form1
    this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
    this.BackColor = System.Drawing.SystemColors.ControlText;
    this.ClientSize = new System.Drawing.Size(288, 502);
    this.Controls.AddRange(new System.Windows.Forms.Control[] {
    this.label1});
    this.Name = "Form1";
    this.Text = "Joystick Stuff";
    this.ResumeLayout(false);
    #endregion
    /// <summary>
    /// The main entry point for the application.
    /// </summary>
    [STAThread]
    static void Main()
    using (Form1 frm = new Form1())
    frm.Show();
    if (!frm.InitializeInput())
    MessageBox.Show("Couldn't find a joystick.");

    Imho he means the following.
    Your class has performs two tasks:
    Controlling the joystick.
    Managing the joystick with a form.
    So I would recommend, that you separate the WinForm from the joystick code. E.g.
    namespace JoystickCtlLib
    public class JoystickControl
    private Device device = null;
    private bool running = true;
    private ArrayList effectList = new ArrayList();
    private string joyState = "";
    public string State { get { return this.joyState; } }
    public bool InitializeInput() { return true; }
    public void PlayEffects() { }
    private void UpdateInputState() { }
    So that your joystick class does not reference or uses any winform or button.
    btw, there is a thing which is more important than that: Your polling the device in the main thread of your application. This will block your main application. Imho this should be a job for a thread like background worker.

  • How can i rewrite this code into java?

    How can i rewrite this code into a java that has a return value?
    this code is written in vb6
    Private Function IsOdd(pintNumberIn) As Boolean
        If (pintNumberIn Mod 2) = 0 Then
            IsOdd = False
        Else
            IsOdd = True
        End If
    End Function   
    Private Sub cmdTryIt_Click()
              Dim intNumIn  As Integer
              Dim blnNumIsOdd     As Boolean
              intNumIn = Val(InputBox("Enter a number:", "IsOdd Test"))
              blnNumIsOdd = IsOdd(intNumIn)
              If blnNumIsOdd Then
           Print "The number that you entered is odd."
        Else
           Print "The number that you entered is not odd."
        End If
    End Sub

    873221 wrote:
    I'm sorry I'am New to Java.Are you new to communication? You don't have to know anything at all about Java to know that "I have an error," doesn't say anything useful.
    I'm just trying to get you to think about what your post actually says, and what others will take from it.
    what does this error mean? what code should i replace and add? thanks for all response
    C:\EvenOdd.java:31: isOdd(int) in EvenOdd cannot be applied to ()
    isOdd()=true;
    ^
    C:\EvenOdd.java:35: isOdd(int) in EvenOdd cannot be applied to ()
    isOdd()=false;
    ^
    2 errors
    Telling you "what code to change it to" will not help you at all. You need to learn Java, read the error message, and think about what it says.
    It's telling you exactly what is wrong. At line 31 of EvenOdd.java, you're calling isOdd(), with no arguments, but the isOdd() method requires an int argument. If you stop ant think about it, that should make perfect sense. How can you ask "is it odd?" without specifying what "it" is?
    So what is this all about? Is this homework? You googled for even odd, found a solution in some other language, and now you're just trying to translate it to Java rather than actually learning Java well enough to simply write this trivial code yourself?

  • Embedding c# code into html attachment

    Hi,
    I am trying to have the HTML and CSS layout within a SharePoint list item attachment. Part of this layout is also adding a C# ImageButton.
    I can get the list item attachment contents to load and the CSS and HTML are implemented within my webpart. However I cannot seem to embed (and get to work) the C# code.
    I am trying to use the following within my attachment:
    <script runat="server" language="C#">
    ImageButton lnk = new ImageButton();
    //lnk variables
    this.Controls.Add(lnk1);
    </script>
    This script is within a <div> element that has associated CSS.
    Does anyone know how to get my image button to load on the page?

    hi
    such tricks are not available because of security reasons. First of all html files are not processed by aspx handler, second in Sharepoint you need to make additional actions in order to allow server side code even in page layouts which are more safe than
    attachments, because are added by users with more permissions. So if it would be possible to write server code in attachments it would be huge security hole. However you may use javascript and client object model.
    Blog - http://sadomovalex.blogspot.com
    Dynamic CAML queries via C# - http://camlex.codeplex.com

  • How do I get this code into iBook Author?

    I would like to add an accordion menu to my iBook that will reveal a list of web links when clicked. Here is a link to an example with example code. I'm just not sure how to get this code and it's required external javascript file into iBook author.
    http://www.dynamicdrive.com/dynamici...m?expandable=3
    Any help would be appreciated

    Oops. Thanks. Here is a new link:
    http://www.dynamicdrive.com/dynamicindex17/ddaccordionmenu-bullet.htm

  • Embedding form code into a lightbox

    Hello,
    I am working on a simple test page trying to figure out lightboxes.
    I have it almost functional based on examples I found online, however, I am stuck.
    I can't seem to figure out how to embed my form code into the lightbox successfully.
    Basically, I need to replace the image that pops up with my form.
    My form code is:
    <script charset="utf-8" src="//js.hubspot.com/forms/current.js"></script>
    <script>
      hbspt.forms.create({
        portalId: '206683',
        formId: 'ecaa931c-1fc4-4b96-8aea-b040169f449d'
    </script>
    My test page is located at http://online.saintleo.edu/Lightbox/Lightbox.html.
    As usual, you guys/gals are great and I appreciate all that you do.
    Kind regards,
    JK

    Yes, that it correct.
    Ok, so I switched to FancyBox 2 and am just trying to figure out where/how to embed my form script......
    <script charset="utf-8" src="//js.hubspot.com/forms/current.js"></script>
    <script>
      hbspt.forms.create({
        portalId: '206683',
        formId: 'ecaa931c-1fc4-4b96-8aea-b040169f449d'
    </script>
    My new basic sample FancyBox page is here:
    http://online.saintleo.edu/FancyBox2/FancyBox2.html
    Thanks again for the help, your guidance is greatly appreciated.
    Kind regards,
    JK

  • Embedding Edge code into Kentico CMS

    We would like to implement Adobe Edge into our current CMS (Kentico). Our developer is telling us that Edge creates too many files to upload for it to be effective in our CMS. Can anyone give any insight on embedding Edge files into a CMS? I assume it can be done. Please let me know if more information is needed.

    Hi,
    I think when you have uploaded the edge files to CMS, CMS must have its own directory structure where it segregates the various files as per its type.
    Can you share the directory structure of where the CMS is putting the edge files?
    We might have to modify the edge js files as per the directory structure.
    -Vivekuma

  • Embedding form code into website

    I've tried several times by copying the form code and pasting it into the html coding area of the website and when I go over to the visual side it shows nothing...

    Yes, that it correct.
    Ok, so I switched to FancyBox 2 and am just trying to figure out where/how to embed my form script......
    <script charset="utf-8" src="//js.hubspot.com/forms/current.js"></script>
    <script>
      hbspt.forms.create({
        portalId: '206683',
        formId: 'ecaa931c-1fc4-4b96-8aea-b040169f449d'
    </script>
    My new basic sample FancyBox page is here:
    http://online.saintleo.edu/FancyBox2/FancyBox2.html
    Thanks again for the help, your guidance is greatly appreciated.
    Kind regards,
    JK

  • Can anybody help me set this code into an array?

    Thanks, can you help me understand how to make an array work?
    I need to fade toggle a different country png for each country button and fade out the rest of the country images i.e.: when i click the UK button i need to fade toggle the UK png and fade out the other countries
    when i click the USA button i need to fade toggle the USA ing and fade out the other countries and so on
    sym.getSymbol("Countries").$("UK").fadeToggle();sym.getSymbol("Countries").$("USA","AUS","Hongkong","Switzerland","Ireland","Indias","Japa n","Netherlands","Spain").fadeOut();
    sym.getSymbol("Countries").$("USA").fadeToggle();sym.getSymbol("Countries").$("UK","AUS","Hongkong","Switzerland","Ireland","Indias","Japan ","Netherlands","Spain").fadeOut();
    etc
    but it doesn't seem to work how i have it and i have been told to do an array but I'm not sure how?
    Project here if you want to have a look:
    Dropbox - Countries.zip
    can you help?

    I think this[var = sym.getSymbol (Stanbuttons).$(".UK_stan, .USA_stan"); ] should be
    var myvar = sym.getSymbol (Stanbuttons).$(".UK_stan, .USA_stan");
    And than
    myvar.each(function(){
    $(this).fadeOut();

  • Can I "undeem" my Infinity Blade 2 promotion code? as i have already purchased it before. I got this code from a japanese website. It's like a lottery, and I don't know what is it before redeeming it. is it possible to restore this code?

    as title.
    I will be very appreciated if someone can actually help me to solve this problem.
    Thanks a lot.

    If you are wondering why you are not getting any responses, it is because you have vented a complaint without any details that make any sense or give anyone something to work on.
    If you want help, I suggest actually detailing what has happened, with versions of software etc. Anything that would let us assist.
    As a start I am guessing that you have not really got the hang of "How it all works". Firstly download the Pages09_UserGuide.pdf from under the Help menu. Read that and view the Video Tutorials in the same place. A good addition would be the iWork 09 Missing manual book and something to help you learn how to use your Mac.
    If there are specific tasks you need help with:
    http://www.freeforum101.com/iworktipsntrick/index.php?mforum=iworktipsntrick
    Is a good resource.
    Peter

  • Can I put this code into a SAPscript form?

    Hello experts,
    can I put in a SAPscript window codes like read table, select statement, call function, etc?if not, where would I put conditions like if sy-subrc = 0? because I have a conditon that after calling function 'READ_TEXT' I would check if the sy-subrc = 0 else I would do another select statement and check again its sy-subrc. Thanks guys!

    Hi,
    you can actually call form routines from your SAPscript window. Combined with IF statements (also available in SAPscript) you maybe able to accomplish what you need to do.
    You can find information on all available SAPscript control commands in <a href="http://help.sap.com/saphelp_46c/helpdata/en/d2/cb3d07455611d189710000e8322d00/frameset.htm">help.sap.com</a>.
    If you open <i>SAPscript Control Commands</i> you find the following 2 commands that may help you:
    - Conditional Text: IF
    - Call ABAP Subroutines: PERFORM
    Regards,
    Claus

  • I purchased the new iPad wifi only and now i want to know if it's possible to exchange this iPad into the new iPad wi-fi + 4g?? Money isn't a problem. I can pay the extra money for new iPad. Is it possible ? I'm from germany.

    Thank you for your time

    You can use an iPhone as a personal hotspot (if your carrier supports it), or get a mifi device and use that as a mobile hotspot for it - the iPad will see them as wifi networks.

  • Embed HTML Code Into Mail?

    Hi,
    Is it possible to embed HTML code into an Apple Mail message? If it isn't, this would be a really useful feature. Lots of sites now, such as YouTube and Flickr, provide snippets of HTML code that you can copy and paste into your "webpage". But how useful would it be if you could paste this code directly into an e-mail? That way you could do things such as embed a YouTube video into an e-mail, rather than just provide a link to it.

    You can do it, but it will not be the easiest thing, and it's generally frowned on, since HTML email is used by spammers and marketers to track whether or not you open their emails. It's much easier and more accepted to just send a link to something you want someone to see; not everyone has time time, patience, or affordable broadband to download a web page with an embedded video window.
    You'd have to do the coding yourself, test it to be sure it works when sending and receiving, and then send it to everyone you want to see it. That's a lot of work for no real benefit. According to Apple, Mail in 10.5 allows the sending of HTML using the Stationery feature; have you tested that or checked the Help files for that to see how it's done?
    Mulder

  • Capturing oracle error codes into a variable

    Hi
    Can someone show me how it is possible to save an Oracle defined error code into a variable? What I am trying to do is when a stored procedure fails an Oracle error is raised, such as ORA-xxxx, then pass this code into variable to be saved into a log.
    How do I achieve this?

    user633278 wrote:
    How do I achieve this?Function SQLCODE in PL/SQL exception handler returns error code. SQLERRM returns message:
    SQL> declare
      2      x number;
      3  begin
      4      x := 1/0;
      5    exception
      6      when others
      7        then
      8          dbms_output.put_line('Error code: ' || SQLCODE);
      9          dbms_output.put_line('Error message: ' || SQLERRM);
    10  end;
    11  /
    Error code: -1476
    Error message: ORA-01476: divisor is equal to zero
    PL/SQL procedure successfully completed.
    SQL> SY.

  • How to use at last/ at end of in this code

    Hi,
    i want to do sum for each and every line item of the delivery quantity and compare it with final purchase order quantity if it is equal do not display in the output.(how to use at last/at end of ) in this code,
    below code wat i have ritten is only comparing first record with final purchase order quantity and displaying the output, but i want sum of every line item and compare with final quantity(purchase order quantity)
    if possible try modify this code
    clear:wa_final,wa_kopoo,wa_likpp1.
        loop at it_kopoo into wa_kopoo.
          move wa_kopoo-ebeln to wa_final-ebeln.
          move wa_kopoo-ebelp to wa_final-ebelp.
          move wa_kopoo-matnr to wa_final-matnr.
          move wa_kopoo-txz01 to wa_final-txz01.
          move wa_kopoo-menge to wa_final-menge.
          move wa_kopoo-meins to wa_final-meins.
          move wa_kopoo-werks to wa_final-werks.
          move wa_kopoo-matkl to wa_final-matkl.
          move wa_kopoo-reswk to wa_final-reswk.
          move wa_kopoo-aedat to wa_final-aedat.
          move wa_kopoo-ekgrp to wa_final-ekgrp.
          move wa_kopoo-EINDT to wa_final-EINDT.
        read table it_likpp1 into wa_likpp1 with key vgbel = wa_final-ebeln
                                                     vgpos = wa_final-ebelp.
          if sy-subrc eq 0.
            if wa_final-menge > wa_likpp1-LFIMG.
            else.
              continue.
            endif.
          endif.
          append wa_final to it_final.
          clear:wa_final,wa_kopoo,wa_likpp1.
        endloop.
      endif.

    Hi,
    Try this:
    define one more internal table it_final1 similar to i_final .
    CLEAR:wa_final,wa_kopoo,wa_likpp1.
    SORT it_kopoo BY ebeln ebelp.
    LOOP AT it_kopoo INTO wa_kopoo.
      move-corresponding wa_kopoo to wa_final.
      COLLECT wa_final INTO it_final1.
      CLEAR: wa_kopoo, wa_final.
    ENDLOOP.
    sort it_final1 by ebeln ebelp.
    LOOP AT it_final1 INTO wa_final.
      READ TABLE it_likpp1 INTO wa_likpp1 WITH KEY vgbel = wa_final-ebeln
                                                   vgpos = wa_final-ebelp.
      IF sy-subrc EQ 0.
        IF wa_final-menge NE wa_likpp1-lfimg.
          APPEND wa_final TO it_final.
        ENDIF.
      ENDIF.
    ENDLOOP.
    Regards,
    Subramanian

Maybe you are looking for