Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa JavaScriptQuestions popup window checkbox and sbumit button

Have Programming Question? Ask it here!
 
 
 


srini anumala
popup window checkbox and sbumit button
3 Answer(s)      2 years and 5 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);

}


Advertisement
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
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
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 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
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
checkbox
checkbox  how to insert multiple values in database by using checkbox in jsp
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
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
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
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
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.
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
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"
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
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   
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
refresh checkbox jframe
refresh checkbox jframe  How to refresh checkbox button in JFrame
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
javascript calendar popup code
javascript calendar popup code  javascript calendar popup code
how to show popup in javascript
how to show popup in javascript  How to show popup in javascript
Checkbox method
Checkbox method  what is the method to check if the checkbox is checked
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
JSP CheckBox
to select multiple languages using checkbox.  After submitting the button... JSP CheckBox          JSP CheckBox is used to create a CheckBox in JSP
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
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
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
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
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
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
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
Ajax Checkbox
Ajax Checkbox  I want ajax code for checkboxes.The scenario is that if a selectbox is selected the corresponding values to it in the database table are to be checked in the checkbox.....Please do help me
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
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
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
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
passing value from javascript popup
passing value from javascript popup  How to take user input and pass that input value using popup in Javascript
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
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
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
Window Blind
Window Blind  Custom built . Over 30 years of shutter experience. Free in-home consultations
enable disable checkbox in javascript
enable disable checkbox in javascript  How to enable disable checkbox in javascript
Popup Calendar in Javascript - Development process
Popup Calendar in Javascript   Hi, Can u plz send me javascript code for dispalying date in textbox using popup calendar . Thanks Prakash   Hi Friend, Please visit the following link: http
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
Reset checkbox style to default
Reset checkbox style to default  Reset checkbox style to default   input[type="checkbox"] { /* styles
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
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
 

 

 

DMCA.com