Jump to content

2 questions?


eduard
 Share

Recommended Posts

1 An index.html file with a JavaScript in it, is saved as index.js?2 What about this code? <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><head> <meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"> <title>Eduard Lid</title> <link rel="stylesheet" type="text/css" href=ex1.css> <script type="text/javascript"> function swapImg(eduard.JPG,eduard2.JPG){elm = document.getElementById(eduard.JPG);elm.src = (eduard2.JPG);return true;}</head><body><div id="floater"> <ul id="flags"> <li>eng<a href="portfolio.html"><span id="amer"></span></a></li> <li>es<a href="portfolio.html"><span id="spanish"></span></a></li> <li>d<span id="germ"></span></li> <li>nl<span id="dutc"></span></li> <li>f<span id="fren"></span></li> </ul><form action="insert.php" method="POST"> <label for="s_name">Site Name:</label> <input type="text" id="s_name" name="site_name"> <label for="s_url">Site URL:</label> <input type="text" id="s_url" name="site_url"> <label for="Description">Description:</label> <input type="text" id="Description" name="Description"> <input type="submit" value="Add Link"></form></div><!--end #floater --><div id="vertical"></div><div id="main"> <p><img id="eduard" src="eduard.JPG" alt="img Eduard Lid"></p> <p><img id="lake" src="lake.jpg" alt="img lake"></p><iframe id="player" src="http://www.youtube.com/embed/h2AWKgU0cN4" frameborder="0"></iframe><br> <p>Web designer<span class="right">Diseñador de sitios web</span></p> <p>Translator<span class="right"> Traductor</span> <ul id="links"> <li><a href="english.html">more</a></li> <li><a href="spanish.html">más</a></li> </ul></div><!--end #main --><h1>Eduard Lid</h1> <p id="copyright">Copyright © 2012</p></body></html>

Link to comment
Share on other sites

1) you can call it whatever you want, as long as you reference it correctly 2) That code looks pretty wrong. i get what you are trying to do, but more importantly, I think you should explain it to us, because you really need to learn what you are doing form the ground up, or else it will be the PHP forum posts all over again. (but I'm sure it will anyway). I would like you to explain to us what you think the code is doing.

Link to comment
Share on other sites

If the file has HTML in it, it has to be saved with .html or .php extension. .js is only for pure Javascript.
Ok, many thanks
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...