• 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:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Help

 
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear Ranchers,

I'm trying to access a javascript variable value in JSP form.
I have a combo box which has some value.
On selecting one of its value I run a query with that parameter via setting up that parameter using preparedstatemnet.
But i don know how to access this value in JSP bcos its a javascript var.
here is code:
----------
(?,?):
one of question mark is loginid which i can access but another parameter is the one that I'm getting thru combo box --i.e.document.frmboids.otherboids.options[document.frmboids.otherboids.selectedIndex].value
---------------------------------------
if (ie)

msg7+='<select name="otherboids" size="1" onchange="return pgdropdnchk1(document.frmboids.otherboids.options[document.frmboids.otherboids.selectedIndex].value,document.frmboids)" style="font-size: 11px; font-family: Arial; color: Black;">';
var boid = document.frmboids.otherboids.options[document.frmboids.otherboids.selectedIndex];
alert("BOID: " +document.frmboids.otherboids.options[document.frmboids.otherboids.selectedIndex].value);

<%
sqlquery = "select * from the (select cast(vw.bo_init(?,?) as cdsl_admin.initial_tbl ) from dual)";

PreparedStatement preparedstatement1 = conn.prepareStatement(sqlquery);

preparedstatement1.setString(1, userinfo.getLoginid());

preparedstatement1.setString(2, boid.value);

rs = preparedstatement1.executeQuery();

while (rs.next()) {

--------------------------------

plz help me..
Thanks,
Amol
[ March 17, 2006: Message edited by: Bear Bibeault ]
 
Ranch Hand
Posts: 1704
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Duplicate of
https://coderanch.com/t/289331/JSP/java/Help
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
read this
reply
    Bookmark Topic Watch Topic
  • New Topic