Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 08-08-2007, 06:16 AM
Member
 
Join Date: Jul 2007
Posts: 9
mutuah is on a distinguished road
JavaScript to Java Statement
Hi all, I have this code. I intent to display States in a drop-down box with A selected in drop-down I and related items for A populated in drop-down II.

When i change selection, i want the drop-down II changed. Am testing my javascript with <%String province;%> = myParam; but seems no results. Can i get help on how to assign javascript var returned by function to a java statement.

I dont want to submit for now.

Thanks in advance.

<script language ="javascript">
function displaySelection(){
var myParam = document.statistics.province.value;
<%String province;%> = myParam;
}
.
.
.

//drop-down I
States <select name="States" onchange="displaySelection()">
<option value="1" selected>A</option>
<option value="2">B</option>
<option value="3">C</option>
<option value="4">D</option>
<option value="5">E</option>
<option value="6">F</option>
<option value="7">G</option>
<option value="8">H</option>
</select>

.
.
.
//drop-down II
ObjectX o = new ObjectX();
<% ArrayList<String> s = o.getString(value);
for (int i=0; i<s.size(); i++) {
%>
<br>
Areas
<select name="Towns">
<option <%=s.get(i).getStringName()%></option>
<%}%>
</select>
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do we exchange data between Java and JavaScript and vice-versa freddieMaize Advanced Java 0 04-07-2008 08:44 AM
Javascript into Excel gdj100 Advanced Java 0 03-12-2008 12:03 PM
Problem with a switch statement in Java baltimore New To Java 2 08-02-2007 05:43 AM
Statement or Prepared Statement ? paty Database 3 08-01-2007 05:45 PM
Jsp and javascript Ed JavaServer Pages (JSP) and JSTL 2 07-04-2007 05:54 AM


All times are GMT +3. The time now is 02:57 PM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org