1

I have a form. It contains some hyperlinks. I can click on them and get another page in browsers like Google Chrome and Mozila Firefox but instead, I am unable to open them in IE9, IE10,.. What might be the problem? and whats the solution? help me.

In dev-tool(console), I am getting

un-terminated string constant error

.

Jai Reddy
  • 23
  • 1
  • 7
  • 1
    Can you paste in the HTML for one of your links please? – johnnycardy Feb 24 '14 at 10:55
  • possible duplicate of [Common sources of unterminated string literal](http://stackoverflow.com/questions/227552/common-sources-of-unterminated-string-literal) – Nick R Feb 24 '14 at 11:03

3 Answers3

0

Apart from any coding this could be the reason:

A previously installed browser or add-in might be interfering with ie browser on your computer.

or it might be a result of bad DCOM. If bad DCOM is the problem you can get solution here:- http://www.techsupportall.com/links-are-not-working/

0

Jay, This might happen due to incorrect concatenations or omission of the semicolon(;) at the end of statement.

Or may be any server variable that is not being populated. Like:

    var var1 ='<% = someServerVariable %>'
    someCode

It is possible that some someServerVariable is not being populated and the browser compiler would read the code as var1 = someCode

Please look into your code and find out if there is any similar issue with your code. Or the best is to share your code snippet to point out the exact issue.

Khatri
  • 91
  • 5
0

I ran into this same exact problem. For me, whenever I was embedding links in an ul / li list format, it just wouldn't let me click the first link (happens a lot navigation menus).It would only let me click the embedded ones. My work around for this was using java-script to create a force the click and pass.

Put this script in your head

<script>
function fakeClick(event, anchorObj) {
  if (anchorObj.click) {
    anchorObj.click()
  } else if(document.createEvent) {


    if(event.target !== anchorObj) {
      var evt = document.createEvent("MouseEvents"); 
      evt.initMouseEvent("click", true, true, window, 
          0, 0, 0, 0, 0, false, false, false, false, 0, null); 
      var allowDefault = anchorObj.dispatchEvent(evt);
      // you can check allowDefault for false to see if
      // any handler called evt.preventDefault().
      // Firefox will *not* redirect to anchorObj.href
      // for you. However every other browser will.
    }
  }
}
</script>

And then in the body you can use this convention for any link you need to be forced clicked.

<a id="link" href="#YourDestinationLinkHere" onclick="fakeClick((event.target || event.srcElement).innerHTML)">Destination</a>