Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About Pollux

  • Rank

Previous Fields

  • Languages
    XHTML, CSS, JavaScript, PHP, SQL, Java

Contact Methods

  • Website URL
  • ICQ

Profile Information

  • Location
  1. The first thing you should probably learn is that Java and Javascript are very different. Java is a fully fledged programming language comparable to C/C++, for developing standalone applications. That's definitely not what you want in this case. Javascript on the other hand, looks a little bit like Java on the face of it (hence the name), but is fundamentally completely different. Javascript is used predominately as a client-side web programming language, which is exactly what you're after. Next stop -> w3schools javascript tutorial . Good luck!
  2. On refresh the last selected option will be displayed. You cannot override this with HTML but you can with some javascript. You'll need to read the javascript tutorials to understand this properly but the basic idea will be to set an onload event on the body which will call a javascript function which you will define in the head to set the selected option to "none". If you need more help with this then post in the javascript forum.As jlhaslip says, you should really have a doctype too. It might make things easier in the long run. Have a read of this: w3Schools DOCTYPE.
  3. You're quite right, local variables are only local to the extent of the function they're in. I'm too much of a Java programmer
  4. If you are using xDoc on the other pages that are using loadXMLDoc() then it is indeed strange that they work since the xDoc variable is definitely not visible outside that function unless you've defined it outside. The other problem I've just seen is that you call process_cookie() which calls doIt() directly inside the head BEFORE you even call loadXMLDoc(). But even if you had called loadXMLDoc() before, since it is asynchronous you need to make sure it has returned before calling doIt(). So you should be calling doIt() either directly or indirectly from the onreadystatechange function.
  5. xDoc appears to be local to that if statement inside loadXMLDoc(), so when you're using it later inside doIt() it doesn't exist.
  6. xDoc = null; Try changing this to... var xDoc = null;
  7. Firstly, I'd say that you could probably achieve more and in a nicer way, if you were to add a server-side language such as PHP into the mix. But since you're just starting out we'll keep to HTML and Javascript for now. There's two parts to this problem - the slide-show of images on the second page, and then the setting of the initial image via the links on the first page. So to take them one at a time...1) Slide-show.You'll probably want to store information about your images in an array, and you'll need some sort of variable to store the current index in that array. Then you can write 2 func
  8. This isn't a trivial thing to do, but you would need to use Javascript, CSS and probably some Ajax. You could use a javascript/ajax toolkit to give you a head start, Dojo is my favourite. This will do the hard work for you but you'll still need fairly strong Javascript.
  9. Pollux

    Northwind Database

    I believe the NorthWind database is an example database that comes with MS Access. It don't know if it's available in SQL Server.
  10. Pollux

    Js Help!

    Just to correct a couple of minor mistakes...The toggle_display() function should be: function toggle_display (id) { el = document.getElementById(id); if (el.style.display != "none") { el.style.display = "none"; } else { el.style.display = "block"; }} Otherwise it won't toggle correctly. Also, when calling the toggle_display() function, the parameter should be a string. So the other snippet would be more like this: <span class="something" onclick="toggle_display('my_div')">(-/+)</span><div id="my_div"> Hidden Text</div>
  11. The problem is the line of CSS in your head: body {padding: 0px; margin: 150px 0px 0px 0px;} This adds a margin of 150px at the top of your body. The body is the visible bit of your page, which is why you need to put the image and center tags inside there not the head. The easy solution is just to remove this line completely, or alternatively you could change the "150px" to "0px". That will stop your logo being pushed down.
  12. I'd recommend sticking with using the .php file name extension for PHP files unless you have a good reason. The obvious reason for this is that if you're just learning PHP then it will help to keep things simple. The less obvious reason for this is that you then wouldn't be able to have .html files that don't require any PHP. You'll still be forcing these files to go through the PHP interpreter, adding an unnecessarily overhead.If you've got your mind set on using the .html extension for php files though...Go to the 'www' root (where your html docs are stored), look for a file called .htaccess
  13. Java and Javascript are different languages, it was Javascript the person answering in the HTML forum was referring to. However, the other answers in your original thread are more useful to you. Your DTD shouldn't be strict, it should be frameset. But, as already mentioned, if at all possible avoid the temptation to use frames all together.
  14. I don't really understand why you're arguing against this. You can use CSS for the same thing.That's not true. CSS can provide different styles, but XSLT will actually change the structure, reorder components and make decisions based upon the structure. It's impossible to achieve that with CSS. It's true that a well coded HTML site is better than a badly coded XHTML site, but that's not the point here. I'm sure you don't use any different approach because you probably follow good practice with HTML anyway. This point is most relevant for people learning (X)HTML. As with programming it's impo
  15. This sounds quite a lot like a homework project which many people are going to be reluctant to help you with. It's normally preferred if you attempt the problem and ask a slightly more specific question about what you get stuck on. Just to get you started, it sounds like you need a HTML form which takes the student ID, mark etc. The form needs to submit the values to your asp script. Read the ASP tutorial to find out how to retrieve the values from the form, perform the calculations you need and return a response.
  • Create New...