• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

passing parameters with LookupDispatchAction

 
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I need to know if there is a way to pass a dynamic parameter from a JSP page to a LookupDispatchAction without using JavaScript. Here is what I'm doing:

I have a JSP page with editable fields; say customer info for example: name, phone, etc. I also have a list of associated orders at the bottom of the screen. I�d like to be able to click on one of these orders and do the following:

1)Save the data on the form (so I need to use a SUBMIT and not just a LINK)
2)Forward the user to another screen based upon the ID of the order they just selected.

One of the constraints that I have is that I cannot use JavaScript because it�s possible that an end-user would have it disabled. This means I can�t add any code in the onClick event for the �order� link that would set a hidden field on the form before submitting it.

Is there a way to do this?

Thanks for the help!
 
Ranch Hand
Posts: 948
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you even submit the form from a link without using JavaScript? It seems like you would have to have a bunch of submit buttons on the page, which would probably look pretty ugly.

The "no JavaScript" rule sounds nice in theory, but it is almost impossible to write a decent web based application without using JavaScript.

- Brent
 
Ben Hagadorn
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Brent,

I created a class in my CSS file that looks like a regular link, not a button. I then use that class when I create the page and the "links" look fine:

.NinePlain_fake_link {
FONT-WEIGHT: 300;
FONT-SIZE: 8pt;
COLOR: black;
BACKGROUND-COLOR: white;
FONT-FAMILY: Arial, Helvetica, Verdana;
TEXT-DECORATION: underline;
border-color: white;
border-style: solid;
border-width: 0;
cursor: hand;}



<input type="submit" value="INFO" class="NinePlain_fake_link" />
 
Brent Sterling
Ranch Hand
Posts: 948
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ben:

Thanks for the info. I did not know that you could change the looks of a "button". Sorry I cannot help you with your question.

- Brent
 
Slideshow boring ... losing consciousness ... just gonna take a quick nap on this tiny ad ...
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic