Solved

chrome blocking Doctype on secure site

Posted on 2013-06-10
7
596 Views
Last Modified: 2013-06-10
I have a secure site that for some reason Chrome is having issues
Only one some computers my jquery is not working. I spent a couple of days to figure this out. When I run Chrome developer tool I see

[blocked] The page at https://(my page) ran insecure content from http://code.jquery.com/jquery-1.4.2.min.js

[blocked] The page at https://(my page) ran insecure content from http://cdn.sendori.com/js/inlinekeywords.js

[blocked] The page at https://(my page) ran insecure content from http://cdn.sendori.com/js/pconfig.js

No where in my page am I referencing those pages. So I decided to run a page with jquery auto-complete and see whats going on.


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="https://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<link rel="stylesheet" href="css/redmond/jquery.ui.all.css">
    <script src="js/jquery-1.7.2.js"></script>
    <script src="js/jquery.ui.core.js"></script>
    <script src="js/jquery.ui.widget.js"></script>
  
 <script src="js/jquery.ui.button.js"></script>
  <script src="js/jquery.ui.position.js"></script>
       <script src="js/jquery.ui.autocomplete.js"></script>
   
<style>
.ui-combobox {
position: relative;
display: inline-block;
}
	
.ui-combobox-toggle {
position: absolute;
top: 0;
bottom: 0;
margin-left: -1px;
padding: 0;
/* adjust styles for IE 6/7 */
*height: 1.7em;
*top: 0.1em;
}
	
.ui-combobox-input {
margin: 0;
padding: 0.3em;
width:500px;
}
	
</style>
	
<script>
	
(function( $ ) {
$.widget( "ui.combobox", {
_create: function() {
var input,
self = this,
select = this.element.hide(),
selected = select.children( ":selected" ),
value = selected.val() ? selected.text() : "",
wrapper = this.wrapper = $( "<span>" )
.addClass( "ui-combobox" )
.insertAfter( select );
input = $( "<input>" )
.appendTo( wrapper )
.val( value )
.addClass( "ui-state-default ui-combobox-input" )
.autocomplete({
delay: 0,
minLength: 0,
source: function( request, response ) {
var matcher = new RegExp( $.ui.autocomplete.escapeRegex(request.term), "i" );
response( select.children( "option" ).map(function() {
var text = $( this ).text();
if ( this.value && ( !request.term || matcher.test(text) ) )
return {
label: text.replace(new RegExp("(?![^&;]+;)(?!<[^<>]*)(" +$.ui.autocomplete.escapeRegex(request.term) +")(?![^<>]*>)(?![^&;]+;)", "gi"), "<strong>$1</strong>" ),value: text,option: this};
}) );
},
select: function( event, ui ) {
ui.item.option.selected = true;
							
self._trigger( "selected", event, {
item: ui.item.option
});
},
change: function( event, ui ) {
if ( !ui.item ) {
var matcher = new RegExp( "^" + $.ui.autocomplete.escapeRegex( $(this).val() ) + "$", "i" ),
valid = false;
select.children( "option" ).each(function() {
if ( $( this ).text().match( matcher ) ) {
this.selected = valid = true;
return false;
}
});
if ( !valid ) {
// remove invalid value, as it didn't match anything
<!---$( this ).val( "" );
select.val( "" );
input.data( "autocomplete" ).term = "";
document.getElementById("ifNew").value=1;--->
return false;
}
}
}
})
.addClass( "ui-widget ui-widget-content ui-corner-left" );
input.data( "autocomplete" )._renderItem = function( ul, item ) {
return $( "<li></li>" )
.data( "item.autocomplete", item )
.append( "<a>" + item.label + "</a>" )
.appendTo( ul );
};
$( "<a>" )
.attr( "tabIndex", -1 )
.attr( "title", "Show All Items" )
.appendTo( wrapper )
.button({
icons: {
primary: "ui-icon-triangle-1-s"
},
text: false
})
.removeClass( "ui-corner-all" )
.addClass( "ui-corner-right ui-combobox-toggle" )
.click(function() {
// close if already visible
if ( input.autocomplete( "widget" ).is( ":visible" ) ) {
input.autocomplete( "close" );
							
return;
						
}
// work around a bug (likely same cause as #5265)
$( this ).blur();
// pass empty string as value to search for, displaying all results
input.autocomplete( "search", "" );
input.focus();
});
},
destroy: function() {
this.wrapper.remove();
this.element.show();
$.Widget.prototype.destroy.call( this );
}
		});
	})( jQuery );

$(function() {
$( "#combobox" ).combobox();
$( "#toggle" ).click(function() {
$( "#combobox" ).toggle();
});
});
	
</script>
<!--- spell out number js--->

<cfquery name="getresidents" datasource="facility1">
select ID,CONCAT(FirstName,' ', LastName) AS resname
from residents
</cfquery>
</head>
<body>
	
	
            	<table >
    				
                        <tr>
                            <td width="100%"  nowrap="nowrap">
                                Pay to the Order of&nbsp;<select id="combobox" name="chkPayTo" >
                                <option value="">A Resident</option> 
                                <cfoutput query="getresidents">
                                    <option value="#getresidents.ID#">#getresidents.resname#</option>
                                </cfoutput>	
                            </select>      
                            </td>
                           
                        </tr>
                     
        		</table>
        	
    <input type="hidden" id="ifNew" name="ifNew" value="0"/>
</body>
</html>

Open in new window


I took out all the jquery references and tried everything. I then accidentally deleted

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="https://www.w3.org/1999/xhtml">

Open in new window


and everything decided to work. I tried many variations of the doctype and no matter what I try I am showing the blocked errors.  
This is happening on 2 computers out of 50 that a working fine.
0
Comment
Question by:spectrumcare
  • 5
  • 2
7 Comments
 
LVL 11

Accepted Solution

by:
Pradeep Dubey earned 500 total points
ID: 39235322
Have you cleared catch and run virus scan on these two machines?
0
 

Author Comment

by:spectrumcare
ID: 39235416
Yes I have cleared cache and ran multiple virus scans on it with AVG and Bitdefender live cd. I also uninstalled and re installed chrome on the machines.
0
 

Author Comment

by:spectrumcare
ID: 39235519
I just tried something. I found a site that had different doctype. None of them worked but then I tried taking out
<html>

Open in new window

tag and then it worked.  Do I need that tag? Before I was taking out both and assumed it was the doctype
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 11

Expert Comment

by:Pradeep Dubey
ID: 39235542
The <!DOCTYPE> declaration must be the very first thing in your HTML document, before the <html> tag.

The <!DOCTYPE> declaration is not an HTML tag; it is an instruction to the web browser about what version of HTML the page is written in.

In HTML 4.01, the <!DOCTYPE> declaration refers to a DTD, because HTML 4.01 was based on SGML. The DTD specifies the rules for the markup language, so that the browsers render the content correctly.

HTML5 is not based on SGML, and therefore does not require a reference to a DTD.

Tip: Always add the <!DOCTYPE> declaration to your HTML documents, so that the browser knows what type of document to expect.


If its working on that machine then continue with this. Also check any other machine ( if working then made global change otherwise no)

:-(
0
 

Author Comment

by:spectrumcare
ID: 39235622
Thanks. I added<!DOCTYPE > tag and different variations of it, I got them from http://hsivonen.iki.fi/doctype/,
to the page and took out <html></html> tags that wrap the page and it seemed to work. It doesn't make any scene thought. Why would the <html> tag cause the issues. Could it be that our site is secure (usses https://) the only way I got the <html> to work is if I took off the s and made it (http://). Is there a different <html> tag to use for https sites? Or could it just be a chrome thing?
0
 

Author Comment

by:spectrumcare
ID: 39235916
I found out what was happening. There was a program called Sendori that was installed. It was supposed to speed up internet browsing. It must of been one of those programs that got installed when they downloaded something else. But I uninstalled it and the site is working.
0
 

Author Closing Comment

by:spectrumcare
ID: 39235919
For some reason Sendori was not being picked up by the antivirus.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Introduction Knockoutjs (Knockout) is a JavaScript framework (Model View ViewModel or MVVM framework).   The main ideology behind Knockout is to control from JavaScript how a page looks whilst creating an engaging user experience in the least …
Styling your websites can become very complex. Here I'll show how SASS can help you better organize, maintain and reuse your CSS code.
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now