popup window checkbox and sbumit button

popup window checkbox and sbumit button

Hi,

Requirement: popup window having multiple checkboxes, I have to select couple of checkboxes and click the submit button.

I am unable to get the check box values... need help on this ....

my javascript code:

function openWin(form) {

var countryName = " ";


var countries = form.countries.value;
var myStringArray = new Array();
var stringCount = countries.split(",");  
for(var i=0;i<(stringCount.length)-1;i++){
    myStringArray.push(stringCount[i]);
}



    for (var i = 0; i < myStringArray.length; i++) {

            display=window.open('','NewWin','menubar=0,location=no,status=no,directories=no,toolbar=no,scrollbars=yes,height=500,width=500')
            message="<font face='verdana, arial, helvetica, san-serif' size='2'><form>";
            message+="<input type='checkbox' name='listCountry'  value='myStringArray'/>" +myStringArray[i]+ "<br />";
            message+="</form></font>";
            display.moveTo(30,20);
            display.document.write(message); 
            if(myStringArray[i].checked == true){
                countryName = countryName + myStringArray[i] + " ";
            }  
      }
    message="<input type='button' name='countryName' value='Submit' />"+"    "+" ";
    message+="<input type='button' name='Cancel' value='reset' />" ;
    display.document.write(message);    
    window.location.replace("ADTReports.jsp?countryName="+countryName);

}

View Answers

February 28, 2012 at 2:53 AM

in countries i am getting countries as India, France, Usa


February 29, 2012 at 4:52 PM

1)index.html:

<html>
<form>
<input type="button" value="New Window!" onClick="window.open('subform.html','window','width=400,height=200')">
</form> 
</html> 
<%
String select[] = request.getParameterValues("id"); 
if (select != null && select.length != 0) {
out.println("You have selected: ");
for (int i = 0; i < select.length; i++) {
out.println(select[i]); 
}
}
%>

2)subform.html:

<html>
<form action="index.html">
<pre>
Select Languages: <input type="checkbox" name="id" value="Java"> Java
                  <input type="checkbox" name="id" value=".NET"> .NET
                  <input type="checkbox" name="id" value="PHP"> PHP
                  <input type="checkbox" name="id" value="C/C++"> C/C++
                  <input type="checkbox" name="id" value="PERL"> PERL <BR>
                  <input type="submit" value="Submit">
</pre>
</form>
</html>

February 29, 2012 at 4:54 PM

Change the extension of the code files to jsp.

1)index.jsp:

<html>
<form>
<input type="button" value="New Window!" onClick="window.open('subform.jsp','window','width=400,height=200')">
</form> 
</html> 
<%
String select[] = request.getParameterValues("id"); 
if (select != null && select.length != 0) {
out.println("You have selected: ");
for (int i = 0; i < select.length; i++) {
out.println(select[i]); 
}
}
%>

2)subform.jsp:

<html>
<form action="index.jsp">
<pre>
Select Languages: <input type="checkbox" name="id" value="Java"> Java
                  <input type="checkbox" name="id" value=".NET"> .NET
                  <input type="checkbox" name="id" value="PHP"> PHP
                  <input type="checkbox" name="id" value="C/C++"> C/C++
                  <input type="checkbox" name="id" value="PERL"> PERL <BR>
                  <input type="submit" value="Submit">
</pre>
</form>
</html>









Related Tutorials/Questions & Answers:
popup window checkbox and sbumit button
popup window checkbox and sbumit button  Hi, Requirement: popup window having multiple checkboxes, I have to select couple of checkboxes and click the submit button. I am unable to get the check box values... need help
Popup Window Example in JavaScript
Popup Window Example in JavaScript       In this article you learn popup Window in java script. Three kinds of  popup windows are available in java script
Advertisements
Flex - Call JavaScript Function And Open a Popup Window that Displays Data
Flex - Call JavaScript Function And Open a Popup Window that Displays Data  Flex - Call JavaScript Function And Open a Popup Window that Displays Data
Popup Window using Ajax In JSP
button, popup Window will be displayed. ADS_TO_REPLACE_5... Popup Window using Ajax In JSP  ... on "View Database" button. New Pop window winopenradio.jsp
After Clicking Image I need Popup Window - Design concepts & design patterns
After Clicking Image I need Popup Window  Hi Friends. when i click any image button , i need to display popup window in javascript.can u give code for this New Document EMPLOYEE DETAILS
PopUp Button in Flex
button and  smaller buttons, which is called pop-up button. The main button is called control button. When we click a pop-up button opens a second control called the pop-up control. After selecting any pop-up button, the button control
Radio Button in Java
by the user. The AWT  Widget used to create a radio button is Checkbox. The Checkbox class is used by the AWT to create both Radio Button and Checkbox... a RadioButton,we need to create a Checkbox first, followed by adding Radio Button
iphone Button Action (changing background of window)
iphone Button Action (changing background color of window)   In this tutorial we will change the background color on clicking the button, This is Window Based application. Final application will look like this: In .h
Tomahawk popup tag
;    This tag is used to create the popup window... attributes to display the popup window at a certain place i.e. we can set its... set when to close this window either when triggering element is left or the popup
how to add components (like button , checkbox etc) in a table column in core java
how to add components (like button , checkbox etc) in a table column in core java  plz tell me how to add components(like button, checkbox, radiobutton etc)in a table column in core java
Window
Window  how to create an window of a person like regestration form
popup registration form
popup registration form  hi i want a code for popup registration form.when user click a button popup form will appear.thanks.
checkbox
checkbox  how to insert multiple values in database by using checkbox in jsp
Populating values from Child Popup Jsp to Parent jsp
the checkbox of a particular record and clicks OK button in popup jsp then popup...Populating values from Child Popup Jsp to Parent jsp  Hi, My requirement follows like this.. I have a parent jsp where u have search button. If u
Display Data from database in Popup Window Using Ajax in JSP
Display Data from database in Popup Window Using Ajax in JSP... on the "Select" button on page 'windowopen.jsp' the pop up window... window click on the button "View Record". ADS
Popup dialog box in java
= new JFrame("Show popup Dialog Box"); JButton button = new JButton("Click...Popup dialog box in java  How to display popup dialog box in java?   Dialog Box- A dialog box is an independent small window which appear
Dojo Checkbox
Dojo Checkbox          In this section, you will learn how to create a checkbox in dojo. For creating checkbox you require "dijit.form.CheckBox". The checkbox button do
CheckBox component in Echo3
application development are CheckBox, ListBox, Button and RadioButton. Here in this Check Box example we will describe you how to create CheckBox component in Echo3... CheckBox component in Echo3   
refresh checkbox jframe
refresh checkbox jframe  How to refresh checkbox button in JFrame
JavaScript Open Modal Window
i.e. original window and new opened window. Here we are going to open a popup... as: ADS_TO_REPLACE_2 On clicking the button, a new window will get open which... JavaScript Open Modal Window
UIButton checkbox
UIButton checkbox  iPhone UIButton checkbox example required.. can any one please explain me.. how to create a checkbox button using UIButton in XIB
how to show popup in javascript
how to show popup in javascript  How to show popup in javascript
javascript calendar popup code
javascript calendar popup code  javascript calendar popup code
Radio Button In Java
together on the checkbox button. A check box group button in a CheckboxGroup can... Radio Button In Java       Introduction In this section, you will learn how to create Radio Button
Chat window
Chat window  Hi .. In a chat application , on click of a button the chat window pops up.. It is a div in the chat homepage.. There are few other... in the same application. I want to know how to retain the chat window (along
window closing
window closing  hello, In my project i have login,logout... script. and i need one solution that,when ever user trying to close browser window ,one confirm box will appear and if he clicked ok button then logout.jsp should
Pop Up window - WebSevices
Pop Up window  How refresh pop up window,Tell me correct code for this problem.  Hi friend, I am sending a link. This link will help you. Visit for more information. http://www.roseindia.net/jsp/popup-window
ModuleNotFoundError: No module named 'popup'
ModuleNotFoundError: No module named 'popup'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'popup' How to remove the ModuleNotFoundError: No module named 'popup'
JSP CheckBox
JSP CheckBox          JSP CheckBox is used to create a CheckBox in JSP... checkbox and also print the userdefined message that specify the languages option
Checkbox method
Checkbox method  what is the method to check if the checkbox is checked
Button
Button  How to use image for button in JSF
window in center
window in center  if i run the programme thw window is in lie in top left corner i want a window open in center
Baloon Popup in GWT
Baloon Popup in GWT  Hi, I am working on making a weekly Calendar in GWT.Here i need to show a Popup on mouse over event on any appointment already added.This popup should be a bubble pop up with an arrow/stem at its one
jQuery modal popup
jQuery modal popup  i want the full source code for modal popup for registration and inserting the data in the database using jdbc and oracle
button
button  can i give multiple commands on click of a button? if yes how can i do that?? multiple commands can we retriving dat from database, capturing data, moving to next page.. etc
button
button  can i give multiple commands on click of a button? if yes how can i do that?? multiple commands can be retriving dat from database, capturing data, moving to next page.. etc
Window State - Swing AWT
Window State  Thanks for you reply. I have already tried the setSize() method of AWT Window and also with JFrame. But I want to Maximize the Window when it is opened by the user and instead of the Maximize
Window Blind
Window Blind  Custom built . Over 30 years of shutter experience. Free in-home consultations
JSP Checkbox
JSP Checkbox In this tutorial you will learn how to create a checkbox using JSP. As we know, checkbox allows multiple selection at a time, but radio button allow only one selection at a time. So, when you need more than one
Version of com.braintreepayments>popup-bridge dependency
List of Version of com.braintreepayments>popup-bridge dependency
Multi window
contains all the details. when i submit this page, a new window opens and asks to enter password. if password entered is correct, the flow goes to previous window
Checkbox
Checkbox       A checkbox is again a label which is displayed as a pushbutton as shown in the example... of the checkbox is either true or false. However, the initial state is false
Window Script
Window Script  i want to write windows script can you help me in writing those i want to write script so that it follows below steps Step 1) downloading file from FTP 2) Unzip it 3) Edit it 4) zip it 5) upload again to FTP
Dojo Tree With Checkbox - Framework
structure in a jsp along with checkbox besides each node. The tree structure is displayed on a dialog box. If user clicks on a button , the dialog box opens with tree structure. The checkbox will have 3 states: (1) partially checked, (2
https popup msgs - Security
https popup msgs  Hi, I have an application with https link. After logging into that application using that https link, I will be redirected to a jsp page. I have one more https link inside a jsp page. eg
Crate a Popup Menu in Java
you press the right mouse button. Following figure shows the popup menu when you... Create a Popup Menu in Java       Here, you will learn how to create a Popup menu in Java. Popup
Closing the browser window
Closing the browser window  <BODY> <form> <input type=button value="Close Window" onClick="javascript:window.close();"> <...; thought that this will close the window of the browser but not working
JSP Window. Open
="button" value="New Window!" onClick="window.open ('http... click the button, a new browser window will be open. Download Source Code:ADS... JSP Window. Open   
passing value from javascript popup
passing value from javascript popup  How to take user input and pass that input value using popup in Javascript
popup ballon in jsp - JSP-Servlet
popup ballon in jsp  How to show a popup ballon in jsp when pointing... the following code: #popup{ width:147px; position:absolute; display:none; } #popup .top{ background-image: url('top.gif'); height:16px

Ads