Keith Sebastian

Greenhorn
+ Follow
since Mar 10, 2005
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Keith Sebastian

Did you ever try my suggestion to call document.forms[0].submit() instead of just submit() in your functions?
You should try looking at the browser source after the page has been rendered. Your jsp code makes it tough to determine what might be the problem.

In the following code:
submitForm1("GOTO_VIEW_ONLY_FORM", <c:out value='${item.applicantID}'/>)
What does <c:out value='${item.applicantID}'/> evaluate to? If it's not in quotes and doesn't equal a variable on the page, then it probably will fail.
[ September 27, 2005: Message edited by: Keith Sebastian ]
Chris, I looked through the code, and one thing I noticed is you need to call submit() on a form object.

Since you only have one form, you could try:
document.forms[0].submit();

Edit: I notice you named your form "form". Not recommended. If, for example, you named it "myform" then you could reference it:
document.myform.submit();
[ September 27, 2005: Message edited by: Keith Sebastian ]
For a textbox (element input, type text), maxlength is part of the HTML Specification (link), and is does not even require javascript turned on to properly work. As a test I just tried to copy/paste into a text box with maxlength set, and it didn't paste past the maxlength. Even in a browser as old as Netscape 2.

Now, textareas. That's a different story. If you look at the textarea spec, you'll notice there is no maxlength. If you want to limit characters in a textarea, you'll need to use javascript. Is this where you're having a problem?
[ September 05, 2005: Message edited by: Keith Sebastian ]
You can try an approach of having 7 input type="text" fields one over another, so you can set maxlength on each.

It may not be pretty, but it's easier than trying to enforce your requirements on a textarea.
Ulf already answered the question, but just to follow up on the quotation marks, I just tried it, and putting quotes doesn't work (tested in IE and Firefox). Since disabled is a boolean, you can just do the following:

if (document.yourForm.yourSelect.disabled)

Originally posted by Keith Sebastian:
I had previously written some javascript that used the subtract technique, but I like the 0 way. Thanks.



Maybe I'm the only one who finds this funny, but after I wrote it, I realized that subtracting until getting to the previous month is the same as just setting the date to 0. In fact looping/subtracting is a waste of processing. It's amusing how such obvious things could be overlooked.
I had previously written some javascript that used the subtract technique, but I like the 0 way. Thanks.
Eric, I like the idea of setting the day to 0 to arrive at the last day of the previous month. Is that a common trick, because it's the first I've seen of it.