CodeIgniter Forums

Full Version: help? js
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

For some reason my javascript isnt working?
<title><?php echo $title;?></title>
<meta name="viewport" content="width=device-width" />
<link href="//" rel="stylesheet" />
<sript type="text/javascript" src="//"></sript>
<sript type="text/javascript" src="//"></sript>
<sript type="text/javascript" src="//"></sript>
&lt;!--Google Analytic's--&gt;
<sript type="text/javasript">

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-34350337-1']);
  _gaq.push(['_setDomainName', '']);
  _gaq.push(['_setAllowLinker', true]);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '';
    var s = document.getElementsByTagName('script')[0]; s[removed].insertBefore(ga, s);

do any of you know why?
by the way i put "sripts" instead of "scripts" because if you put that for some reason it says "removed"

El Forum

What's not working about your JS? Do you see any error printed out?

BTW: Is it a typo or why do you have
without a leading http:?

El Forum

Remove "sript" and put back "script"

That's funny.

El Forum

[quote author="Captain_Fluffy_Pants" date="1348348953"][...]
by the way i put "sripts" instead of "scripts" because if you put that for some reason it says "removed"[/quote]

The OP changed scripts to sripts so it won't be removed by this forum's sanitizer Wink

El Forum

1) "//..." is a common way to allow the resource to be either https or http, and works just fine

2) you have your jquery as the second resource, but I believe your bootstrap.js depends on it being loaded

3) please don't post code and say it's "not working" with nothing else. The is a programmers' forum - talk like a programmer