Posted By: Anonymous
<input type="text" name="txtJob" value="software engineer">
I only get: “software” from the above. I am using a script like this:
var jobValue = document.getElementById('txtJob').value
How do I get the full value: “software engineer”?
+1 Gumbo: ‘id’ is the easiest way to access page elements. IE (pre version 8) will return things with a matching ‘name’ if it can’t find anything with the given ID, but this is a bug.
i am getting only “software”.
id-vs-name won’t affect this; I suspect what’s happened is that (contrary to the example code) you’ve forgotten to quote your ‘value’ attribute:
<input type="text" name="txtJob" value=software engineer>