Using Flash variable in Javascript problem

I want Flash to load a rss feed and hand it to Javascript
which will do the parsing and rendering. AFAIK Javaswcript can't
load external documents and include them into the current html page
for some security reasons. So I try this approach.
I attached the code I have. My Problem is that Flash does
pass the variable to javascript but the document.write overwrites
everything else in the current html document.
I don't want to work with popups for obvious reasons. The
variable must be included in the _current_ document.
Can anyone give me a hint how to get this working properly?

What is happening is the XML file is getting cached by the browser.
There are a few different ways to fix this, but this is what I have found to be the easiest.
In the Actionscript, where the call to load the xml is, append a random string to the end of the call.
so:
(This is AS2 code - so a conversion is necessary if using AS3)
myXML.load("http://path/to/xml.xml?r="+Math.round(Math.random()*99999999999999999999999999999999999999999999999));
What this will do is tell the browser that you are calling a unique file every time you try to load the xml, which will forcefully bypass the cached version.

Similar Messages

  • How can we  use java variable in javascript code on JSP page?

    How can we use java variable in javascript code on JSP page?
    Pls help

    Think about it:
    JSP/Java is executed on the Server and produces HTML+JavaScript.
    Then that HTML+JavaScript is transfered to the client. The client now interpretes the HTML+JavaScript.
    Obviously there's no way to access a Java variable directly from JavaScript.
    What you can do, however, is write out some JavaScript that creates a JavaScript variable containing the value of your Java variable.

  • Updating Flash Variables with JavaScript

    I am looking to update a Flash Variable that I created in my Xcelsius Component by using JavaScript.
    I would like to know if this is possible and if so an example would be great.
    Thanks in advance

    Hi Christopher,
    This is possible.  To get a brief idea of what FlashVars look like in the HTML:
    1) In Xcelsius, add a FlashVar connection and bind it to a range
    2) Export your project to HTML
    3) Open the HTML in notepad and notice the FlashVar properties in the Object and Embed tags.
    Basically your JavaScript  will control the variable that go into your FlashVar parameters. I have attached a basic example for you.
    In this example, the value input updates the flash variable which is linked to the gauge component.
    Best regards,
    Jon Teopaco

  • Using Flash Variables in Excelsius

    Dear Experts.
    I have a dashboard in Xcelsius which has multiple sheets(60 Sheets) where navigation to every other page is done using the push buttons " Back and Next ". This functionality is working fine without creating any issues. Now, the customer wants to print the various sheets at one shot. But, this functionality cant be incorporated in Xcelsius as we can print only one sheet at a time. Hence they decided to use Crystal reports to build the whole functionality again. Now, i thought of a solution where, if we could pass Flash variables for the push buttons from Xcelsius to Crystal reports 2008 and embed this particular SWF into CR, then we could somehow build these different sheets in CR and get the print out at one shot.
    Please give me tips on how to use the Flash Variables both in Xcelsius and Crystal Reports.
    Thanks in Advance,
    Kishan

    Hi:
       1. For configure flash var under Xceslius designer:
         1.1 Open xceslius.
         1.2 Click "Manage Connection".
         1.3. Choose "Flash Variable".
         1.4. Create variable and give name and binding to excel range.
         1.5. Export to swf.
       2. Consume flash var under crystal report 2008
         2.1 Open crystal report.
         2.2 Click "Insert Flash Object".
         2.3 Browser the swf you just created and add it into crystal report designer.
         2.4 Right click the flash object and right click your mouse.
         2.5 Choose "Flash Data Expert..."
         2.6 Click "+" button to add flash variable. and input your custom data. (note the flash variable name should be the same with defined in swf)

  • Using Flash's frame anchors problem

    I have problem using flash's frame anchors with firefox
    2.0.0.7
    I have following "
    http://probertson.com/articles/2006/12/14/deep-linking-flash-application-states/"
    those instructions and i can't get this thing work. Those flash's
    frame anchors does work in IE 6.0. Any solutions? I have Flash CS3.
    LINK: http://www.students.tut.fi/~sillan25/t.html

    I don't know how you'd do this using a Flash object, but
    Director's
    built-in NetLingo xtra can handle SOAP requests as of version
    10.1 and
    this, in conjunction with the proxyServer() command, should
    be all you
    need - assuming you have access to proxy details.
    <
    http://www.adobe.com/devnet/director/articles/webservices.html>

  • Pass Flash Variables To Javascript, How????

    How can I pass variables to be used on the page the flash is embed?

    See ExternalInterface:
    http://www.adobe.com/livedocs/flash/9.0/ActionScriptLangRefV3/flash/external/ExternalInter face.html
    Create a JavaScript method which handles the variables flash sends out.
    ExternalInterface.call('JavaScriptMethod',arguments);

  • Flash communicatio w/ javascript problems

    I have been tasked w/ creating a new interface for something
    at work.
    I need to have flash communicate w/ some js that is on the
    same page as my movie. (right now the actionscript will only
    display what is returned in a dynamic text box.
    the js is written by someone else so im not even sure if im
    calling it right.
    as:
    js_next = ExternalInterface.call("buttonClick", "next");
    link = js_next;
    the js:
    function buttonClick(id) {
    if (buttonStatus.charAt(whichButton(id)) == '0') return
    false;
    var currentFrame = new
    String(document.getElementById('contentFrame').contentWindow.document.location)
    if (currentFrame.indexOf("glossary.htm") > -1 ||
    currentFrame.indexOf("help.htm") > -1) {
    document.getElementById('contentFrame').src = returnFrame
    }else{
    var curSize = new
    Number(document.getElementById('narrationFrame').offsetHeight)
    if (curSize < 215) {
    document.getElementById('contentFrame').contentWindow.courseReview();
    eval(document.getElementById('contentFrame').contentWindow.document.getElementById('pageV ariableScript').innerHTML);
    switch (id) {
    case 'back' :
    buttonEnableAll();
    if (back == '') {
    buttonClick('exit');
    }else{
    document.getElementById('contentFrame').contentWindow.navigate(thisFolder
    + '/' + back);
    break;
    case 'reload' :
    buttonEnableAll();
    document.getElementById('contentFrame').contentWindow.location.reload();
    break;
    case 'next' :
    buttonEnableAll();
    // Process test bank Next Frame
    if (next == '*') {
    var testBank = getCookie("testBank");
    if (testBank != '' && testBank != null) {
    var theFrames = testBank.split(";");
    next = theFrames.shift();
    testBank = theFrames.join(";");
    setCookie("testBank", testBank);
    }else{
    next = 'postresults.htm'
    if (next == '') {
    buttonClick('exit');
    }else{
    document.getElementById('contentFrame').contentWindow.navigate(thisFolder
    + '/' + next);
    break;
    case 'glossary' :
    returnFrame = new
    String(document.getElementById('contentFrame').contentWindow.document.location)
    document.getElementById('contentFrame').src = 'glossary.htm'
    break;
    case 'audio' :
    if (isNetscape()) {
    var currSrc = document.images['btnAudio'].src
    }else{
    var currSrc = document.getElementById('btnAudio').src
    currSrc = currSrc.toLowerCase().replace(/\//,"/");
    var newSrc = currSrc.substring(0, currSrc.lastIndexOf('/') +
    1)
    if (currSrc.indexOf('audioon') > -1) { setAudio('N',
    'interface'); newSrc += 'audiooff.gif' }
    if (currSrc.indexOf('audiooff') > -1) { setAudio('D',
    'interface'); newSrc += 'audiotext.gif' }
    if (currSrc.indexOf('audiotext') > -1) { setAudio('Y',
    'interface'); newSrc += 'audioon.gif' }
    replaceImage('btnAudio', newSrc);
    buttonClick('reload');
    break;
    case 'exit' :
    if (next == '') {
    document.getElementById('contentFrame').contentWindow.SCORM_Complete();
    }else{
    document.getElementById('contentFrame').contentWindow.SCORM_Incomplete();
    window.opener.close();
    break;
    case 'help' :
    returnFrame = new
    String(document.getElementById('contentFrame').contentWindow.document.location)
    document.getElementById('contentFrame').src = thisFolder +
    '/../../_Common/help.htm'
    break;
    return true;
    }

    Using this:
    <?php
    if ($menu=="components"){
        ?>
    <script language="javascript" type="text/javascript">
    sendToFlash('components');
    </script>
    <?php
    if ($menu=="tools"){
        ?>
        <script language="javascript" type="text/javascript">
        sendToFlash('tools');
        </script>
        <?php
    ?>

  • Using javabean variable in javascript

    I have a combo box:
    <select name="myCombo"  onchange="refreshForm(document.forms[0]);">
         <option value=rome>rome
             <option value=london>london
         <option value=paris>paris
    </select>My java script refreshForm method is as follows:
    function refreshForm(form) {
            form.submit();
            return true;
    }So far so good, the selected value is passed to the action class, I call the form bean class and set the selected city, but when the page reloads the combo box on the page resets itself to the first city on the list 'rome'. so I added an onload method call in the body tag.
    <body onload="setselect(document.forms[0]), ${myform.city});" >and the java script method;
    function setselect(form, city ){
         form.myCombo.value=city;
    }but it doesn't work. any ideas?
    Thanks in advance.

    hi :-)
    there is an extra closing parenthesis afer the document.forms?
    <body onload="setselect(document.forms[0]), ${myform.city});" >regards,

  • Flash Variable is not working in Ipad

    Hi Experts,
    I'm facing with an issue, could you please suggest me your valuable suggestions.
    I have created Two dashboard (Example names A1 and B1), I need to open the dashboard B1 without asking credentials, when I select an Image in A1.
    To work in such a way, I have created a flash variable and pointed the range to cell J1.
    I have placed a URL button on top of image in Dashboard A1. I have copied following URL in a cell, and this URL I have pointed to URL Button.
    URL= (="../../../Xcelsius/opendoc/documentDownload?iDocID=M1TVABCADjs2AHoAlg123AAgoBpgwAAAA&sIDType=CUID&CELogonToken="&J1)
    Opening B1 dashboard from A1 is working fine in desktop and in Android tab, but it is not working in Ipad. Not working in Ipad in the sense a new browser window is opening with empty page.
    I have tested in another way like, passing opendocID and Flash variable to the URL button, It is working fine in Ipad but asking for the credentials.
    Experts could you please suggest me some solution.
    Ipad is Ipad2 and BO Version is 4.1 SP4.
    Thanks & Regards
    Karthik M

    Hello,
    You hyave to use the special flash variable "CELogonToken"
    Would request you to check http://scn.sap.com/docs/DOC-36362   this is a SCN document
    with title "Step by step way to create parent child dashboard in BI 4.0/4.1 using flash variable".
    SWF loader is not supported for mobile.
    Best regards,
    Mohamed AISSA.

  • Public variables in javascript

    how i can use public variables in javascript along with ADF. I am declaring a variable at the top of list but when an event is generated by ADF and i tries to access that variable, it gives me an error of undefined.
    Kindly help me

    Not directly, but you can with this:
    http://java.sun.com/products/plugin/1.3/docs/jsobject.html
    See also:
    http://www.codeproject.com/jscript/javatojs.asp?df=100&forumid=736&exp=0&select=700857

  • Flash Variable with FileXtra4

    Hi I'm wondering how to use flash variables with director mx
    2004 or 11. What I need to do is open external photo from my app
    (cd-rom). I try with fileXtra4 to launch the external photo but I
    dont know how to tell director to launch the selected image wich is
    call (selectImg) flash variable. It normaly refering to something
    like that: "2E-AF3-IMG1.jpg" depending of selectImg value. I found
    this script on the net but to make it work with a variable instead
    of a specific file name.
    instance = new(xtra "filextra3")
    result = fx_FileOpenDocument(instance,the moviepath &
    "Img_2.jpg") <-- replace Img_2.jpg by selectImg (Flash
    variable).
    if result = 0 then alert "Sorry, no app is on the system to
    open JPEG files"
    thanx Normally I use getUrl in flash but within a director
    projector it's not working.

    Good I finaly manage to make it work.
    I was using sprite("Rapports").selectImg and its doesnt work.
    If I use sprite(1).selectImg it work. Seem to only work with
    sprite number
    heres the code.
    on AGRANDIR
    global gAgIMG
    gAgIMG = sprite(1).selectImg
    instance = new(xtra "FileXtra4")
    result = fx_FileOpenDocument(instance,the moviepath &
    gAgIMG)
    if result = 0 then alert "Désoler aucune application
    associée aux fichiers JPEG est présente sur votre
    ordinateur."
    end

  • How do i use variables for javascript pop up window?

    hi,
    i want to open a popup window from flash,
    as advised before i used this line :
    getURL("javascript:NewWindow=window.open('imylink.html','title','width=890,height=660,left =10,top=5,toolbar=No,location=No,scrollbars=Yes,status=No,resizable=Yes,fullscreen=No');
    void(0);");
    BUT, in flash, the URL that has to be open as do the height
    and wdth are stored as variable... imageURL, imageWidth,
    imageHeight, since i have quite a few different pages that have to
    open and they change. how can i use the values of the variables in
    the javascript code??
    is it possible at all?

    try:

  • Problem with NetConnection in Adobe AIR(Flex) using Flash Media Server.

    Hi
    I am creating a small chat application using Flash Media server. I have already created all my user interface components in Flex(Adobe AIR).In this application rather than sending text messages user can also  send  file to another user in his friend list.
    problem what i am facing is, when i am sending file through FMS most of time it send successfully but for some files while sending  application loss netconnection.
    so i would like to know, rather than closing application what are other condition when FMS loses network connection?
    Any help would be appreciated .
    Thanks.

    Hi. It looks like your code is not finding the mp3. At least,
    I can reproduce your error code by removing the mp3 from the
    directory, or renaming it.
    Btw, if you test with FF instead of IE, you'd see the error:
    Error #2044: Unhandled IOErrorEvent:. text=Error #2032:
    Stream Error.
    at KZFlash_fla::Sound_2/KZFlash_fla::frame1()
    Hope that helps.

  • Problem using local variable in event loop

    I have a state machine from which I want to monitor various controls, including "Start" and "Stop" buttons.  Not every state needs to monitor the controls.  At present, most states run timed loops.  In the first state that reads the front panel, I have an Event structure (inside a While loop) that monitors the various controls' Change Value events.  For numeric controls, I update variables (in shift registers) as needed.  The "Start" button is used to end the While loop controlling the Event structure, allowing the State to exit to the next state.
    My problem comes in subsequent states that employ this same idea.  Here, I put a Local Variable bound to the Start button and use the same code, but it frequently happens that when I enter this particular state, I cannot "turn on" the control -- I push the button, but it stays off.  Curiously, if it was On when I enter, I can turn it off, but then I'm stuck not being able to turn it on.
    I mocked up a very simply routine that illustrates this.  There are two sequences (corresponding to the two states).  Both use an Event loop with a local variable bound to my Stop button (really this is an LED control with custom colors).  I've deliberately moved the "initialization" (the declaration of the control in the block diagram) out of the Event loops -- putting it inside the first loop modifies the behavior in another strange way.
    Here's my thinking on how I would expect this to work:  The code outside Event Loop 1 should have little effect.  Assume the Stop button is initially Off.  You will "sit" in Event Loop 1 until you push the Stop button, changing its value to True; this value will be passed out of the Event case and cause the first While loop to exit.  You now enter the second sequence.  As I understand the Exit tunnel, it defaults to "False", so I'd expect to stay in the second Event loop until I turn the Stop button from On to Off, which will pass out a False, and keep me in the While for one more button push.  However, this doesn't happen -- I immediately exit, as though the "True" value of the Stop local variable is being seen and recognized by the Event loop (even though it hasn't changed, at least not in the context of this second loop).
    An even more curious thing occurs if I start this routine with the Stop button turned on.  Now I start in my Event loop waiting for a change, but this time the change will be from On to Off, which won't cause an exit from the frame.  This will be reflected by having the While loop count increment.  We should now be in the state of the example above, i.e. in an Event loop waiting for the control to be pushed again, and turned On.  However, clicking the control has no effect -- I cannot get it to "turn on".
    Where am I going astray in my thinking?  What is it about this method of doing things that violates the Labview paradigm?  As far as I can tell, what I'm doing is "legal", and I don't see the flaw in my reasoning, above (of course not -- otherwise I'd have fixed it myself!).  Note that because I'm using local variables inside Event loops (and I'm doing this because there are two places in my code where I want to do such testing), the Stop control is not latching (as required).  Is there something that gets triggered/set when one reads a latched control?  Do I need to do this "manually" using my local variable?
    I'll try to attach the simple VI that illustrates this behavior.
    Bob Schor
    Attachments:
    Simple Stop Conundrum.vi ‏14 KB

    altenbach wrote:
    Ravens Fan wrote:
    NEVER have multiple event structures that share the same events. 
    Actually, that's OK.  NOT OK is having multiple event structures in the same sequence structure.
    See also: http://forums.ni.com/ni/board/message?board.id=170&message.id=278981#M278981
    That's interesting.  I had always thought I read more messages discouraging such a thing rather than saying it was okay.  Your link lead me to another thread with this message. http://forums.ni.com/ni/board/message?board.id=170&message.id=245793#M245793.  Now that thread was mainly concentrating on registered user events which would be a different, but related animal. 
    So if you have 2 event structures they each have their own event queue?  So if you have a common event, one structure pulls it off its event queue and it does not affect the other structure's event queue?  I guess the inherent problem with this particular VI was that the second event structure locked the front panel.  Since the code never got to that 2nd event structure because the  first loop never stopped because the change was from true to false.  After reading your post and the others, I did some experimentation and turned off the Lock front panel on the 2nd structure, and that prevented the lockup of the program.
    Overall, the example VI still shows problems with the architecture and I think your answer should put the original poster on the right track.  I think as a rule I would probably never put the same event in multiple structures, I feel there are better ways to communicate the same event between different parts of a program,  but I learned something by reading your reply and about how the event structures work in the background.  Thanks.

  • Problems using substitution variable in Web Analysis

    Dear all,
    I have a Web Analysis report that I need to show a raking table with the current month.
    For that I create a variable in Essbase that is updated with that date (E.g.: varCurrentMonth).
    After that I use it as my substitution variable to filter my date dimension in a report data source (E.g.: Scr5, row: product, column: date dimension & measure):
    2008 (current month)
    Product $ qty.
    AAA 100 10
    BBB 90 7
    CCC 80 5
    The problem is that in our cube we need to use an alias in every dimension not to have duplicate members (E.g.: DT.Date, MS.Measure, PD.Product, etc). And when we use it we need to set up the variable in Essbase using that alias (E.g.: DT.Feb/05/08). And if we use that variable as a substitution variable in the report data source the label displayed is the DT.2008 and not 2008 as expected.
    Does anybody have an idea how to solve that?
    Many thanks,
    Thiago Gabriel

    You usually get this error message if you are trying to assign a value from a sub var to a member that does not exist.
    e.g. trying to put FY08 which is a year member against a period dimension
    or trying to use a sub var of FY09 which does not yet exist in the essbase, so say you added a new year in planning FY09 and used the sub var in the form but have not refreshed the database then it would fail because the year would not have been pushed down to essbase yet.
    or the value of the subvar does not match a member name exactly
    or using a sub var name that does not exist in essbase, e.g. using &nextYear but the sub var has not been created in essbase.
    You can definitely use subsitution variables in columns in the version you are using and prior version.
    Cheers
    John
    http://john-goodwin.blogspot.com/

Maybe you are looking for

  • FBL5N Review Open and Cleared Invoices per Customer

    WHen one of our users goes into FBL5N to review open and cleared invoices he adds the WBS and the Profit Center. When the report runs it is blank. I looked at the invoice itself and the WBS and Profit center is on the invoice but I don't know why it

  • Is my external monitor supposed to show up in system preferences?

    I called LG because my LG monitor keeps getting stuck in 'Power Saving Mode' and the LG customer service rep said it's because my MacBook isn't recognizing the monitor.  He said that the external monitor is supposed to show up in system preferences w

  • Change font size in reports

    Hi friends,          I want to change the font size in  reports. i want example program for that.

  • My e-mail how can I be.able to get it

    l would like to get my e-mail using Firefox. how do I go about it.

  • Report within a report

    <p>Hi All </p><p>I have a problem in crystal reports.My problem is like this </p><p>There is field (e.g;ModelName) and after clicking on the model name I want all the details of that model name in another report (but I don't want to use sub reports).