Javascript Error on XML/XSLT pages

Discussion in 'Internet Explorer' started by scumbkt, Jan 20, 2009.

  1. scumbkt

    scumbkt Guest

    I'm trying to develop a cross platform bookmarklet for a site that uses
    XML/XSLT, it seems no javascript can be run from the address bar in this
    situation.

    To demonstrate, http://filer.case.edu/mdl21/Identities/xmldemo.xml shows a
    simple XML/XSLT page, typing "javascript:alert('hello, world!');" into the
    address bar and hitting enter *should* display an alert box, instead it
    generates a meaningless error message, "Internet Explorer cannot download .
    Unspecified Error" in IE7. In IE5 all you get is a beep. In FF2 and 3, it
    works as expected.

    I'd like to know if this is a bug or a "feature". If it's a "feature", is
    there a work-around?

    Perhaps due to the unfortunate congruence of buzzwords, google has gotten me
    nowhere, so I apologize if this is a known issue.

    Any help from the community would be greatly appreciated.
     
    scumbkt, Jan 20, 2009
    #1
    1. Advertisements

  2. scumbkt

    Rob^_^ Guest

    Hi Scumbkt,

    The current document needs to have <head> tags to execute the javascript:
    protocol from the Address Bar in IE7 and higher.

    Try loading about:blank and executing javascript: from the address bar. The
    same applies.

    I am not sure for the reason for this, but I would think it would be
    security related as since v7 of IE, the traditional Address bar has been
    replaced by "the Navigation Bar" that has a number of built-in security
    features.

    Regards.
     
    Rob^_^, Jan 20, 2009
    #2
    1. Advertisements

  3. scumbkt

    scumbkt Guest

    Thanks for responding, Rob.

    That surprises me, as that would mean that IE is running the Navigation bar
    against the un-rendered page instead of the rendered page it is displaying.

    Adding a <head> element to the XSL didn't help, neither did adding a <head>
    element to the XML (I'll admit that was a longshot). Can you provide some
    guidance in getting this to work, or am I just SOL?

    Thanks,

    scumbkt
     
    scumbkt, Jan 20, 2009
    #3
    1. Advertisements

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.