Win a copy of Microservices Testing (Live Project) this week in the Spring forum!

J P Nelson

Greenhorn
+ Follow
since Dec 16, 2004
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 J P Nelson

Eric,

I've tried the getElementById call as well with the same results. It works fine in IE but not in Firefox.

I will try the direct assignment instead of setAttribute and see what that does.

TIA,

Joe

FOLLOW-UP

I've tried the following variations with the same result:



and


[ May 31, 2007: Message edited by: J P Nelson ]
Hi all,

I have an application using frames than in most cases I have NORESIZE turned on (to lock the sizes). In one area of the application, I have to turn this off to let the user resize two of the subframes.

My frame sets are defined as:



I'm turning resize on with:



This is working just fine in IE, but not in Firefox.

Can anyone enlighten me as to the error of my ways?

[ May 31, 2007: Message edited by: J P Nelson ]
[ May 31, 2007: Message edited by: J P Nelson ]
Eric,

I just tested the solution. It turns out that IE and Firefox seem to process the onclick event in slightly different ways. In IE the selection hadn't been registered when the function was called, so there was no selection.

I changed the event to onchange and things seem happy now.

Thanks anyway.

Joe
OK, the problem is actually coming when I get the selected index. It comes back as -1.
I'm trying to copy a selected element from one select list to another. The code below works fine in Firefox but throws an error in IE.

Can someone tell my why its failing in IE?

The error is: Object doesn't support this property or method.

The error occurs on the line where I get newValue.

The last part of the code sorts the selected list.


[ May 17, 2006: Message edited by: J P Nelson ]
Good call.

I'm having to get the element indirectly, but the idea is what I needed.

Thanks!
Hi all,

I have a form that has several submit buttons, each with a different name. My JSP code uses the name to figure out how to process the forms. The forms basically allow the user to page through a list of data.

On each form, I have a textbox associated with a submit button that allows the user to jump to a specific page in the data, the page is specified by the value entered in the text box.

My users want to enter the page number in the text field and then hit the Enter key to submit it. I've found out how to capture the key press and see that it is the enter key that was pressed (keyPress == 13...).

If its the enter key, I can call submit, but is there then a way to fool the application into thinking that the corresponding submit button was pressed? Is there a way to set a request paramater associated with the submit action?

Thanks,

Joe
If each row is a separate object, you can just create a collection of the objects and iterate over them with the struts logic:iterate tag.
17 years ago
Have you tried to populate the form with a setup Action class? Using this, the action would go from the action setup class to pre-poulate and display the form, then the submit button would go to the handler action class.
17 years ago
Could you provide example code. What you are describing doesn't register in the brain cells...

Its Monday...

Additionally, I want to get the flags into the Java code. I want to be able to act on them withing my action class.
[ January 17, 2005: Message edited by: Joseph Nelson ]
17 years ago
In my struts page, I am using logic:iterate to cycle through a list of objects in an ArrayList to display my data. Several of the fields can be changed by the user.

I'm trying to set an onchange event on the control (html:radio) and have the associated javascript set a flag in the appropriate object in the array list. I've tried many ways of formatting the javascript and can't get it to register.

My current line is:

document.ManageEntryPointForm.list[recNum].changeFlag.value="true";

where ManageEntryPointForm is the name of the form, list is the alias for the array list as defined in the logic:iterate, recNum is the index number from the iterate passed into the javascript as a parameter, and changeFlag is the attribute in the object from the ArrayList.

Can anyone tell me what I am doing wrong?

Thanks,

Joe
17 years ago
Is there a struts way to trap when the user navigates out of an application or closes the browser? We would like to catch this and give them a chance to save their work before doing leaving so un-gracefully.
17 years ago