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 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Mar 2006
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Internet Explorer Script Problem in IE

    Hey I have this one line of javascript that works fine in FF but creates a runtime error in IE, iv gone over it over and over and can't figure out whats causing the runtime error, any help would be great, thx

    Code:
    	var theString = '<br /><div style="border-top:1px solid white;border-bottom:1px solid white;"><br /><textarea id="commentEditor'+target+'" style="width:383px;" onkeyup="commentChanged('+target+');"></textarea><br /><a href="javascript:saveNewComment('+target+');">Save Changes</a> | <a href="javascript:cancelNewComment('+target+');">Cancel</a></div>';

    thx for any help

  • #2
    New to the CF scene
    Join Date
    Mar 2006
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts
    ok iv narrowed it down a bit:

    this line of code works fine:
    Code:
    var theString = '<br /><div style="border-top:1px solid white;border-bottom:1px solid white;"><br /><textarea id="commentEditor'+target+'" style="width:383px;" onkeyup="commentChanged('+target+');"></textarea><br />Save Changes</div>
    but if i add in the <a> tag around save changes IE spits out the runtime error:
    Code:
    var theString = '<br /><div style="border-top:1px solid white;border-bottom:1px solid white;"><br /><textarea id="commentEditor'+target+'" style="width:383px;" onkeyup="commentChanged('+target+');"></textarea><br /><a href="#">Save Changes</a></div>
    this seems REALY weird to me :S

  • #3
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,075
    Thanks
    0
    Thanked 256 Times in 252 Posts
    Do you have the page online? When does the error occur?
    Glenn
    ____________________________________

    My Blog
    Tower of Hanoi Android app (FREE!)
    Tower of Hanoi Leaderboard
    Samegame Facebook App
    vBulletin Plugins
    ____________________________________

  • #4
    New to the CF scene
    Join Date
    Mar 2006
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by glenngv View Post
    Do you have the page online? When does the error occur?
    the page is in a local testing environment, i uploaded the js file onto my webserver though http://www.ryancooperdesign.com/scripts.js

    basicly what happens is i call a javascript function containing that line of code on the onmouseup of an html link, this function then resolves setting this variable and setting the innerHTML of div to match that variable, thats it :S


  •  

    Posting Permissions

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