Problem with Firefox?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Dennis

    Problem with Firefox?

    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...



    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...



    ....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
  • Joseph J. Kesselman

    #2
    Re: Problem with Firefox?

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

    Comment

    • Dennis

      #3
      Re: Problem with Firefox?

      On Mon, 05 May 2008 19:13:47 -0400, "Joseph J. Kesselman"
      <keshlam-nospam@comcast. netwrote:
      >Haven't checked, but at a guess it sounds more likely that your
      >javascript is nonportable...
      I tried replacing the javascript:hist ory.back(1) [which worked in
      Firefox] with javascript:aler t('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

      Comment

      • Richard Tobin

        #4
        Re: Problem with Firefox?

        In article <6u1v14l5mg1k3p kco97t8i4daafmo hb968@4ax.com>,
        Dennis <nobody@nowhere .comwrote:
        >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/.../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 <suparound the whole <aif you want the
        link itself to be a superscript.

        -- Richard
        --
        :wq

        Comment

        • Dennis

          #5
          Re: Problem with Firefox?

          On 5 May 2008 23:54:16 GMT, richard@cogsci. ed.ac.uk (Richard Tobin)
          wrote:
          >The space between "Note" and the underline isn't surprising: the word
          >is inside <sup>. Put the <suparound the whole <aif you want the
          >link itself to be a superscript.
          Thanks. That fixed one problem ... although <a><sup>...</sup></aworked
          fine in an HTML doc in Firefox. Just another difference between the way
          HTML and XML is handled in Firefox.

          --

          Dennis

          Comment

          • Dennis

            #6
            Re: Problem with Firefox?

            On 5 May 2008 23:54:16 GMT, richard@cogsci. ed.ac.uk (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

            Comment

            • Dennis

              #7
              Re: Problem with Firefox?

              On Mon, 05 May 2008 19:27:10 -0400, Dennis <nobody@nowhere .comwrote:
              >On Mon, 05 May 2008 19:13:47 -0400, "Joseph J. Kesselman"
              ><keshlam-nospam@comcast. netwrote:
              >
              >>Haven't checked, but at a guess it sounds more likely that your
              >>javascript is nonportable...
              >
              >I tried replacing the javascript:hist ory.back(1) [which worked in
              >Firefox] with javascript:aler t('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

              Comment

              Working...