actually it's a very good habit when posting questions here to include all the relevant information (rendered html, js and css) in the one code block. It saves people having to ask to see other bits and makes it easier to test your code. Once you have your code working you can do what you like with it.
I've never been hugely swayed by the separation of concerns arguments. If you are working on large frameworks with multiple pages depending on the same external files, of course it makes sense. But to create a separate js file for a few lines of code seems unnecessarily dogmatic.
10-13-2012, 02:13 PM
What do you mean by :
if (middlename == null);
why null and what did you expect from that?!
try to keep it simple and do
and you're on gear.
10-13-2012, 02:16 PM
that will never work...
10-13-2012, 02:24 PM
seeing this: getElementById("demo").innerHTML= "IT WORKS!!!";}}</script>
First Name: ....<input type="text" id="firstname">...
I presumed he was shorting out the illustration of his problem and that on his original code stands a properly written document.getElementBy(id) instead.
10-13-2012, 02:28 PM
10-13-2012, 05:52 PM
My answer to this would have been 'Use the error console", but I don't like to repeat myself too often.
10-13-2012, 06:59 PM
and how would that help against syntactically correct code but semantically wrong meaning of a chosen expression? nothing can guard you against your own laspus lingua.
10-13-2012, 08:58 PM
Originally Posted by Troy III
and how would that help against syntactically correct code but semantically wrong meaning of a chosen expression?