Linking to external java script

Is there a way to link a button in a swf to a java script. I'm trying to use the "lightbox" java script so that when a user clicks on an image in the swf, a larger image appears on top of the page. Here is what the link looks like in html:
<a href="images/image-1.jpg" rel="lightbox" title="my caption">image #1</a>
Can anyone tell me how to code this in Flash?
Thanks!

you can use the externalinterface class in flash to call js functions in the embedding html but, i don't see any js in the code you posted.
addendum.  you'll need to check the javascript files that use that lightbox method.

Similar Messages

  • How access external java script function

    I need to acess external java script function.

    how to include js file in struts can u write plsWhat makes you think that this is the right place for Struts support?

  • How do I execute a custom "action" from an external java script against a CS6 Illustrator document? Or perform the "fit to arwork bound" selection in the "Objects/Artboards" drop down menu from a script?

    I have to modify several thousand pieces of art and need to perform this action on all the files in a given folder, then save them to a separate folder.

    Hi,
    You mean the marketers list has to be preloaded when the page loads itself the very first time. For this to work, you need to make a jdbc call before the page loads and set the marketers list in the request or session.
    For eg in your jsp where you want to display the marketers name dropdown, you can add,
    <%
    try {
      // Load the DB2(R) Universal JDBC Driver with DriverManager
      Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    } catch (ClassNotFoundException e) {
         e.printStackTrace();
    Connection conn = DriverManager.getConnection
      "jdbc:oracle:oci:@myhost:1521:inst1", "scott", "tiger);
    Statement stmt = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);
    ResultSet rs = stmt.executeQuery("Select mktr_id, mktr_name from MARKETERS");
    int iCount = 0;
    rs.last();
    iCount = rs.getRow();
    rs.beforeFirst();
    String [][] mktrs = null;
    mktrs = new String[iCount];
    while( rs.next() )
       i++;
      // retrieve column data
      // do something with it
          mktrs[i] = new String[2];
          mktrs[0] = rs.getString(1);
    mktrs[i][1] = rs.getString(2);
    if( iCount == 0 )
    System.out.println(
    "myResultSet returned no data.");
    %>
    Now you can use the mktrs string array to populate the ropdown as described earlier.
    Cheers,
    vidyut

  • Business Objects Dashboard External HTML/JAVA Script Link - User Authentication Depolyment Q

    <p>Hello,</p><p>I have a rather unstructured problem here and am relatively new to Business Objects Enterprise. </p><p>We have users who are authenticated through Business Objects. The login sets their access levels and permissions. In addition to the BO reports, we would also like to link through BO Dashboard a JAVA Script webpage.</p><p>The JAVA Script and Business Object software sits on the same webserver.</p><p><strong>The problem is that through BO Dashboard and also an external URL link we can only pass a static link (i.e. /some directory/some doc.html) and not a dynamic userid with the URL, which changes based on the user (i.e. /some directory/some doc.jsp?UID=user1).</strong></p><p>The solution might be to insert a Business Object API call that can determine the user who is currently logged in? Or, if there is some way around the static html link through Business Objects Dashboard?</p><p>Any ideas or thoughts would be deeply appreciated.</p><p>Thanks,</p><p>Joe</p>

    Are you setting Business Objects up as an external application?
    If so, what parameters are you using to set it up?
    Based on the fact that you're seeing the basic auth dialog, you probably need to specify
    that it's using basic auth -- not GET.

  • In pdf file need java script to clear cache before launch of web link

    using adobe acrobat XI - have pdf file with link to external web site.
    When creating the link in the link properties selected action Run a JavaScript  the following java script was added to ensure will open in new window. app.launchURL("http://google.com", true)
    this works most of the time except with some users - if those users clear their browser cache first then it works
    Is there anything that could be added to the java script to ensure the browser cache is cleared or not used before the launch action? or any other suggestion to ensure the link will always open in new window?
    Thanks,
    Jackie

    thanks for your prompt reply.
    Was hoping maybe there would be someway to clear the cache for the users
    without them having to do anything.
    Appreciate your help.
    Jackie
    Thanks,
    Jackie
    276.783.6991 x 326

  • Is there any way to determine if a link is a book mark or hyperlink in java script

    Is there any way to determine if a link is a book mark or hyperlink in java script
    Sub Problem:
    I am making an array of quads of all the hyperlinks in a document. I would like to automatically skip over all the bookmarks in the starting pages of a document and just get the links of the hyperlinks.
    Now I have to manually set the pages that contain bookmarks so they are not included in the array.
    Is there any way to determine if a link is a book mark or hyperlink in java script?
    It would help automate the conversion I need below
    John
    Main Problem:
    I have been working on converting a set of pdf files with 1000’s of hyperlinks like www.site.com\folder1\file1.pdf#page=10
    To jump to a local copy of the files with a relative type link
    ../folder1/file1.pdf and then go to the proper page.
    I have found that it can be done manually by changing the hyperlink to a javascript
    var otherDoc = app.openDoc('../folder1/file1.pdf', this);otherDoc.pageNum = 10 - 1;
    and setting each destination file with a disclose()=true;
    Based on the help so far that java script cannot access the hyperlink value in a link
    See: http://forums.adobe.com/thread/1039908?tstart=60
    I have resorted to the following plan using acrobat javascript, an external keyboard macro recorder and excel in combination to get around the problem
    Four folder level acrobat javascripts with “buttons”
    One to get all the link quads in an array, in the pdf and report the total number
    The second creates a form field in the far corner of the first page and moves there.
    The third jumps to each link found by creating a form field just to the left of the link and zooms in so it can be selected by a “mouse click” from the keyboard macro recorder 
    The forth deletes the form field
    The keyboard macro recorder runs javascript 2 and then 3 then clicks on the link just to the right of the middle of the screen and uses keys to get to the advanced editing to get to edit the hyperlink .
    The hyperlink is then copied to excel where it is converted using string functions to the needed javascript text to be copied back.
    To the acrobat file into a java script (after deleting the hyperlink)
    Rinse/lather/repeat
    I have been able to convert about 150 links an hour.
    Better then hand typing, but not like having java access to the links.
    I am looking to improve the solution

    thanks for your help.
    I may have been confusing a "acrobat bookmark" and a bookmark in a word file that is converted to a pdf and ends up being a
    link of the type:
    "Go to a page in this document"
    which I do not want in my array vs
    a link of the action type:
    "Open a web link"
    Which I do want
    John
    My code, note how I have to skip pages with "Go to a page in this document" links depending on the document, I would like to use the same code for each document and skip over the "Go to a page in this document" links :
    global.ilinkindex = 1; 
    global.aLinkquads = [ [0, 1, 1, 0, 0],
           [0, 0, 0, 0, 0] ];
    function GetLinkArray()
    global.ilinkindex = 1;
    var iTotalLinks=0;
    // for ( var p = 0; p < this.numPages - 8 ; p++)                   // end before bookmarks for each page of the file x.pdf
    //  for ( var p = 0; p < this.numPages; p++)                     // for each page of the file
    for ( var p = 23; p < this.numPages; p++)                     // start after bookmarks for each page of the file y.pdf
      var cropbox = this.getPageBox("Crop", p);
      var alinksonpage = this.getLinks(p, cropbox);            // get array of links on page
      for ( var ll = 0; ll < alinksonpage.length; ll++)
       var linkquads = alinksonpage[ll].rect;     // get link Quads
       linkquads[4] = p;          // add page number to link Quads array
        global.aLinkquads[global.ilinkindex] = linkquads; // add quads to global link Quads array
        global.ilinkindex++;
    iTotalLinks = global.aLinkquads.length - 1;
    global.ilinkindex = 1;
    app.alert("Number of Links in Document is " + iTotalLinks );

  • How can I link to pages in a 2 level popup index/selection tree with java script?

    I can do a single level popup index using the java script below (#1) and link the selections to pages but to change to a  2 level popup index selection tree as below (#2) I can't seem to figure out how to link to pages. Any help greatly appreciated. Thanks
    1
    var itemIndex = app.popUpMenu("INTRODUCTION", "ALPHABET", "GRAMMAR", "NUMBERS", "DATES & TIME", "GETTING TO KNOW PEOPLE", "PHRASES FOR LEARNING", "DIRECTIONS & TRANSPORTATION", "DESCRIBING THE TRAIL", "DO'S & DON'TS", "EQUIPMENT", "FOOD", "INTRODUCING A VILLAGE", "CULTURE AND ETHNIC GROUPS", "HANDICRAFTS", "TEMPLES & MONKS", "AGRICULTURE", "ANIMAL HUSBANDRY", "SCHOOL & EDUCATION", "LEADING A TREK", "NATIONAL PROTECTED AREAS", "IDENTIFYING WILDLIFE", "PLANTS & FORESTS", "BOATS", "CAVES", "HEALTH AND SAFETY")
    switch (itemIndex) {
    case "INTRODUCTION":
    this.pageNum = 1
    break
    case "ALPHABET":
    this.pageNum = 2
    break
    case "GRAMMAR":
    this.pageNum = 5
    break
    case "NUMBERS":
    this.pageNum = 30
    break
    case "DATES & TIME":
    this.pageNum = 35
    break
    case "GETTING TO KNOW PEOPLE":
    this.pageNum = 42
    break
    case "PHRASES FOR LEARNING":
    this.pageNum = 56
    break
    case "DIRECTIONS & TRANSPORTATION":
    this.pageNum = 59
    break
    case "DESCRIBING THE TRAIL":
    this.pageNum = 63
    break
    case "DO'S & DON'TS":
    this.pageNum = 68
    break
    case "EQUIPMENT":
    this.pageNum = 74
    break
    case "FOOD":
    this.pageNum = 83
    break
    case "INTRODUCING A VILLAGE":
    this.pageNum = 96
    break
    case "CULTURE AND ETHNIC GROUPS":
    this.pageNum = 105
    break
    case "HANDICRAFTS":
    this.pageNum = 120
    break
    case "TEMPLES & MONKS":
    this.pageNum = 126
    break
    case "AGRICULTURE":
    this.pageNum = 131
    break
    case "ANIMAL HUSBANDRY":
    this.pageNum = 140
    break
    case "SCHOOL & EDUCATION":
    this.pageNum = 145
    break
    case "LEADING A TREK":
    this.pageNum = 151
    break
    case "NATIONAL PROTECTED AREAS":
    this.pageNum = 155
    break
    case "IDENTIFYING WILDLIFE":
    this.pageNum = 161
    break
    case "PLANTS & FORESTS":
    this.pageNum = 169
    break
    case "BOATS":
    this.pageNum = 175
    break
    case "CAVES":
    this.pageNum = 178
    break
    case "HEALTH AND SAFETY":
    this.pageNum = 182
    break
    2
    var aINTRODUCTION = ["INTRODUCTION", "How to Use This Book", "Format"];
    var aALPHABET = ["ALPHABET", "Vowel Sounds", "Consonant Sounds"];
    var itemIndex = app.popUpMenu(aINTRODUCTION, aALPHABET);
    Thanks.

    Thanks. I've got it now. I was mistakenly renaming itemIndex to each section...Introduction, Alphabet

  • Column link - call java script & assign current report column value to item

    Hi,
    How to call java script and assing current report column value to item?
    I have a button column in the report to 'delete' the selected row.
    I want to first show dialog box with message 'Are you sure?'. If yes, process to delete
    will be executed, else no action.
    In order to fire JS, I used Column Link ->Target=URL.
    Problem: The alert is showing but I don't know how to pass selected row's primary
    key value to process (to delete selected row).
    I have a item which can be used to store selected primary key value but don't know how to assign the value
    when button pressed.
    Thanks in advance
    Dip

    Ok. The issue has been resolved by following way.
    PAGE PROCESS: delete_request
    begin
    delete xyz
    where id = :P8_id;
    commit;
    end;BUTTON URL:
    javascript: DelRec(null,'CREATE', 'f?p=&APP_ID.:8:&SESSION.:delete_request:NO::P8_id:#id#');Java Script:
    <script language="JavaScript1.1" type="text/javascript">
    function DelRec(msg, req, url){
    var confDel = msg;
    if(confDel ==null){
    confDel= confirm("Are you sure?");
    }else{
    confDel= confirm(msg);}
    if (confDel== true){
    redirect(url);           }
    </script>

  • Whenever I use facebook I'm getting this error message [Java Script Application] Error: options is undefined whenever I click on a link. What can I do to fix this problem? Easy step by step instructions please.

    When I use facebook, I keep getting this message [Java Script Application] Error: options is undefined whenever I try to return something, click on a link, or message, open a game, etc. ... I have Windows 7, addons of greasemonkey and better facebook (which seems to have disappeared)
    == URL of affected sites ==
    http://www.facebook.com/reqs.php#!/?ref=home

    Start Firefox in [[Safe Mode]] to check if one of your add-ons is causing your problem (switch to the DEFAULT theme: Tools > Add-ons > Themes).
    See [[Troubleshooting extensions and themes]] and [[Troubleshooting plugins]]
    If it does work in Safe-mode then disable all your extensions and then try to find which is causing it by enabling one at a time until the problem reappears.
    You can use "Disable all add-ons" on the [[Safe mode]] start window to disable all extensions.
    You have to close and restart Firefox after each change via "File > Exit" (Mac: "Firefox > Quit"; Linux: "File > Quit")

  • Calling java script from link

    Hi,
    I have a link on the page, when i click on the link i should call java script. Java script is written on page level edit area as HTML text.
    Can you give me the syntax ? how to call that script

    say you had a javascript function defined on or accessible to your current page that looked like this...
    function popupURL(url)
    {w = open(url,"winLov","Scrollbars=1,resizable=1,width=800,height=600");
    if (w.opener == null)
    w.opener = self;
    w.focus();}
    ...you could then call it with a link that looked like this...
    &lt;a href="javascript:popupURL('http://www.google.com');"&gt;Open Google in Another Window&lt;/a&gt;
    ...hope this helps,
    raj

  • Since I upgraded my Firefox..whenever I click on a link i get this error message...Java Script Exc in ev handl: Error: Bad NPObject as private data! Then I have to click ok to get the page to open.

    Since I upgraded my firefox..I get this box most of the time when I click on a link to go to another page...
    Java Script
    Exc in ev handl: Error: Bad NPObject as private data! Then I have to click ok to get the page to open.

    That issue can be caused by the McAfee Site Advisor extension
    *https://support.mozilla.com/kb/Troubleshooting+extensions+and+themes
    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
    *Don't make any changes on the Safe mode start window.
    *https://support.mozilla.com/kb/Safe+Mode

  • Updated to the latest version and since cant run some java scripts like menus, selecting dates of a popup calender. the link just dont work. Also sometimes the tools menus/bookmarks etc show nothing!

    had updated the browser and installed some plug ins like persona two days back and since FF has been acting funny.
    Problem with java scripts on multiple sites and also with the menu bar. The links just dont work, they work fine with IE- which i dont paritcularly like! when I click on one of the menu bar items like tools, sometimes all that comes is an empty 3 d drop down box!
    Should i reinstall FF?
    Tried pop ups and also disabled the themes and an ad blocker I had downloaded.

    Have the same problem, Firefox won't even run YouTube

  • Linking to external video in Captivate 7

    I develop video-based training. Each slide includes mostly video. I've been successfully embedding f4v videos into Captivate projects for some time but video quality and file size issues make it necessary to begin linking to videos on external servers.
    I've tried a number of options without success.
    I create a video event, choose the url option, and add the url from the uploaded video. The only usable server choice is the Adobe Media Streaming Service. I've tested the videos on different servers including Amazon since the troubleshooting advice alerted me that only Adobe partners servers will be recognized. The project previews and the progress bar moves as if the video is playing but only the background file is visible. I tried all the preview options - no luck.
    I decided to try the YouTube widget. I uploaded test videos to YouTube, inserted the Interaction widget and added the url, etc. This option results in a successful preview only when I choose the html 5 output in web browser option. Captivate will successfully publish the project but I get "Java Script Error unable to acquire LMS, API content, may not play properly" messages.
    The published file performs like all of the unsuccessful previews. The file loads and acts as if the videos are playing in that the progress bar moves but there is no video, just the slide background image. I tried different output settings like just SWF, just html5, both SWF and html5, different versions of the flash player, etc. I also added the output folder to the Flash Global Security settings in case it was a permissions issue.
    I'm working on a mac so I emailed a zipped file to my PC and tried to open in Internet Explorer to see if the file might play on a different system or browser - same outcome - no luck.
    Making external video work is critical to my work and use of Captivate so I'm hoping there's something I'm missing or misunderstanding about what I need to do.
    Any help or advice will be appreciated.

    I'm continuing to have problems with the YouTube widget. My client sent me YouTube links and when I copied and pasted the new links into the Captivate file and the published and uploaded the file, the links didn't work.
    To review, I uploaded video files to YouTube and used the interactions widget to insert the linked videos. The videos which I uploaded can be previewed in html5 in web browser but not in any other way. When I publish this file and view the file on my system on my browser (Safari) the file opens but the videos do not play. However, when I upload to my ftp site and open the file from there, the linked YouTube videos play.
    So this led me to believe that I have a file that will work at least in html5 output. But when I replace the original YouTube links that I uploaded with new links provided by my client the videos preview in html5 in web browser mode but do not play on my system or when uploaded to my ftp site. All of the videos (mine and my clients) play in YouTube and preview in html5 mode.
    Additionally, when I ouput the html5 file, the quiz doesn't work properly. The radio buttons don't appear on screen so when answers are selected the user has no way of knowing their selections have been accepted. Oddly, the quiz is registering answers since when you submit there is a brief flash during which you can see the buttons but they quickly disappear and results are tallied accurately at the end. But the quiz is unusable without user feedback for selections. You can view this performance beginning on the sixth slide (the beginning of the quiz).
    http://videoactive.org/PreventingObesityOnlinelinks/index.html
    Are html5 output files compatible with Learning Management Systems? Is there a way to use the YouTube widget in SWF output files?

  • How to write Java Scripts in Apex

    Hi All,
    Can any on tell me how to write Java Scripts in Apex.
    Thanks in Advance,
    Mukund

    If you want to link your custom JavaScripts to an Apex page, you have several options:
    1. Add an HTML Region on Page 0 (Script will be written to every page) called something like "JavaScript & CSS". In this region add your Script to the region source like this:
    <script language="JavaScript">
    function hell ()
    alert ("Hello World");
    </script>
    2. Add a similar region to the page you are working on (can only be accessed on this page)
    3. Create an external JavaScript file and either load it into the WORKSPACE or into the images (/i/) directory on the server. You can then link the JS into you page via modifying the Page Template.
    Hope that makes sense. Let me know if you want any further help with option 3.
    Duncs

  • Wording has links to external, possibly phising / spam, Websites

    Good day. I have a slight concern.
    I have read about a guy's similar problem he had with his email, but I seem to have it when normally browsing and then also something else apart from the "Question".
    When browsing all websites using Firefox 19.0 (apparently my Firefox is up to date when I do an update check) {seems its not}, random words are highlighted, and when you hover over them, it gives a small pop-up to external websites, such as Insurance and XXX Content. I have been using Firefox for a very long time now, and never seen this before since recently. I do a virus and malware check regularly, and I have check of any extensions that may cause the problem (Have only Google Search as an extension). This is very annoying. My concern also, I have done some website development before, and now some of my work also has these Highlighted contend, which is confusing, as I have linked some words to additional internal pages. One of my big clients' website has these highlighted text as well, and some of these links link to XXX content, whats going to happen if a potential client of theirs (with little understanding of IT) sees these links (when using Firefox) arent they going to think {this people supports XXX Content} to gain revenue from advertising, wont this put them into a BAD light?
    Apart from my PC, i also have installed a virtual machine, with no other programs installed but Firefox, and it does the same!
    Question 2: A Specific Website I developed, seems to freeze when Installing Java Scripts, as It seems FF cant load the content. The script is just a basic Conveyor Belt animated Banner!

    dupe of <br />
    https://support.mozilla.org/en-US/questions/952545

Maybe you are looking for

  • Lockdown feature sharepoint foundation 2013

    Hello, when I wanted to active the limeted access lockdown feature for a team site collection foundation 2013 I did not find it listet under site setting/ site collection features... When using Power Shell tells me there is no such a feature availabl

  • Installation SRM in Solaris!!!

    Hi all gurus, Hi I have to install SRM in sunsolaris system. I have not done it before.I have installed ECC 6.0, Solman 4 in Windows 2003 server. I have knowledge of working in HP-UX but not the installation. 01)Could anyone tell me what are the file

  • My itunes wont sync with gmail

    why?

  • Requirement Tracking Number Not Transferring to Backend

    SRM 5.0 SP 7 - ECS We've configured our system to allow users to enter the tracking number withing the Basic Data section of the cart, however when the PO is created in the backend the tracking number details are not transferred. I assumed that this

  • Connection to OOD hosted database with Crystal Reports XI R2

    Hi i'm quite new to Oracle and Crystal reports and trying to connect my Crystal Reports application to an instance of Oracle hosted by Oracle On Demand. I'm not sure of how to do this and the Crystal documentation is very vague, has anyone done this