• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

jsp vs asp forms big problem

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hithere, im some kinda newbie to javaserverpages, now i got some weird problem: i have a field of radio buttons that can vary in their amount, cause they are generated by a db query. the user can modify the selcted values. after he has to click safe, and the
'map' of clicked radio buttons is stored back in the db. as i have no 'for each' etc clauses in jsp i have no clue how to do this the rite way, the thing below just works fine in asp, but some1 could tell me the way with jsp?
<%
if Request.Form.Count > 0 then
for each entry in Request.Form
if not (entry = "x" or entry = "y") then
set db = Server.CreateObject("ADODB.Connection")
db.Open cc_database
sql = "update languages set spr_inuse = " & Request.Form(entry) & " where lan_seq = " & entry
set rs = db.Execute(sql)
db.close
set db=Nothing
set rs=Nothing
if not err.Number=0 then
%><p>error in db: <%=err.Description %></p><%
Response.End
end if
end if
next
end if
%>
 
Desperado
Posts: 3226
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Eric: Thanks for your question... but
When folks register, the one rule they agree to is "For your user name, use a first name, a space and last name.
Obviously fictitious names, or improperly formatted names may be locked out."
This does not mean that if your formal name is Michael Jingleheimerschmidt that you cannot use "Mike Schmidt". In
fact, one of our prestigeous sherriffs is "Mahalakshmi Annadurai", but you know her as "Maha Anna".
Using an unregistered alias for your first few posts is understandable. You're not quite yet comfortable with this
group. But after a few posts, it's time to register and follow the rules. For some forums, abuse of the name rules
has led to not allowing unregistered accounts. So, you will need to create a registered account that follows the
rules.
It is possible that you are horribly paranoid about using your real name on the web. This happens. In that case, feel
free to register using a fictitious name, although this will probably be a disadvantage to you in the future. Use
something like "Al Swensen" or "Rob Cheeny". Do not use cute names like "Justin Case" or "Adam Baum". Do not use
the names of celebrities.
If you are currently using an account that uses an inappropriate alias, please create a new account that follows the
rules. The software we use here is not capable of changing the name on an existing account and we have unlimited
account slots.
I want to maintain a professional exchange on JavaRanch so that corporate america won't feel embarassed to find
employees spending time here.
If a moderator or administrator has directed you to this message and you choose to not follow the rules, there is a
good chance that your improperly registered account could be locked and your unregisted postings deleted. Please
note that your IP is tracked and you might find your IP is blocked.
There are really only two rules you are asked to follow here:
1) Be decent to your fellow ranchers (we really haven't had any trouble with this one)
2) Use an appropriate name (we've had trouble with this one).
I hope that the value of participating on JavaRanch is worth sacrificing a single-name username.

[This message has been edited by Tony Alicea (edited January 18, 2001).]
 
Tony Alicea
Desperado
Posts: 3226
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Eric:
I noticed that your question is about ASPs (?), not JSPs which is the subject of this forum (we don't care for Microsoft web techniques )
[This message has been edited by Tony Alicea (edited January 18, 2001).]
 
eric
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
sorry for the name, i didnt know that i had to givein ma last name, ill fix this
ma question wasnt only asp, im only new to jsp and needed some help to convert ma stuff into jsp... btw i reached a new high
in getting the data of all radio buttons on 1 site with this:
String paraname = "";
for (Enumeration selectedValues = request.getParameterNames();selectedValues.hasMoreElements(); ) {
paraname = selectedValues.nextElement().toString();
out.print("|"+paraname+"|");
out.println(request.getParameterValues(paraname));
}
problem is that it doesnt werk n1ce,2, so probably some1 could have some look at the code i snippet outta the api?
btw again sorry 4 name problems cya
 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
name fixed....
 
Tony Alicea
Desperado
Posts: 3226
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Eric for changing your username...
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic