Dave Ni

Greenhorn
+ Follow
since Jan 11, 2010
Merit badge: grant badges
For More
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 Dave Ni

Hi all. Been struggling with this one for a while. Does anyone know of a way to trigger select elements dropdown expansion by JavaScript as if you had clicked on the object?

Basically I have an Ajax service call which should trigger on change, which works well for mouse users, but keyboard users pressing the down arrow fires constant requests as each keypress is a change event. This slows the screen and puts extra load on the backend.

I have a solution which on keydown or keyup puts a layered div below the select which basically fakes the dropdown expansion, but its messy and not reliable.

Any thoughts as to how to trigger the dropdown to expand? Been searching this for a while but can't find anything.

Any suggestions appreciated. FYI, firing the onclick event does not seeem to do it but open to suggestions.

Thanks

Dave
David, thank you for the reponse, I agree with everything your have said.

The old app being ported has some jQuery & Ajax, of which I am a bit fan off. I agree with your point on code generation, I am a big believer in code seperation (have the tags render the content and then get jQuery to handle the UI features) as we have already been burnt by other Ajax code generating tags (JSF). My app is very high volume so anything that takes the load off the server is a big win. I am also pushing for JavaScript unit testing which would be harder (if not impossible) with generated code.

The fact that jQuery is the future direction for S2 is pretty much what I needed to hear.

Thanks

Dave
14 years ago
Hi all, long time reader, first time poster.

I am looking at porting a highly complex app from Struts 1.2 into Struts 2.1 and a few outside consultants are recommending that we use Struts 2.1 with DOJO (they specifically mentionned DOJO). However from what I can tell on the documentation site, Struts 2.1 has deprecated DOJO due to it being based on an old version and other issues.

Anyone care to fill me in on what the latest is with Struts 2.1 and Ajax/DOJO? I have been looking at sites all day trying to get up to date info but just when I find I have something, I notice its a little out of date. Has Struts decided on a replacement approach to implment Ajax or is it all still up in the air?

Any info greatly appreciated.

Thanks
14 years ago