It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming HTML Forum

Html and js trouble

Html and js trouble

Postby Leonz on Mon Nov 08, 2010 1:15 pm

Hi all fellow scripters :)
Today i will show my js trouble .See if you can help me.

<link rel="stylesheet" type="text/css" href="css/styles.css" />
<link rel="stylesheet" type="text/css" href="css/shadowbox.css" />
<link rel="shortcut icon" href="http://www.i-c-u.se/favicon.png" />
<script type="text/javascript" src="shadowbox.js"></script>
</script>

</script>
<script type="text/javascript">
//<![CDATA[
document.write(unescape('<link rel="stylesheet" type="text/css" href="styles.css" />
<link rel="stylesheet" type="text/css" href="shadowbox.css">

<script type="text/javascript">
Shadowbox.init({
handleOversize: "drag",
modal: false
});
</script>

</head>




They dont want to work together :roll:
Leonz
 
Posts: 2
Joined: Mon Nov 08, 2010 1:03 pm

Re: Html and js trouble

Postby HotNoob on Tue Nov 09, 2010 5:15 am

javascript is supposidely not as syntax sensitive compared to PHP in terms of semi-colans, but at what costs?

Javascript will read a line break in the code the same as if you were to write a ';'
and it'll break the quotes right their as well...

So you have to remove all of your line breaks.
--
ps, you have a ton of HTML errors in that, and open brackets n stuff
---
i'm not sure exactly what your trying to do with it, so from what i can tell from the code...
i'm guessing one of these two options is what you are looking for
Code: Select all
<head>
  <link rel="stylesheet" type="text/css" href="css/styles.css" />
  <link rel="stylesheet" type="text/css" href="css/shadowbox.css" />
  <link rel="shortcut icon" href="http://www.i-c-u.se/favicon.png" />
  <script type="text/javascript" src="shadowbox.js"></script>

  <link rel="stylesheet" type="text/css" href="styles.css" />
  <link rel="stylesheet" type="text/css" href="shadowbox.css">
  <script type="text/javascript">
  Shadowbox.init({
    handleOversize: "drag",
    modal: false
    });
  </script>

</head>

or the less probable
Code: Select all
<head>
  <link rel="stylesheet" type="text/css" href="css/styles.css" />
  <link rel="stylesheet" type="text/css" href="css/shadowbox.css" />
  <link rel="shortcut icon" href="http://www.i-c-u.se/favicon.png" />
  <script type="text/javascript" src="shadowbox.js"></script>


  <script type="text/javascript">
  document.write(unescape('<link rel="stylesheet" type="text/css" href="styles.css" />'+
                          '<link rel="stylesheet" type="text/css" href="shadowbox.css">'+
                          '<script type="text/javascript">'+
                          'Shadowbox.init({' +
                          'handleOversize: "drag",'+
                          'modal: false'+
                          '});'+
                          '</'+'script>'));
  </script>

</head>


just a tip, you should look at learning more about the basic HTML opening and closing tags.
HotNoob
100+ Club
 
Posts: 169
Joined: Sun May 02, 2010 1:38 am

Re: Html and js trouble

Postby Leonz on Tue Nov 09, 2010 7:53 am

Thanks a lot for the tip! I will try that and yes i should learn little bit html reading :)
Leonz
 
Posts: 2
Joined: Mon Nov 08, 2010 1:03 pm


Who is online

Users browsing this forum: No registered users and 12 guests