Note that there are some explanatory texts on larger screens.

plurals
  1. POAdding JavaScript to Classic ASP (new to this)
    primarykey
    data
    text
    <p>I've got a website in ASP.NET that has a little cookie pop up warning when people visit the site. What I wasn't to do is replicate this but for a site that is written in Classic ASP (not my fault) I know the code works, because it works on the current site. How can I reference JavaScript and where does it go in relation to the page? I'm really new to all this so sorry if my questions seem really silly. Thanks in advance for any help. this is the code I'm using:</p> <p>div id="cookieConsentRequest" runat="server" visible="true</p> <pre><code> &lt;p&gt;&lt;span class="queryIcon"&gt;&lt;/span&gt;some text here &lt;a href="#" class="acceptCookiesAnchor acceptCookieSmall acceptCookie" runat="server"&gt;I accept&lt;/a&gt; &lt;a href="Javascript:;" class="infoCookie" title="Tell me more about these cookies"&gt;Click here for more info&lt;/a&gt; &lt;a href="Javascript:;" id="alertBannerHide" class="hideButton" title="Hide this"&gt;Hide&lt;/a&gt; &lt;/p&gt; &lt;/div&gt; &lt;!--[if IE 6]&gt; &lt;script language="javascript" type="text/javascript"&gt; $(document).ready(function () { $('.alertBanner').css("top", ($(window).height() - 29)); }); &lt;/script&gt; &lt;![endif]--&gt; &lt;script type="text/javascript"&gt; $(document).ready(function () { $('.alertBanner').css("left", (($(window).width() / 2) - 360)); $('.alertBanner').delay(1000).slideDown('slow'); $('#alertBannerHide, a.denyCookie').click(function () { $('.alertBanner').slideUp('slow'); $('.cookieInfoWindow').fadeOut('fast'); }); $('.cookieInfoWindow').css("left", (($(window).width() / 2) - 320)); $('a.acceptCookie, .infoCookie').click(function () { $('.cookieInfoWindow').fadeIn('fast'); }); $('#cookieInfoWindowHide, .cookieInfoWindow a.denyCookie').click(function () { $('.cookieInfoWindow').fadeOut('fast'); $('.alertBanner').slideUp('slow'); }); }); &lt;/script&gt; &lt;div class="cookieInfoWindow"&gt; &lt;h3&gt;&lt;a href="Javascript:;" id="cookieInfoWindowHide" class="hideButton" title="Hide this"&gt;Hide&lt;/a&gt;Cookies used on this web site&lt;/h3&gt;&lt;br /&gt; &lt;p&gt;some text here&lt;/p&gt;&lt;br /&gt; &lt;p&gt;some text here &lt;a href="http://www.google.com/support/analytics/bin/answer.py?hl=en&amp;answer=55539" class="externalLinkWhite" title="Read more about Google Analytics (external link)"&gt;Google Analytics&lt;/a&gt; some text here.&lt;/p&gt;&lt;br /&gt; &lt;p&gt;some text herep&gt;&lt;br /&gt; &lt;p&gt;For more information on how cookies are used please visit the following websites:&lt;/p&gt; &lt;ul&gt; &lt;a href="http://www.microsoft.com/info/cookies.mspx" class="externalLinkWhite" title="Information about cookies on Microsoft.com (external link)"&gt;Microsoft Cookie Information&lt;/a&gt;&lt;br /&gt;&lt;br /&gt; &lt;a href="http://www.allaboutcookies.org/" class="externalLinkWhite" title="All about computer cookies (external link)"&gt;All About Cookies&lt;/a&gt; &lt;/ul&gt; &lt;p&gt; &lt;a id="acceptCookiesAnchor" href="#" class="acceptCookie" runat="server"&gt;Yes, I accept the use of cookies as outlined above&lt;/a&gt; &lt;/p&gt; &lt;/div&gt; &lt;/div&gt;--&gt; </code></pre> <p>Sorry about the state of it.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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