Note that there are some explanatory texts on larger screens.

plurals
  1. PODifferent behaviors while using localhost and server name
    text
    copied!<p><img src="https://i.stack.imgur.com/55lpo.png" alt="enter image description here">I wanted to drag an image around inside a div, which I did using the jQuery UI draggable function. </p> <p>HTML:</p> <pre><code>&lt;html xmlns="http://www.w3.org/1999/xhtml"&gt; &lt;head&gt; &lt;title&gt;&lt;/title&gt; &lt;script src="jQuery/jquery-1.8.3.min.js" type="text/javascript"&gt;&lt;/script&gt; &lt;script src="jQuery/jquery-ui-1.9.2.custom.min.js" type="text/javascript"&gt;&lt;/script&gt; &lt;script&gt; $(document).ready(function () { $('#dragme').draggable(); }); &lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;div id="container" style="width:300px;height:300px;overflow:hidden;margin:auto;border:solid 1px black"&gt; &lt;img src="http://img.thesun.co.uk/multimedia/archive/01650/greats_1650266a.jpg" id="dragme" /&gt; &lt;/div&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>You can see the demo <a href="http://jsfiddle.net/y6XVD/" rel="nofollow noreferrer">here</a>. Works fine, however, the problem started when I hosted the same on IIS. When I use http:// localhost/mysite, the page works fine on Chrome and IE, however when I use http:// servername/mysite, on IE, the page goes for a toss. The entire image is shown on the div. <a href="https://i.stack.imgur.com/r2IRv.png" rel="nofollow noreferrer">(Snapshot)</a>. <img src="https://i.stack.imgur.com/r2IRv.png" alt="Snapshot of the erroneous page"> I can still drag the image around, though.</p> <p>I fail to understand why this happens. I have encountered problems in the past as well where the behavior of http:// localhost/mysite and http:// servername/mysite have been different.</p> <p>Can anyone please explain why this is happening? Thanks in advance.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload