Problem with Firefox?

Discussion in 'XML' started by Dennis, May 5, 2008.

  1. Dennis

    Dennis Guest

    I am in the process of converting some program output from HTML to
    XML/XSLT. I have an XSL stylesheet that inserts some javascript in the
    output that gets called further down to pop up a window). It works fine
    in IE6 but not in Firefox/Netscape. See...

    http://kowallekfamily.com/genealogy/reports/desc-3817.xml

    It is the Note link (just to the right of Henry Bales) which is supposed
    to pop up a window. In Firefox this link even looks strange (note the
    space between the word "Note" and its underscores.

    I am not even sure that this is a XML/XSLT problem. But I have a similar
    HTML page at...

    http://kowallekfamily.com/genealogy/reports/desc-3817.htm

    ....that works just fine in Firefox. I compared the XSL transform output
    to the HTML page and the pop-up code looks virtually identical.

    Is this an XML/XSLT problem just with Firefox or should I be looking
    elsewhere?

    I am using Firefox 2.0.0.14.

    TIA,

    --

    Dennis
    Dennis, May 5, 2008
    #1
    1. Advertising

  2. Haven't checked, but at a guess it sounds more likely that your
    javascript is nonportable...
    Joseph J. Kesselman, May 6, 2008
    #2
    1. Advertising

  3. Dennis

    Dennis Guest

    On Mon, 05 May 2008 19:13:47 -0400, "Joseph J. Kesselman"
    <> wrote:

    >Haven't checked, but at a guess it sounds more likely that your
    >javascript is nonportable...


    I tried replacing the javascript:history.back(1) [which worked in
    Firefox] with javascript:alert('blah') [which did nothing in Firefox].
    So, unless I am wrong, it looks like some javascript which works on an
    HTML page will not work on XML/XSLT page under Firefox (and Netscape).

    --

    Dennis
    Dennis, May 6, 2008
    #3
  4. In article <>,
    Dennis <> wrote:

    >I am in the process of converting some program output from HTML to
    >XML/XSLT. I have an XSL stylesheet that inserts some javascript in the
    >output that gets called further down to pop up a window). It works fine
    >in IE6 but not in Firefox/Netscape. See...
    >
    >http://kowallekfamily.com/genealogy/reports/desc-3817.xml
    >
    >It is the Note link (just to the right of Henry Bales) which is supposed
    >to pop up a window. In Firefox this link even looks strange (note the
    >space between the word "Note" and its underscores.


    Look at the Firefox Error Console. It probably says that NewNote is
    not defined. I think this is because you are putting your Javascript
    inside a comment. This was common in the days when some browsers
    didn't understand <script>, but it makes no sense when you are using
    XSL. Probably the browser is just ignoring comments generated by XSL.

    (I suspect that IE effectively writes out the result of the transform
    as text and then reparses it as an HTML document, while Firefox uses
    the result tree directly.)

    The space between "Note" and the underline isn't surprising: the word
    is inside <sup>. Put the <sup> around the whole <a> if you want the
    link itself to be a superscript.

    -- Richard
    --
    :wq
    Richard Tobin, May 6, 2008
    #4
  5. Dennis

    Dennis Guest

    On 5 May 2008 23:54:16 GMT, (Richard Tobin)
    wrote:

    >The space between "Note" and the underline isn't surprising: the word
    >is inside <sup>. Put the <sup> around the whole <a> if you want the
    >link itself to be a superscript.


    Thanks. That fixed one problem ... although <a><sup>...</sup></a> worked
    fine in an HTML doc in Firefox. Just another difference between the way
    HTML and XML is handled in Firefox.

    --

    Dennis
    Dennis, May 6, 2008
    #5
  6. Dennis

    Dennis Guest

    On 5 May 2008 23:54:16 GMT, (Richard Tobin)
    wrote:

    >Look at the Firefox Error Console. It probably says that NewNote is
    >not defined. I think this is because you are putting your Javascript
    >inside a comment. This was common in the days when some browsers
    >didn't understand <script>, but it makes no sense when you are using
    >XSL. Probably the browser is just ignoring comments generated by XSL.
    >
    >(I suspect that IE effectively writes out the result of the transform
    >as text and then reparses it as an HTML document, while Firefox uses
    >the result tree directly.)


    Bingo. Removing the comments did the trick. Thanks!

    --

    Dennis
    Dennis, May 6, 2008
    #6
  7. Dennis

    Dennis Guest

    On Mon, 05 May 2008 19:27:10 -0400, Dennis <> wrote:

    >On Mon, 05 May 2008 19:13:47 -0400, "Joseph J. Kesselman"
    ><> wrote:
    >
    >>Haven't checked, but at a guess it sounds more likely that your
    >>javascript is nonportable...

    >
    >I tried replacing the javascript:history.back(1) [which worked in
    >Firefox] with javascript:alert('blah') [which did nothing in Firefox].


    I just tried creating a small sample to show this behavior and the alert
    worked fine. Time to call it quits for the night...

    --

    Dennis
    Dennis, May 6, 2008
    #7
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. John
    Replies:
    2
    Views:
    6,872
  2. Problem with firefox

    , Feb 14, 2005, in forum: ASP .Net
    Replies:
    7
    Views:
    5,376
    Karl Seguin
    Feb 15, 2005
  3. andersoj
    Replies:
    4
    Views:
    3,050
  4. Shapper
    Replies:
    2
    Views:
    1,732
    Shapper
    Jun 20, 2005
  5. VK
    Replies:
    9
    Views:
    91
Loading...

Share This Page