Home Answers Viewqa JavaScriptQuestions popup window checkbox and sbumit button

 
 


srini anumala
popup window checkbox and sbumit button
3 Answer(s)      a year and 3 months ago
Posted in : JavaScript Questions

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 Pages:
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 using Ajax In JSP
on View Database button, popup Window will be displayed... Popup Window using Ajax In JSP  ... Database" button. New Pop window winopenradio.jsp will open which
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
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
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
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
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
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
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 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   
JavaScript Open Modal Window
i.e. original window and new opened window. Here we are going to open a popup... the button, a new window will get open which does not allow the user... JavaScript Open Modal Window
Popup very urgent plz - JSP-Servlet
Popup very urgent plz  Respected Sir/Madam, I am R.Ragavendran.. I got your reply.. Thank you very much for the response. Now I am sending the code.. Here When I click "View Database" Button,a small pop up window must be opened
Display Data from database in Popup Window Using Ajax in JSP
Display Data from database in Popup Window Using Ajax in JSP...;Select" button on page 'windowopen.jsp' the pop up window will close... : To open pop up window click on the button "View Record"
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
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
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
Hash Table for maintaining popup menus in Java
Hash Table for maintaining popup menus in Java  ... of maintaining popup menus through hash table in your Java program. This section... to create and maintain popup menus in Java. All the elements listed in the hash
refresh checkbox jframe
refresh checkbox jframe  How to refresh checkbox button in JFrame
JSP CheckBox
to select multiple languages using checkbox.  After submitting the button... JSP CheckBox          JSP CheckBox is used to create a CheckBox in JSP
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
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
Popup Box in JavaScript
Popup Box in JavaScript       Popup is used to create and show a component to the user, usually available on top of the window component in a particular hierarchy. The Popups
Radio Button In Java
on the checkbox button. A check box group button in a CheckboxGroup can be in the "... Radio Button In Java       Introduction In this section, you will learn how to create Radio Button
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
Java Script Code of Calendar and Date Picker or Popup Calendar
Java Script Code of Calendar and Date Picker or Popup Calendar...; This is detailed java script code that can use for Calendar or date picker or popup... window disappears automatically or user can close window by close   
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
Create Popup List in SWT
Create Popup List in SWT       In this section, you will learn how to create the popup list. SWT allows to create the popup list by providing the class PopupList of package
Maintain checked checkbox status
Maintain checked checkbox status  Hi everyone In my JSP... checkboxes and select multiple checkboxes, and after submitting button , it should... ultimate aim is to avoid "duplicate " selection of checkbox records . i am stuck
checkbox
checkbox  how to insert multiple values in database by using checkbox in jsp
Second Window
Java NotesExample - Second Window The main program of this example is basically identical to that in Example - First Window, but here we define a subclass of JFrame (a window) that constructs a JPanel to put the one component
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
Checkbox pagination problem
checkbox of table"Table Containts" and submit ">>" button, then in "Total...Checkbox pagination problem  HI ., Following is my code test.jsp... Selected Domains " type=checkbox value="${domain.domainName}">
Problem to display checkbox item
Problem to display checkbox item  Hi, Following is my code: <...;td> <input type="checkbox" name="check" value=<...; I want to display records, when i click on submit button or any dumy 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
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
;html> <form> <input type="button" value="New Window... will be displayed as: When you click the button, a new browser window... JSP Window. Open   
The Window Event - Swing AWT
, 700); setTitle("The Window Button"); setVisible(true...; } } }); add(exit_button); setVisible(true); setSize(100, 50); setTitle("Window...The Window Event  hey plz i need help here... plz modify
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
JavaScript createPopup method
you how you can create a popup window by using the simple JavaScript in an HTML... the popup window. Syntax:   window.createPopup(); Description... the javascript's code for the visual appearance of the Popup window. As soon as we
Window
Window  how to create an window of a person like regestration form
Pop-up Window
parameters to a pop-up window? Thanks  For example: code for pop-up window...:HGroup> <s:Button label="Save" click="save();" /> <s:Button label="Close without save" click="close();"
First Window
Java NotesExample - First Window This is about the simplest GUI (Graphical User Interface) window that you can make. The window is very small... 17 //--- basic_windows/FirstWindow.java - Creates a very small window
Create a Popup Menus with Nested Menus in Java
a nested popup menu in Java Swing. When you click the right mouse button on the frame then you get a popup menu. Here, you will show multiple menu items like: line... Create a Popup Menus with Nested Menus in Java  
Problem with DOJO tree with checkbox - Framework
to generate a tree 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
Window Container in Flex4
Window Container in Flex4 : This container are use window applications in flex 4. Spark Window container is provide a way if user want to create own window. The Window container are provide layout and content of operating system window
Adding checkbox in table using that delete table rows
Adding checkbox in table using that delete table rows  I need coding for how to add checkbox in table,the table data from database.Using that checkbox select more than than one rows,and using delete button i want to delete
opening new window - Java Beginners
A and B.when I press a button in class A , the class B should open in a new window.i.e., I want to know, how a new window(B) can be opened by clicking a button on the first(parent)window.The show() method does open a new window
deleting messages using checkbox in JSP
deleting messages using checkbox in JSP  Am working on a Mail Server... an alert while i directly click on button(which it should show) without checking... on button it shows an error. A when there is no message in it and i click on delete its
deleting messages using checkbox in JSP
deleting messages using checkbox in JSP  Am working on a Mail Server... an alert while i directly click on button(which it should show) without checking... on button it shows an error. A when there is no message in it and i click on delete its