0
votes

Could you please let me know where I have to correct the statement.

     $(function(){
      $('#buttonclick').click(function(){
          // if(!$('#iframe1').length) {
                  $('#submitbutton').html('<iframe id="iframe1"  src="{{ url_for('stream') }}" frameborder="0" style="overflow:hidden;width:100%" width="100%" frameborder="0" scrolling="no" onload="resizeIframe(this)"> </iframe>');
          // }
      });
  });
1
Are you using a framework that replaces {{ url_for('stream') }} with something? Please tag with the framework. - Barmar
If yo uclick on the line number in the error message, it will take you directly to the location of the problem and highlight it. - Barmar

1 Answers

0
votes

You should put a backslash before string literals that you want JS to ignore, like double-quotations in your .html('')

Try this.

$(function(){
    $('#buttonclick').click(function(){
        // if(!$('#iframe1').length) {
        $('#submitbutton').html('<iframe id=\"iframe1\"  src=\"{{ url_for(\'stream\') }}\" frameborder=\"0\" style=\"overflow:hidden;width:100%\" width=\"100%\" frameborder=\"0\" scrolling=\"no\" onload=\"resizeIframe(this)\"> </iframe>');
        // }
    });
});