Question on using javascript in links

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

    #1

    Question on using javascript in links

    I have a simple javascript that reads xml data from my site using the
    XMLHttpRequest/ActiveXObject function, which later clears a predefined
    div and updates it with the requested data, to update I am using:

    <a href="javascrip t:function">yad a</a>

    It works as it should in Firefox, but when in IE6 it does not, no error
    is reported. Am I missing something obvious? Also there is no action on
    the server when clicked (I am running a small webserver I built)
    alternatively I have used a <span onClick="functi on">yada</span> and
    same song and dance, with the spyblocker off, still no cigar.

    Any help is greatly appreciated.

    Adonis
  • David Dorward

    #2
    Re: Question on using javascript in links

    Adonis wrote:
    [color=blue]
    > <a href="javascrip t:function">yad a</a>[/color]


    [color=blue]
    > It works as it should in Firefox, but when in IE6 it does not, no error
    > is reported. Am I missing something obvious?[/color]

    Maybe, certainly we are - the code that doesn't work. Try providing a URL.

    --
    David Dorward <http://blog.dorward.me .uk/> <http://dorward.me.uk/>
    Home is where the ~/.bashrc is

    Comment

    • micha

      #3
      Re: Question on using javascript in links


      Adonis wrote:[color=blue]
      > I have a simple javascript that reads xml data from my site using the[/color]
      [color=blue]
      > XMLHttpRequest/ActiveXObject function, which later clears a[/color]
      predefined[color=blue]
      > div and updates it with the requested data, to update I am using:
      >
      > <a href="javascrip t:function">yad a</a>[/color]

      it's maybe very easy: brackets are missing after function
      [color=blue]
      >
      > It works as it should in Firefox, but when in IE6 it does not, no[/color]
      error[color=blue]
      > is reported. Am I missing something obvious?[/color]

      if it's not so easy
      try somthing to check the functionality in ie, like
      <a href="javascrip t:alert("somthi ng")">yada</a>.

      alternativly you could use
      <a href="#" onclick="functi on()">yada</a>
      [color=blue]
      > Also there is no action on
      > the server when clicked[/color]

      it's javascript, there should be some action in the browser first, and
      if nothing happens there nothing will happen on the server either.
      [color=blue]
      > (I am running a small webserver I built)
      > alternatively I have used a <span onClick="functi on">yada</span> and
      > same song and dance, with the spyblocker off, still no cigar.
      >
      > Any help is greatly appreciated.
      >
      > Adonis[/color]

      micha

      Comment

      • Thomas 'PointedEars' Lahn

        #4
        Re: Question on using javascript in links

        micha wrote:
        [color=blue]
        > Adonis wrote:[color=green]
        >> I have a simple javascript that reads xml data from my site using
        >> the XMLHttpRequest/ActiveXObject function, which later clears a
        >> predefined div and updates it with the requested data, to update
        >> I am using:
        >>
        >> <a href="javascrip t:function">yad a</a>[/color]
        >
        > it's maybe very easy: brackets are missing after function[/color]

        .... considering that `function' is but a placeholder like `foo' here;
        `function' must not be used as identifier, it is a reserved word.

        And micha, please trim your quotes:
        <http://www.jibbering.c om/faq/faq_notes/pots1.html#ps1T rim>


        PointedEars

        Comment

        Working...