pf_call

Home Forum General pf_call

This topic contains 8 replies, has 3 voices, and was last updated by  Dennis @ PerfectForms 5 years, 5 months ago.

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #854

    phillip
    Participant

    I am trying to get data into an embedded form, but I’m having trouble. By using the excellent example found in this previous post, I think I’ve been able to set up the javascript correctly.

    http://www.perfectforms.com/forums/topic/request-for-code-sample#post-1495

    My Code:

    <html>
    <body>

    <script type="text/javascript">
    var ID="12345678";
    var PID=123456;
    pf_call("XXXXXX=", [ID, PID]);
    </script>

    <script type="text/javascript" src="http://app.perfectforms.com/utils.js?"></script>

    <script type="text/javascript">
    pf_embed("http://app.perfectforms.com/player.swf?3.2.0.4", "XXXXXX=", "f=XXXXXXXX", "612", "592", "window");
    </script>

    </body>
    </html>

    (Note: I’ve replaced my form data with X’s for security purposes).

    However, I can not get the information to populate my field in the form itself. I am setting the desired field by using “Get External Call Parameter” and an index of 1, but to no avail. Does anyone know what I am doing wrong here?

    Thanks in advanced!

    #5897

    Please see this page in our help guide: http://www.perfectforms.com/Documentation/manual/html/?fg_calling_javascript_from_a_form.htm

    You need to use a Call JavaScript behavior object. In the properties of that object there is a place to indicate Return Value Target (the field into which you want the return value to be placed).

    Workflow software, Process software, Procedure software

    #5905

    phillip
    Participant

    Okay, so I looked at the help page, but I can’t get the form to call the javascript. I even tried to get the example to work by using the provided html code (which is in the form), but it doesn’t work either.

    Is pf_call not a way to pass in parameters to the embedded for just as you do when passing variables through the URL when clicking a link?

    I’m a bit frustrated with this, any more help would be appreciated!

    #5906

    Is the JavaScript in the web page in which the form is embedded? Did you then publish the form and run it from the web page?

    #5907

    phillip
    Participant

    Yes, I can send you the file I’m testing with if you’d like.

    #5911

    If you just want to pass variables to the form then just pass it using the queryString.

    http://app.perfectforms.com/player.aspx?f=XXXXXX&variablename1=value1&variablename2=value2

    There is an alternative way to get the values passed to form using Javascript.

    http://www.perfectforms.com/Documentation/manual/html/fl_call_javascript_properties.htm?zoom_highlightsub=javascript

    http://www.perfectforms.com/Documentation/manual/html/fg_calling_javascript_from_a_form.htm

    See the above examples and you should be able to implement it. Also, if you are using On-Demand system then the javascript can be used only on embeded scenario, because the scripts cannot be implemented on our server.

    #5912

    phillip
    Participant

    I’ve used the queryString method before and it seems to work great, but the form needs to be embedded, so that wont be an option.

    The examples you and Dennis mentioned I’ve looked at. I even tried to replicate the example by using the code given (though it was outdated). Using the form found on the “Calling Javascript from a Form” and the code example found on that form, here’s a trimmed down version of it I’m trying to get to work:

    < !DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">



    %MINIFYHTML67bc0bc19c5879d5eeefc4136e9e44f911%



    %MINIFYHTML67bc0bc19c5879d5eeefc4136e9e44f912%

    %MINIFYHTML67bc0bc19c5879d5eeefc4136e9e44f913%

    %MINIFYHTML67bc0bc19c5879d5eeefc4136e9e44f914%

    It wont work when I click the buttons like on the help page. This makes me think I’m doing something wrong or something isn’t mentioned?

    #5918

    phillip
    Participant

    Just thought I would see if anyone has had any “breakthroughs” on this or seen where I might have made a mistake.

    #5920

    As previously stated, the form must be embedded in a web page that contains the JavaScript.

    Workflow software, Process software, Procedure software

Viewing 9 posts - 1 through 9 (of 9 total)

You must be logged in to reply to this topic.