5 Replies Latest reply on Jun 10, 2008 11:02 AM by Flex-urgent

    Need Help urgently

      I have embedded the swf file using <object> tag. This lies in a <TABLE > tag of a jsp. If I try to call a function using External interface, it complains about the id. The reason that I found out was that <object> doesn not like the <Form> tag in a jsp. I remove the <form > tag it works fine..
      My problem is that I cannot remove the form tag as I am using javascript to do various stuff and hence i am using the synatx document.forms[0]. ....

      Is there a work around for this.
      Pleas help- urgent
        • 1. Re: Need Help urgently
          slaingod Level 1
          Certainly using CSS and javascript you should be able to work around any issues, as the Embed can be outside of the form if necessary and still be in the correct place simply by using absolute positioning (using js).
          • 2. Re: Need Help urgently
            Flex-urgent Level 1
            I am not using the object/embedd tag directly to load the flex app. there is a swfobject.js file whic internally gets the values /parameters and sets it for object/embedd tag. On the jsp i only use <div> tag and javascript to display the flex. so i am not quite sure how to keep is outside <form> and define the exact location
            • 3. Re: Need Help urgently
              *gsb* Level 1
              This might sound odd but it works well for I use it.
              First, in the swf make, a "random named function" and using the ExternalInterface callback method, expose (publish) it. Make and call a simple js function that:
              1) makes a list of all object tags on the page,
              2) iterates the list looking for the one with that function, and
              3) saves that "object" reference for use in the javascript calls to the swf.

              OR, modify the swfObject.js code to save the object reference when it is created.

              • 4. Re: Need Help urgently
                slaingod Level 1
                You would create a placeholder div in the TABLE and figure out its x/y in javascript, then use absolute positioning or something similar to have it overlay the correct spot in the TABLE, so that it is technically outside of the TABLE/FORM hierarchy but is placed properly in the flow of the page.
                • 5. Re: Need Help urgently
                  Flex-urgent Level 1
                  The above problem is resolved.. I removed all document.forms[0] and replaced or rather used document.getElementById () which does not require <form> tag.
                  Another issue i am having is in the local connection. my page is divided in 2 sections. left has a slider embedded and right has chart embedded. when the page is loaded , the right side which has 2 tabs is loaded with an image. then when the user actually moves teh slider on left panel the firt tab on the right side should be visible and chart should be generated dynamically. the flow works fine. problem is when i click on the slider , it activates the tab 1 with chart but thros an error regarding connection. immediately after that if i click the slider again it works fine. if i understand correctly this problem is occuring because chart swf is playing at that time.
                  can any body help me in resolving this issue.

                  error :-
                  LocalConnection.send() failed: [StatusEvent type="status" bubbles=false cancelable=false eventPhase=2 code=null level="error"]