Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Oct 2005
    Posts
    14
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Question Script not working in Fire Fox

    I've got a script that I use to allow user to insert "mail merge" fields into an e-mail. This script works just fine in IE, but does not work in Fire Fox. Any ideas why?

    <script language=javascript type="text/javascript">
    <!-- Hide script from older browsers
    function insCode() {
    document.EMail.Message.focus()
    var rng=document.selection.createRange();
    rng.text=document.EMail.InsCode.value;
    rng.select();
    }
    // -->
    </script>

    Thanks,
    Jesse

  • #2
    Regular Coder martin_narg's Avatar
    Join Date
    Jul 2002
    Location
    Chamonix, France
    Posts
    600
    Thanks
    1
    Thanked 3 Times in 3 Posts
    you would need to use the Gecko DOM (FireFox) Range object: http://developer.mozilla.org/en/docs/DOM:range

    Hope this helps

    m_n
    "Cos it's strange isn't it. You stand in the middle of a library and go 'Aaaaaaaaaaaaaaaaggggggghhhhhhh!'
    and everybody just stares at you. But you do the same in an aeroplane, and everybody joins in."
    -Tommy Cooper


  •  

    Posting Permissions

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