Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

*display* passed values in webpage form

 
Stephen Huey
Ranch Hand
Posts: 618
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm sending my JSP/servlet website users to an external webpage (which is an ASP page), and I want to automatically fill out a form on the other site by passing form values as parameters in the URL. I'm trying to do that, and I may be doing it correctly, but I'm wondering if there's any way I can get it to display my passed values in the form field textboxes, or if that's impossible since it's an ASP page and their values in the outputted HTML are already hardcoded to nothing. For instance, here's the one for the phone area code:
<input type="text" name="F10089" size="3" maxlength="3" value=""> length
I'm trying to use this URL:
http://account.othersite.com/Setup/CollectInfo.asp?F10025=543
When I use this URL, the fields simply remain blank.
I'm guessing folks usually always submit at the same time as passing values to a form, and so maybe that's why it's not working. I don't want to submit it yet b/c I want to give the user a chance to double check the values. (I also want to test to make sure I'm passing appropriate values).
Thanks...
[ August 20, 2003: Message edited by: Stephen Huey ]
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64827
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Unless the target page has specific server-side or client-side code to take your request parameters and stuff them into the form fields, no such pre-filling is possible. On its own, HTML will not match up incoming request parameters with form fields of the same name.
And since it is an external page, there's not much you can do about it. (If the page existed in the same domain, you could possibly open the page in an iframe or another window and manipulate it with Javascript -- but that's only allowed between pages in the same domain).
bear
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic