Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Linux Archive
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 11-20-2007, 06:29 PM
Member
 
Join Date: Nov 2007
Posts: 1
nilz is on a distinguished road
Communicating with JSP and popup
Hi friends,

Here is my question. This is what I am trying to do.

1) In refactorCGR.jsp

function popupKeywordAdditionJSP(regionID){
var handleToPopUp = window.open("/tigr/t4/admin/tinaController/AddKeywordsAction","popupWindow","status=1,locatio n=0,menubar=0,resizable=1,height=400,width=600,lef t=20,screenX=20,top=40,screenY=40");
}

function updateKeywordListBox(regionSelectControl){
var val= regionSelectControl.value ;
if(val==229000000){
document.getElementById("america").style.display=' ';
document.getElementById("europe").style.display='n one';
document.getElementById("asia").style.display='non e';
document.getElementById("japan").style.display='no ne';
}else if(val==229000001){
document.getElementById("america").style.display=' none';
document.getElementById("europe").style.display='' ;
document.getElementById("asia").style.display='non e';
document.getElementById("japan").style.display='no ne';
}else if(val==229000002){
document.getElementById("america").style.display=' none';
document.getElementById("europe").style.display='n one';
document.getElementById("asia").style.display='';
document.getElementById("japan").style.display='no ne';
}else if(val==229000003){
document.getElementById("america").style.display=' none';
document.getElementById("europe").style.display='n one';
document.getElementById("asia").style.display='non e';
document.getElementById("japan").style.display='';
}

}


<tr>
<td>
<select name="regionSelect" onchange="updateKeywordListBox(this)">
<c:forEach var="region" items="${bean.qsheetRegionBeanList}">
<option value="${region.id}">${region.name}</option>
</c:forEach>
</select>
</td>
</tr>

<tr id="america">
<td>
<select name="keywordSelect">
<c:forEach items="${requestScope.Amer}" var="keyword">
<option value="${keyword.id}">${keyword.keyword}</option>
</c:forEach>
</select>
</td>
</tr>

<tr id="europe" style="display: none">
<td>
<select name="keywordSelect">
<c:forEach items="${requestScope.Euro}" var="keyword">
<option value="${keyword.id}">${keyword.keyword}</option>
</c:forEach>
</select>
</td>
</tr>

<tr id="asia" style="display: none">
<td>
<select name="keywordSelect">
<c:forEach items="${requestScope.Asia}" var="keyword">
<option value="${keyword.id}">${keyword.keyword}</option>
</c:forEach>
</select>
</td>
</tr>

<tr id="japan" style="display: none">
<td>
<select name="keywordSelect">
<c:forEach items="${requestScope.Japa}" var="keyword">
<option value="${keyword.id}">${keyword.keyword}</option>
</c:forEach>
</select>
</td>
</tr>

<tr>
<td><input type="button" name="refactorCGR" value="Add Keywords"
onclick="popupKeywordAdditionJSP()" /></td>
</tr>


The updateKeywordListBox does the dunction of hiding each <tr> on selection any
value from regionSelect control.
When the user clicks the Add Keyword Buttons a new window pops up as per JScript
that i have written

2) Inside addKeywords.jsp

This Jsp is launched succesfully. Now here I do database transaction retreive
say 3 to 4 rows with checkbox. The user selects the desired rows which has
keywords.

I am able to capture the selected Keyword and in checkbox thier ID which is
primary key of that row.

<input type="submit" value="Add Checked Keywords" onclick="postDataToParent()"/>

Now on click of this Button I want to send the selected rows to the parent JSP.
And this keywords should be displayed in the right select control out of the
4 controls that are present in refactorCGR.jsp

I tried this

function popupKeywordAdditionJSP(){
window.opener.document.myForm.keywordSelect.value =document.forms[2].keyword.value;
window.close();
}


I am not able to pass the data and display this exactly in the right selectbox of
the parent refactorCGR.jsp


It is urgent. Please help.

Regards,
Nilz
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 to create Popup Menu with Sub Menu while right-clicking the JTree Node?? Kabiraa AWT / Swing 7 05-09-2008 09:54 AM
how we get popup window in java baserohit Advanced Java 1 03-22-2008 06:39 AM
Popup in Java fernando New To Java 1 08-07-2007 08:55 AM
Java Popup Window & Url Query String Value Rivelyn New To Java 1 06-29-2007 12:48 AM


All times are GMT +3. The time now is 03:56 PM.


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