Javascript coding for zopim live chat not visible in IE8 - javascript

In my site pages, I used a javascript coding for live chat from zopim. This works fine in chrome and Firefox. The live chat window is displaying and can able to chat with that window.
But in IE the chat window is not visible. But when using inspect element in IE it highlights the div for the chat window. I tried some other coding from zopim. But I didn't get the result in IE.
I dont know what is the problem. Anybody can help me to solve this issue for live chat. The coding I used
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Sample test zopim</title>
<meta charset="utf-8">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<body>
Sample test Zopim
<!--Start of Zopim Live Chat Script--> <script type="text/javascript">
window.$zopim||(function(d,s){var z=$zopim=function(c){z._.push(c)},$=z.s= d.createElement(s),e=d.getElementsByTagName(s)[0];z.set=function(o){z.set. _.push(o)};z._=[];z.set._=[];$.async=!0;$.setAttribute('charset','utf-8'); $.src='//cdn.zopim.com/?11THLdRhqxNgdgRiWyGwwAv8e4KF6S6G';z.t=+new Date;$. type='text/javascript';e.parentNode.insertBefore($,e)})(document,'script');
</script> <!--End of Zopim Live Chat Script-->
</body>
</html>

It seems to me that its a browser compatibility issue Upgrade and try other IE version hope it works. If the problem is still remain you can communicate with zopim help support team.

Related

How to open bookmarklet in Internet explorer popup window

I have developed the Bookmarklet for Internet Explorer. It works fine when user load it on main browser page.
The issue is, it does not work on the Pop-Up Window of the application.
Most of my users, open the link inside the main page in pop-up, but the bookmarklet is triggered from Favorite window.
The bookmarklet link is not working in pop-up window.
Is there a way to achieve this ?
Try to use code below may help to solve your issue.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr">
<head>
<meta http-equiv="content-type" content="application/xhtml+xml; charset=utf-8" />
<title>WhatsApp</title>
</head>
<body>
<script type="text/javascript">
javascript:(function(){open('https://Microsoft.com/','myWindow','toolbar=yes, menubar=yes, resizable=yes, width=650,height=900,top=0,left=1270');})()
</script>
</body>
</html>

jQuery not working in any browser in Windows 8

jQuery is not working on my Windows 8.1 64-bit machine. Is there any known issue that causes that?
Have tried both CDN (Google, jQuery), and local sources, but none work. I know the code is correct because I've tried various examples to verify, including old code that worked fine before, and code from this YouTube tutorial:
https://www.youtube.com/watch?v=VRnQOcVclS8
I've tried using this script source also, to no avail:
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
How to test: click on a paragraph tag, and it should hide. Click on an H1 tag, and it should toggle open or closed. None of this works for me.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>Demo</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
</head>
<body>
<h1>Heading one</h1>
<p>This is just some text for heading 1</p>
<h1>Heading two</h1>
<p>This is just some text for heading 2</p>
<h1>Heading three</h1>
<p>This is just some text for heading 3</p>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.8.0.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$("p").hide();
$("h1").click(function() {
$(this).next().slideToggle(300);
});
});
</script>
</html>
None of it is working. Not sure what is going on.
Update
Several helpful commenters have tested my code and it appears to work fine on their machines, which really is helpful to narrow down the issue. It has been established that my code is good. So, at this point, to anyone who would offer help, I'm looking for specific information, "known issues", or "gotchas" on why this isn't working for me. I suspect it has something to do with Window 8 or Windows 8.1, but I don't know what it would be.
Change
<script type="text/javascript" src="http"//code.jquery.com/jquery-1.8.0.min.js"></script>
to
<script type="text/javascript" src="http://code.jquery.com/jquery-1.8.0.min.js"></script>
I had problems trying to run code from my computer before, so I just use JSFiddle. If that's not an option for you, trying disabling security settings that you prevent you from running code that's stored on your computer. That or get a website to run it off of.
If you have VisualStudio, you can run code in there and it will work. Just create a blank app and replace all the code and remove references to WinJS. You can get an express version if you don't. Sorry if that's not your preferred option. That was my work-around before I got JSFiddle.
Try With
$(document).ready(function() {
$("p").hide();
$("h1").click(function() {
$(this).next().slideToggle(300);
});
});
Add http://ajax.googleapis.com/ajax/libs/jquery/1.7.0/jquery.min.js
instead of http://code.jquery.com/jquery-1.8.0.min.js
Demo

javascript document ready function

And once again I am stuck in the learning process. I am trying to animate a background of a site using the help provided here. But I am a little stuck. As I am teaching myself javascript (to replace basic actionscript). I like to write line by line instead of copying an pasting so I can understand how things work.
This is what I have so far:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>My Site</title>
<script type="text/javascript">
$(document).ready(function(){
window.alert("function started");
});
</script>
</head>
<body>
</body>
</html>
As you can see the alert window should pop up as the function is started, but it doesn't. Is there a reason why this happens or should I just set up a body onLoad function to handle what I want to do when the page loads?
You forgot to include the jQuery javascript API in your page. It should be included before you use the $() function (which is an alias for the jQuery() function in this case.)
If you check your browser's Javascript console you probably have an exception for trying to use undefined $. (In IE a handy trick while doing web development is to enable the Advanced option for "Display a notification for every script error," but this can get annoying when visiting other sites because lots of developers are lousy about identifying and fixing unhandled JS exceptions! Modern browsers usually use 'F12' (in the US at least), to open the developer tools for debugging Javascript, etc.)
Corrected code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>My Site</title>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function ()
{
window.alert("function started");
});
</script>
</head>
<body>
</body>
</html>
This example uses the Google-hosted jQuery API, but you may also choose to download jQuery from http://jquery.com
Demo
http://jsfiddle.net/dvADs/
You are missing library reference~! like this
<script type='text/javascript' src='//code.jquery.com/jquery-2.0.2.js'></script>
Hope rest feeds your needs :)
Basics: http://jqfundamentals.com/chapter/jquery-basics
JQ CDN: http://jquery.com/download/
$(document).ready(function(){
window.alert("function started");
});
You are not first loading jQuery. jQuery is a library that you are trying to call by using the $. You can download it here: http://jquery.com/download/. Make sure you load jQuery before the javascript code.

IE ignores my js

I have validated this html. When I open it in a IE browser I cant see any alert. In other browsers I can. Any ideas why this is happening. HTML is valid according to http://validator.w3.org/check.
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/1998/REC-html40-19980424/loose.dtd">
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>hello</title>
</head>
<body>
<script type="text/javascript">alert("hallo");</script>
<div>Hello</div>
</body>
</html>
If you are opening the file locally in IE, you will a find confirmation message from IE saying
"Allow blocked content"
Click on it and your code will run.

An invalid or illegal string was specified when implementing basic Sharethis code

I'm trying to implement ShareThis buttons on a page, but cannot get the basic options to work in FF or Chrome, on win 7 or Vista.
Chrome has no plugins. Have disabled FF plugins.
Not sure if the problem is some dumb mistake I'm making, or if it is with ShareIt JS code.
Steps:
1. Signed up
2. Went to http://sharethis.com/publishers/get-sharing-tools
3. Completed the 3 steps (changes: Added Pinterest and removed ShareThis button
4. Created a html file and pasted the code
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Language" content="en-us" />
<script type="text/javascript">var switchTo5x=true;</script>
<script type="text/javascript" src="http://w.sharethis.com/button/buttons...; /script>
<script type="text/javascript">stLight.options({publisher: 'beea8274-700e-4d53-aeff-393478c86a40'}); </script>
</head>
<body>
<span class='st_facebook_large' displayText='Facebook'></span>
<span class='st_twitter_large' displayText='Tweet'></span>
<span class='st_linkedin_large' displayText='LinkedIn'></span>
<span class='st_pinterest_large' displayText='Pinterest'></span>
<span class='st_email_large' displayText='Email'></span>
</body>
</html>
On Page load in Firefox I get SyntaxError: An invalid or illegal string was specified.
Email button popup just says 'loading....', and 'Pick one or more destinations:' has no options.
Pulled much hair out over this.
Thanks
Have you deployed your html file on a server before testing it on a browser. If you are testing the html file directly by placing on your Desktop or some other folder, then it will not work. You need to deploy the html file to a server eg: Tomcat or whichever you are comfortable with.

Categories