I've got a Wordpress running on cphdans.dk and are using the plugin Code Embed which let you add JavaScript directly to a post.
The JavaScript I'm embedding is:
<script>
$(function() {
jQuery("#loadTilmelding").load("http://pbs.cphdans.dk/index_dansidk.php#body");
});
</script>
Things work fine in Safari, Chrome and Firefox - but when trying to view the page in Internet Explorer I get nothing loaded.
The developer tools in IE9 doesn't report any errors in this matter.
I've Googled around and found similar issues when the html wasn't validated with w3, but I've done that with the page I'm trying to load into the DOM:
http://pbs.cphdans.dk/index_dansidk.php
When trying to output the loaded content into the log in IE I just get:
LOG: undefined
How can I debug when IE doesn't report any errors, and does anyone know what the issue could be?
Related
Im having some issues presenting a modal on Safari. This currently works in Chrome:
var screenShotDialog = document.createElement("DIALOG");
document.getElementsByTagName("BODY")[0].appendChild(screenShotDialog);
screenShotDialog.showModal();
however, when i try to run this same server on Safari, this showModal() method is appending this dialog to the bottom of my page, while in Chrome it shows it as a "popup". Checking the console logs, im getting
screenShotDialog.showModal is not a function. (In
'screenShotDialog.showModal()', 'screenShotDialog.showModal' is
undefined)
I dont get this error in chrome, looking at the dialog documentation here http://www.w3schools.com/jsref/met_dialog_showmodal.asp I see that this should be supported for Safari ( i have Safari Version 9.0.3 ). Can anyone help this is pretty frustrating.
I'm using this script since years in an old website. Now it's no more working with Google Chrome, but it's ok with Firefox and IE.
If you open that site, you'll see a yellow box. With Firefox and IE it's populated with strings or images scrolling, while with Chrome it remains empty. Can anyone explain why?
see https://stackoverflow.com/a/18444795/420006
.load doesn't appear to be valid in Chrome
I am trying to get an function to run from an event listener on a form submit.
Chrome & Firefox (Iceweasel) work fine with this code. Internet explorer (Version 9) for some reason requires me to open up the developer tools and close it down straight away for the javascript to work, after the page can be refreshed and the code works fine.
The site is published at http://itdipext.ryanteck.org.uk/enquire.html and the javascript is at http://itdipext.ryanteck.org.uk/javascriptValidate.js
Why Internet Explorer 8?, Heck why javascript for basic form validation?
This is for a college assignment where HTML5 does not even exist yet. And internet explorer to make the teacher happy.
Thanks -
Ryan Walmsley
It looks like its due to the heavy use of console.log in your script.
IE doesn't create the console object until dev tools is open. You can add this to the top of your script to stop it breaking
var console=console||{"log":function(){}};
Be aware it wont log anything to the console with this in place.
I know this is an old question but before you dismiss it, just here me out.
I am developing a site and everything (including javascript) works perfect in Firefox 24.0 and Chromium 28.0. I have not tested in IE coz am on an Ubuntu 13.04 machine. I tested in Opera 12.16 and suddenly my javascript doesn't work.
Javascript is checked in opera preferences and all my external jquery and javascript scripts have the type="text/javascript" part. Still no good. I have commented out all my external script files including jquery and then added a
<script type="text/javascript"> alert('JS working'); </script>
in the head. Still no good. Alert working in Firefox and Chrome but not in Opera.
I have checked these questions out, still no good:
javascript not working in OPERA
Javascript does not work in Opera - strange
I don't know what's going on with Opera and its really confusing.
Any help appreciated.
Update:
There are no javascript errors in the dragonfly error console.
Sounds like JS is disabled in Opera. Pless and select Enable Javascript.
Here is a site which I am designing http://ogunsteel.com/eurotech-new/
I am designing this site for last 3 weeks and almost I checked it in 5 browsers Firefox, IE, Chrome, Opera and Safari. All things were going well but today IE stopped showing the main slideshow of the homepage which shows in all other browsers.
IE shows some javascript errors which I am not understanding.....
Addition:
A strange things happening here when I tried with IE8.....when I load the page using IE8 sometimes it shows nothing and sometimes it shows that the page is loaded but some error and the error is " 'imagearray[...].3' is null or not an object" in tab-home.js Line: 41, Char:1
and here is the error code line of tab-home.js file....
if(setting.imagearray[i][3]&&setting.imagearray[i][3].length>setting.longestdesc.length)
setting.longestdesc=setting.imagearray[i][3]}
var slideshow=this
jQuery(document).ready(function($){var setting=slideshow.setting
setting.$wrapperdiv=$('#'+setting.wrapperid).css({position:'relative',visibility:'visible',background:'#444',overflow:'hidden',width:setting.dimensions[0],height:setting.dimensions[1]}).empty()
The error I m seeing in IE8 is
Error: jQuery is undefined
and the error is caused by hoverIntent.js
I've see the source code of your site and I see the hoverIntent.js is included before the jQuery library JS, and it could be a potential problem.
Place the jQuery before all the scripts which uses the jQuery object