sKunKbad Posted June 13, 2009 Share Posted June 13, 2009 I've got a js file that calls some image files, but I need the locations of the images in the file to be absolute, because they are called from dirs and sub-dirs. The problem is I get the secure/unsecure items warning, so I'm looking for a way to have javascript determine to use https or http. Haven't found anything yet. Link to comment https://forums.phpfreaks.com/topic/162048-solved-can-javascript-know-if-https/ Share on other sites More sharing options...
Axeia Posted June 13, 2009 Share Posted June 13, 2009 How about another approach, simply get the url via javascript and then paste your relative path after that.. and use that full path? Link to comment https://forums.phpfreaks.com/topic/162048-solved-can-javascript-know-if-https/#findComment-855084 Share on other sites More sharing options...
.josh Posted June 13, 2009 Share Posted June 13, 2009 document.location.protocol Link to comment https://forums.phpfreaks.com/topic/162048-solved-can-javascript-know-if-https/#findComment-855213 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.