Execute JavaScript and Button

Hello Forum,
I have a project anomaly. I have created about ten captivate
projects, all using a similar (almost identical) menu system.
This is basically an ending slide with three buttons on it.
One button has an Execute Javascript action tied to it. my code
there is a function to open a separate browser window when the
button is clicked. I wrote the function to open the window in the
"standard.js" file that Captivate publishes. I am using Captivate
3. In 8 of these projects, when the button is clicked it opens the
browser window.
In two of thses projects the button makes a nice click sound,
I see a quick screen/window flash, but no new browser window!
Same button same code same standard.js file.??? I checked a
button that works, and compared its properties to one that does not
work, they all have the same numbers, etc. I gave up.
Then I copied a button that works from an app that works, and
copied that button on to the project where the button did not open
the window. Deleted the "bad" button, revised the link address in
my call to the function: wopen("
http://info.mysite.com"); and
this works!
I have been using the standard Text button for these apps.
Any ideas on this one??? the publishing for the programs is
all the same (Flash Player 9, etc)
Thanks,
eholz1

@Erickj:  Either do what Rod stated (adjusting your Flash Security settings) or test your content from a true web server.  Flash automatically trusts content coming off a true web server where the web address begins with http or https and ends in .htm or .html. 
The nice thing about Cp 7 is that it has a built-in web server so you don't run into issues like this when testing your content.

Similar Messages

  • Executing Javascript with button

    How can I go about executing javascript with an item level button?
    In the HTML DB 2 day tutorial it says this:
    Calling a JavaScript from a button is a great way to confirm a request. Oracle HTML
    DB actually uses this technique for the delete operation of most objects. For example,
    when you delete a button, a JavaScript Alert Box appears asking you to confirm your
    request. Consider the following example:
    <script language="JavaScript1.1" type="text/javascript">
    function deleteConfirm(msg)
    var confDel = msg;
    if(confDel ==null)
    confDel= confirm("Would you like to perform this delete action?");
    else
    confDel= confirm(msg);
    if (confDel== true)
    doSubmit('Delete');
    </script>
    This example creates a function to confirm a delete action and then calls that function
    from a button. Note that the function optionally submits the page and sets the value of
    the internal variable :REQUEST to "Delete," thus performing the delete using a process
    that conditionally executes based on the value of request.
    Note that when you create the button you would need to select the Action Redirect to
    URL without submitting page . Then, you would specify a URL target such as the
    following:
    javascript:confirmDelete('Would you like to perform this delete action?');
    Can I only do this from a region button?

    hi,
    I have created a javascript form validation and finally (if its passes the validation) I am setting the :REQUEST as doSubmit('GO');
    I am calling a conditional process with condition as request = expression1
    with expression 1 as GO.
    The javascript is as follows
    function message_name_not_null(){
    if(document.getElementById('P14_MESSAGE_NAME').value.length==0)
    alert("Message Name is Mandatory!!");
    return;
    else if(document.getElementById('P14_MESSAGE_TEXT').value.length==0)
    alert("Message Text is Mandatory!!");
    return;
    else
    doSubmit('GO');
    My problem is my process is not getting called in button click(I have called the javascript from this button as javascript:message_name_not_null(); in Optional URL Redirect section)
    I have specified the :REQUEST value in the branches also.
    Any sort of help please..
    Thanks in Advance
    Kaushik

  • Javascript and button requests

    hi,
    my first question here, hope i can get an answer :)
    my problem is, that i have some javascript in the html header. now i have 1 optional part which depends on a button request (the button is redirecting to the same page). the problem is, that this part (function) has to be executed right in the middle of the main code.
    all i want is something like this:
    if ( - button request is given - )
    do_something();
    is there any feature for that?
    thanks in advance,
    jR
    (sorry i'll register right away) ^^
    Edited by: user8657310 on Aug 3, 2009 6:03 AM

    I'm not quite sure I understand the question, so let me restate it and see if I get it right.
    Let's assume you have a JavaScript function on your page called myFunction().
    Let's also assume that you have a button on your page who's request value is "REQ1". The button is set up so that when it is pressed it submits the page and is redirected back to the same page.
    I believe what you are saying is, you want to have a PROCESS that does something like this.
    BEGIN
      ... DO some PL/SQL...
      IF REQUEST = "REQ1" THEN
        execute myRequest() JavaScript function;
      END IF;
      ... Maybe do some more PL/SQL ...
    END;Correct? Or have I misunderstood...
    As far as I am aware, it's not possible to execute JavaScript from within PL/SQL. They are two different engines; PL/SQL residing in the Database and JavaScript residing in the browser. It's not really possible for a PL/SQL routine to temporarily pass control to the calling browser as it really has no idea that it was called from a browser in the first place.
    Perhaps if you describe what you're trying to achieve, we could help you decide the best way to implement it.
    Hope That Helps,
    - Doug -
    http://sumnertech.com/

  • CP5: Problems with Execute Javascript and New/Current window setting

    Hello everyone,
    I am at my wits' end trying to set this up properly, and I was hoping for some help.
    I have inserted a series of buttons designed to open other captivate-created HTM files. I wanted the files to be opened in a controlled window, so I used Execute_Javascript function on the buttons. Here is the code I am using:
    void window.open('filename.htm','name','height=680,width=906,left=0,top=0');
    I enter that code in the script window. I also want to set it to open in a new window (not reuse the current window), so I used the arrow to the right of the Script_Window button and set it to "New."
    When I publish and put it all up on a SharePoint server, it works fine. But then I had to correct a typo on one of my slides (unrelated to this functionality), so I corrected it and republished. The buttons which were working moments before now no longer function. It seems that the "New" setting I had set in the drop-down had reverted to "Current" without me touching it. The Javascript also stopped working. Clicking the button sometimes launches the file in the current window, sometimes in a new window, and sometimes the launch itself fails.
    Captivate just seems to forget the New/Current setting all by itself. And for some reason, the actual launching of the file via Javascript also just stops working.
    As a test to fix the non-functioning Javascript, I deleted the word "void" then saved the CPTX. Then I added the word "void" back in, saved it again, and published, and now it works. I can't make heads or tails of this, and it is very frustrating, especially since it will delay the delivery of my files.The javascript reads the exact same and yet sometimes it works and sometimes it doesn't.
    Has anybody seen this before? How on earth do I fix it?
    Thanks!

    Hi Jim,
    Thanks for the feedback. It's good to know that the New/Current issue is a bug and it's not just me.
    I tried your suggestion, and I am still having the same problem. I also tried switching to Open File or URL and entering this:
    javascript:void window.open('filename.htm','name','height=680,width=906,left=0,top=0' );
    Same problem. Sometimes it works and sometimes it doesn't. Code is exactly the same. I can literally put the code in and publish, it works fine, then I can go back into the project, change something completely unrelated (i.e., not touch the javascript), publish again, and now it doesn't work.
    Thanks for any additional feedback.

  • Why does my Preview(SWF) execute javascript, and my published SWF does not?

    I've discovered that in my project, if I run it as a preview in SWF mode, it executes the javascript on step enter.  If I publish the project and produce SWF output, then run {project_name}.htm, but I get no javascript events.  Any isea what I may be doing wrong?

    See this post:
    http://www.infosemantics.com.au/adobe-captivate-troubleshooting/how-to-set-up-flash-global -security
    Note the section that tells you about needing to set the published folder location as a trusted location in Flash Global Security if you want JavaScript to work.

  • Execute javascript after update and submit in Skillbuilders Modal Page

    Hi,
    I'm editing, say, list of my employees in a tabular form opened in Skillbuilders Modal Page.
    I have to execute same javascript code after the changes in the tabular form have been submitted.
    I've tried using a Dynamic Action fired on Page Load, but that gets executed before the update is completed.
    Does anyone have an idea how to accomplish this?
    Thank you!

    Thank you for your answers.
    Yes, I'm trying to execute javascript code on the child page, the modal one.
    Basically, there's a button on my parent page which opens the modal page. The modal page has buttons Cancel, Delete and Save. Clicking Save button submits the changes and if there are errors, errors are shown and we stay on the modal page.
    My modal pages are all of fixed dimensions and if there are errors, I have to adjust the other regions (adjust their height, add a scrollbar, etc) in order to show everything in the modal page.
    I have written a function that does exactly that, but I have to execute the function after the page is loaded and the regions are shown. But, if I execute it using onload attribute, or setting a dynamic action which fires on page load, the function gets executed during the submit, before the regions are shown.
    I hope I have managed to clear up the problem.
    As always, thank you.

  • Add JavaScript to boxes and buttons

    This question was posted in response to the following article: http://help.adobe.com/en_US/captivate/cp/using/WS5b3ccc516d4fbf351e63e3d119e9581edd-7feb.h tml

    This article is talking about a click box object in Captivate, not a text caption. Clickboxes and buttons in Cp are interactive objects that can be used to trigger Advanced Actions, one of which is to execute JavaScript code.
    You CAN make a text caption clickable by attaching an Event Handler widget to it.  This effectively turns the text caption into an interactive object capable of executing Advanced Actions in response to mouse events.  However, there is no Advanced Action that will turn your text caption into a scrolling caption.

  • Using "Execute Javascript" to mark a course as Complete. 

    I am using a 3rd party Flash-based player (Flashform) to
    bundle Captivate and Flash made SWF files into a SCORM 1.2 package.
    My final SWF is a Captivate assessment, which, if passed, should
    change the course lesson status to “completed”. Can I
    accomplish this by using “Execute Javascript” on a
    button and run something like:
    “FSCommand("LMSSetValue","cmi.core.lesson_status,completed");”
    Any advice is greatly appreciated.
    Jon

    If you were using only the Captivate-published files for
    SCORM, it would likely be fairly straightforward to do what you're
    looking for.
    Unfortunately, since you're using a 3rd-party player, you'll
    have to consult the documentation for the player to determine which
    capabilities it exposes and how you can access those capabilities.

  • Using Adobe Acrobat - Is it possible to execute JavaScript to report to LMS to track pdf was viewed?

    Question:  Using Adobe Acrobat - Is it possible to execute JavaScript to report to LMS to track pdf was viewed?
    What I would like to do is to create a pdf with an Acknowledgement button that when click will report (via JavaScript) to the LMS (Learning Management System) that the end user viewed/acknowledged the pdf.
    Can this be down with JavaScript in this fashion?

    Thanks, (My fault, as I should have specified this.) Due to legacy reasons I need to use ie, and so I can't use the PrintPdf firefox plugin. So from reading the rest of that thread, the best method does seem to be to get hold of a copy of acrobat, and add a Print() script in each file, and open it in a new tab.
    At least it gives me somethigin to try anyway :-)

  • Issues with Executing Javascript command in Captivate

    Hi,
    I am having issues with executing javascript for a button in adobe captivate 5.  Let me explain what I am trying to do.  I am working on a WBT that has three skill checks throught the course. These skill checks are not graded or tracked for completion.  I currently have an image button that has the command "Open another project" The first image button is pointed to SkillCheck1 and I have the html file and swf file in the published root folder.  This currently works fine.
    However I want to use javascript to open a new window 800X600 with not toolbars at the top.  I got this part working with the code below:
    window.open('http://www.adobe.com','mywin',
    'left=40,top=40,width=800,height=600,toolbar=1,resizable=0');
    My only problem is, once the popup opens, my WBT goes to a page that says [object] and thats it.  I am uploading two images to show what I have.  Can someone help resolve my issue of the WBT going to

    Ok so I took this link and viewed over it.  I am new to Javascript and know very little about it.  Therefore this script kind of makes no sense to me.
    <script language="JavaScript"><!--
    var windowHandle = '';
    function myOpen(url,name,attributes) {
        windowHandle = window.open(url,name,attributes);
    //--></script>
    <a href="javascript:myOpen('page.htm','windowName','height=100,width=100')">text link</a>
    I chose the option to exectute javascript.  Does captivate need all of this including <script language=JavaScript">  Here is how I edited the script.  Should I make any changes to what is in bold?
    var windowHandle = ''; 
    function myOpen(url,name,attributes) {
        windowHandle = window.open(url,name,attributes);
    <a href="javascript:myOpen('http://www.adobe.com','Adobe Website','height=600,width=800')">text link</a>

  • Execute Javascript after *.jspx page rendered

    I have a page with controls and a subform with a servlet, rendering a jasper report:
                   <af:panelFormLayout id="pfl1" partialTriggers="cbReportHTML">
                    <af:subform id="sfRep">
                      <jsp:include page="/jasperservlet" flush="true"/>
                    </af:subform>
                  </af:panelFormLayout>
    I want the page to be rendered before the subform (so that user can see controls on page before the report).
    "/jasperservlet" generates the report in about half a minute.
    I want to have a JavaScript that runs after the page is rendered (and the user sees the controls) and then it starts to generate report.
    I tried to put a frame with such javascript, but the javascript is executed before user can see controls.
    How can it be done?

    Thank you for your answers.
    Yes, I'm trying to execute javascript code on the child page, the modal one.
    Basically, there's a button on my parent page which opens the modal page. The modal page has buttons Cancel, Delete and Save. Clicking Save button submits the changes and if there are errors, errors are shown and we stay on the modal page.
    My modal pages are all of fixed dimensions and if there are errors, I have to adjust the other regions (adjust their height, add a scrollbar, etc) in order to show everything in the modal page.
    I have written a function that does exactly that, but I have to execute the function after the page is loaded and the regions are shown. But, if I execute it using onload attribute, or setting a dynamic action which fires on page load, the function gets executed during the submit, before the regions are shown.
    I hope I have managed to clear up the problem.
    As always, thank you.

  • Captivate 3 Published file won't execute JavaScript

    Pulbished Captivate 3 course.   Final screen has an exit button with the following script:  ab_SetScoreStatus(100,'completed');ab_CloseWindow();       When I post the course to our LMS it uploads fine, but when I try and run the course I get an error when I click on the Exit button and it doesn't do anything.   I had someone try the same thing on their computer and it works fine for them so I'm thinking it's something with my settings.   This used to work for me but then I got a new computer so not sure if the settings (IE, Flash or ????) are different or what.   I'm running Flash 10, and IE 8.   Any help would be greatly appreciated.  Thank you.

    Good morning Rick, and thank you for trying to help.
    Sheri Delaney
    From: Captiv8r [email protected]
    Sent: Wednesday, February 16, 2011 3:59 PM
    To: Delaney, Sheri
    Subject: Captivate 3 Published file won't execute JavaScript
    Welcome to our community
    See if the following links help.
    http://forums.adobe.com/thread/473021#5
    http://forums.adobe.com/thread/473021#10
    Cheers... Rick
    http://www.robowizard.com/pc.gif
    Helpful and Handy Links
    http://www.Adobe.com/cfusion/mmform/index.cfm?name=wishform&product=5
    http://www.ShowMeSolutions.biz
    http://sorcererstone.wordpress.com/
    http://www.gooberguides.com

  • Execute Javascript, window.print(), prints blank page in Captivate 7

    Hello,
    I'm fairly new to Captivate, and am no Javascript expert.  I've been trying to figure out how to print the last slide in project, which has a custom certificate.  I initially tried the print widget that comes with Captivate 7, but the scaling is off when printed.  There are no options to change the scale of the printed slide on the widget properties, so that seemed to be a bust.  I then tried to create a button to execute javascript when clicked.  In the script window I put, window.print(); now this works to bring up the print box, but only prints a blank page.  I'm not sure if it's something I'm doing wrong with javascript.  I've been reading other forum posts, and this function seems to work for others using different versions of Captivate.
    I know there is a cool print widget that someone has made, but I'd actually prefer to just do this with javascript.  I haven't tried the buyable print widget yet, but I am trying not to use widgets so that the html can be scalable. 
    I'm publishing my projects and uploading them to GoogleDrive, where I then preview the html output.
    I'd appreciate any help.  Thanks!
    Kailey

    Wow, thank you for such a speedy response Rick.  I've actually been using Firefox and Google Chrome, because IE isn't updated enough to work with Google Drive properly (and I don't want to go through the whole process to get privileges to update on work computer).  But I did check this box in Firefox.  Instead of printing the objects on my slide, it printed a big square light grey background.  It's almost like the the browser can't see the project.
    I would think this was a browser problem, but I had previously downloaded a trial of Articulate (trying to decide between the two), which has the same execute javascript function as Captivate.  Putting in window.print();, publishing, and uploading to Google Drive, printed just fine.  Not sure if something in the code in Captivate isn't coming through, but is in Articulate.  I'm not versed in html or javascript enough to compare the two html files. 
    Back to the drawing board!  Thanks for your help.
    Kailey

  • Javascript print button problem in C4

    Hi Everyone,
    I'm currently using Captivate 4 and would like to allow users
    of my tutorial to print off slides. I created a button which
    executes javascript to do this. The problem is not that this
    doesn't work at all, it's just that it isn't working when I publish
    to Flash player versions higher than 7. Any ideas you might be able
    to share with me on how to fix this will be very welcome.
    Many thanks.

    I suspect that the problem has to do with the added security
    included in Flash 8 and above that restricts javascript. If you
    search the flash player KnowledgeBase on Adobe.com you'll find more
    detailed information about fixes, but here is what worked for my
    Javascripted items.
    Find your Program Files > Adobe > Adobe Captivate 4
    > Templates > Publish folder. Within the folder is a
    standard.htm file. Open this file (for this simple task, i just use
    notepad). In the script section, add...
    so.addParam("allowScriptAccess", "always");
    you'll see other similar param declarations. It doesn't
    matter the order.
    You can edit the individual .htm file if you want to test
    this first.
    That should do it.
    Here is the KB article that discusses the security features
    in greater detail:
    http://www.adobe.com/devnet/flashplayer/articles/secure_swf_apps_04.html

  • Javascript Submit button onclick event handler

    Hi,
    I am having trouble getting the onclick event handler of a form to execute when the button is pressed. I am trying to open a page in a new window depending on if the user selects that option in a checkbox.
    There is one form(id='graphform') and 2 submit buttons, each with a checkbox before it. I want the new window to open only iuf the right checkbox and matching submit button has been checked.
    One of the checkbox/button pair: The onclick="checkWindow('w1','graphform');" is never getting called.
    <input type="checkbox" id="w1" name="win1" style="margin-right: 10px" value="window"  onclick="javascript:document.gform.win1[0].checked = true;"><a style="margin-right: 10px">Graph in new window</a>
    <input type="submit" value="Create graph" onmouseover="this.form.cumulat.value='0';this.form.graphGroup.value='Consumption'; document.getElementById('hintSubmitStop').value='1';" onclick="checkWindow('w1','graphform');" onmouseout="document.getElementById('hintSubmitStop').value='0';" /></td></tr>Javascript window opener:
    function checkWindow(win1, str){
              var formObj = document.getElementById(str);
         var checkBoxObj = document.getElementById(win1);
         if(checkBoxObj1.checked == true){
                   formObj.target = "_blank";     
                   formObj.action = "graphDisplayFrame.jsp";     
         else if(checkBoxObj1.checked == false){
                   formObj.target = "_self";
                   formObj.action = "graphDisplay.jsp";
    }Any suggestions?
    J

    You're storing the value in "checkBoxObj" and in the next line you use different variable name as "checkBoxObj1".
         var checkBoxObj = document.getElementById(win1);
         if(checkBoxObj1.checked == true){
    instead of "true', try      if(checkBoxObj.checked == 1){

Maybe you are looking for

  • Goods issue in past date

    Hello, I notice that i can issue more than the available quantity of a material in past date. The material i issued had 15 PCS at 5/6/2010 and 30 PCS at 11/6/2010. I issued 18 PCS with posting date 6/6/2010. Then i issued the rest but i couldn't issu

  • Need help with VI for a DIO 6509 card.

    I need to create ONE VI to control different lines on the DIO 6509 card.  I want to be able to input the VI with the port/line i want to control and then also input it with the state, 0 or 1.  How can i do this with / or without the Assistant.   It s

  • Unsuccessful export of foreign languages to Word

    I have a document written in English that contains Greek and Turkish words and phrases and I have exported it to Word from Pages (v 3.0.2) and sent it on in that form thinking all was well. The recipient needs to convert the document from Word to Pag

  • How to filter mail from an unknown ip address?

    I keep getting spam from different email addresses, and different ip addresses that have a common look and feel.  They generally are sent from some made up name, from some made up host, and have a one line description like "Save Money today, just go

  • Storing Word Documents on SAP

    What is the best method to store Word documents on SAP?  I have a requirement for developers to create unit test scripts and then load them into SAP to enable them to be referenced by other programs.  They will have to be stored within a certain hier