SitePoint Sponsor

User Tag List

Results 1 to 8 of 8
  1. #1
    SitePoint Enthusiast jsegura's Avatar
    Join Date
    Feb 2002
    Location
    Barcelona (Catalonia-Spain)
    Posts
    36
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Smile Problems with XML into client and flash

    Hello.

    I'm serving a XML page doing one XSLT transformation in the client (it works only in IE 6). As a part of the transformation, the resulting document contains one embedded flash (using the typical <OBJECT>...<EMBED>...</EMBED>...</OBJECT> ).
    The embedded movie does as a result of a button click one call like:
    getURL("javascript:someFunctionName()","_self","GET" );

    Even when _self is said as the target window, the explorer opens always a new browser window with "java script:someFunctionName" as URL, resulting in an error.

    Does any body know how to avoid this and make the original document to process the call?.

    Same thing executed with the resulting HTML directly opening it in the browser works ok.

    Thanks in advance.
    Joan.

  2. #2
    SitePoint Wizard aaron.martone's Avatar
    Join Date
    Feb 2003
    Location
    Florida, USA
    Posts
    2,322
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    What the problem may be is that you're calling "java script"

    There is no such thing as "Java script" (Java is not a scripting language! It's a programming language!)There is however a "javascript"

    Try that and see if it works.

  3. #3
    ...
    Join Date
    Jan 2002
    Location
    London, UK
    Posts
    759
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Dont know if this will help your specific problem but Colin Moock's published some useful info on getting Flash to talk to Javascript.

    http://www.moock.org/webdesign/flash/fscommand/

  4. #4
    ********* Shroom mydster's Avatar
    Join Date
    Nov 2002
    Location
    tpyge
    Posts
    1,085
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by aaron.martone
    What the problem may be is that you're calling "java script"

    There is no such thing as "Java script" (Java is not a scripting language! It's a programming language!)There is however a "javascript"

    Try that and see if it works.
    For some reason it seperates the words JavaScript... (hhmm.. well when I posted a javascript thing a while back it seperate the words for me.. O_o

  5. #5
    SitePoint Enthusiast jsegura's Avatar
    Join Date
    Feb 2002
    Location
    Barcelona (Catalonia-Spain)
    Posts
    36
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That's right, mydster, for some reason when I posted the forum separed the words.

    My problem's still been the same and I haven't found any solution by now.

    Thanks.

  6. #6
    SitePoint Wizard aaron.martone's Avatar
    Join Date
    Feb 2003
    Location
    Florida, USA
    Posts
    2,322
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Oh, see I took it from a HTTP standpoint (I'm using MSIE 6) If you type:

    javascript:alert("Hello!");

    into your address bar and press ENTER, it will popup an alert box with "Hello!" in it.

    In as much when HTML code views the above in a link or javascript code, it is just sent to the browser URL box (link file redirections)

    However, if you do the above while seperating the java and script, it doesn't work. So I was assuming (since I don't mess with XML) that the problem may have been similar.

  7. #7
    SitePoint Enthusiast jsegura's Avatar
    Join Date
    Feb 2002
    Location
    Barcelona (Catalonia-Spain)
    Posts
    36
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Back to the beginning...

    I have one XML document with its corresponding XSLT transformation. This transformation writes to the output one <div> element containing an embedded Flash movie.

    This movie calls a javascript function when a button is pressed, with

    getURL("javascript:fnName()","_self","GET")

    /*Javascript written as one word without spaces */

    When I open the xml file in IE6 (so the XSL transformation is done in the client with the MSXML library), the javascript function is always tried to be open as a new URL, giving (logically) an error.

    Has anybody experienced the same problem?.

    Thanks to all who tried to answer me, and to all who are reading this.

  8. #8
    Dumb PHP codin' cat
    Join Date
    Aug 2000
    Location
    San Diego, CA
    Posts
    5,460
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    One thing to try,

    Just use
    Code:
    getURL("javascript:fnName();");
    Instead of the two other params.

    Also could you possibly post the xml and xslt files, So I could download them and try to recreate the error.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •