1

I am experimenting TinyMCE editor to set its content on click of an hyperlink. For this I used their own demo page and tried adding a link their. But clicking on link did not set the content of the editor. So I went on debugging it in IE9. I tried putting breakpoint on the line, but surprised - I was able to toggle breakpoint everywhere, except that line. snapshot here: http://s15.postimage.org/a7ntjabfv/Tiny_MCE_Debug.png Why is this happening?

Mahesha999
  • 22,693
  • 29
  • 116
  • 189
  • nope. But I solved the problem. Its just changing "Mahesh" to 'Mahesh'. You can find the word "Mahesh" in the snapshot. Changing double quotes to single quotes solved the problem. Thanks mihai for your reply. But the behavior of IE was surprising - allowing toggling breakpoint on one line but not on other! It should give some error at page load. – Mahesha999 Apr 23 '12 at 15:28
  • k...you can answer your own question with that :) – mihai Apr 23 '12 at 15:31
  • sorry but I did not get it. Is that IE behavior intuitive. I was puzzled how a particular line cannot be loaded. Or Im interpreting it in wrong way? – Mahesha999 Apr 23 '12 at 16:11

1 Answers1

0

Actually, now that you mentioned it...I figured what happened. The line where you're trying to set the breakpoint looks like invalid html, so IE behaves correctly.

In your example, html attributes (like the onclick you have) are delimited by double quotes ("). But you also have another string delimited by " inside the attributes, which leads to a syntax error. To get around this, you must delimit your strings by single quotes: ' . So the solution that you found is correct.

mihai
  • 37,072
  • 9
  • 60
  • 86
  • 1
    Might as well [use single quotes](http://stackoverflow.com/questions/273354/are-single-quotes-allowed-in-html) to delimit the attribute value – user123444555621 Apr 23 '12 at 17:59