473,789 Members | 2,706 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

could you help in creating checkboxes with condition.

58 New Member
Hi all,

I created two forms. In the first frame i had Items with checkbox like names of students etc. When ever i checked on any name It's display on the other frame. Up to know it's fine. But when i deselcted any check box it again display same name.
My requirement is when i deselected the checkbox that particular student name is deleted from the list .
Any one please give suggestion for above problem.
your help will be appricited.
TankQ.

-Raju
Nov 7 '06 #1
17 1900
vssp
268 Contributor
If u deselect the the check box uding check box value or id to delete the record.

vssp
Nov 7 '06 #2
rajbala
58 New Member
If u deselect the the check box uding check box value or id to delete the record.

vssp
No it is not possible.
you are not getting my problem.
Iam using frames bcoz i want to dislay my result
in another frame.; Iam retriving a variable from database and
displaying that variable in another frame.
Therfore It's compulsary to display the name in
the another frame.
-raju
Nov 7 '06 #3
vee10
141 New Member
hi
is that in other frame u r displaying that value in any textbox or textarea

No it is not possible.
you are not getting my problem.
Iam using frames bcoz i want to dislay my result
in another frame.; Iam retriving a variable from database and
displaying that variable in another frame.
Therfore It's compulsary to display the name in
the another frame.
-raju
Nov 7 '06 #4
rajbala
58 New Member
hi
is that in other frame u r displaying that value in any textbox or textarea
yes,

It is other frame.
Nov 7 '06 #5
AricC
1,892 Recognized Expert Top Contributor
Maybe this link will help:

http://www.htmlhelp.com/design/frame...targeting.html
Nov 7 '06 #6
rajbala
58 New Member
Maybe this link will help:

http://www.htmlhelp.com/design/frame...targeting.html
Hi,
Thankyou for above link. But in that link i couldnot found to working on checkbox between frames. It doesn't help me anything.ok
I want to tell you up to know what i had be done and what i want.

I created two forms. In the first frame i had Items with checkbox like names of students etc. When ever i checked on any name It's display on the other frame. Up to know it's fine. But when i deselcted any check box it again display same name.
My requirement is when i deselected the checkbox that particular student name is deleted from the list .
Any one please give suggestion for above problem.

TankQ.

-Raju
Nov 8 '06 #7
vee10
141 New Member
hi,

I think this code solves ur problem i have taken three checkboxes and in other frame i displayed it in a textarea

Expand|Select|Wrap|Line Numbers
  1.  
  2. This is parent frame
  3.  
  4. <%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %>
  5.  
  6. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  7.  
  8. <html>
  9. <head>
  10. <script language="JavaScript" type="text/javascript">
  11. var index=0;
  12. function passText(str,str1) {
  13.  
  14. if(str1==true)
  15. {
  16. if(top.frames['right'].document.yourform.text.value=="")
  17. top.frames['right'].document.yourform.text.value=str;
  18. else
  19. top.frames['right'].document.yourform.text.value=top.frames['right'].document.yourform.text.value+"\n"+str;
  20. }
  21. else 
  22. {
  23. var string=top.frames['right'].document.yourform.text.value;
  24. if(string.indexOf(str)!=-1)
  25. index=string.indexOf(str);
  26. if(string.length==str.length)
  27. top.frames['right'].document.yourform.text.value="";
  28. else
  29. {
  30. index=0;index1=0,count=0,flag=0;
  31. index=string.indexOf(str);
  32. var temp="";
  33. while(index1<string.length)
  34. {
  35. if(index1==index)
  36. {
  37. flag=1;
  38. if(index!=0)
  39. {
  40. temp=string.substring(0,count);
  41. count=0;
  42. }
  43. }
  44. else
  45. {
  46.  
  47. ++count;
  48.  
  49. if(count==str.length&& index1<string.length&&flag==1)
  50. {
  51. temp=temp+string.substring(index1+2,string.length);
  52. break;
  53. }
  54. }
  55. index1++;
  56. }
  57. top.frames['right'].document.yourform.text.value=temp;
  58. }
  59. }
  60. }
  61. }
  62. function Textbox()
  63. {
  64. //<input type="text" name="text1" />
  65. }
  66. // End -->
  67. </script>
  68. </head>
  69. <frameset cols="300,*" frameborder=1>
  70. <frame name="left" src="Default2.aspx">
  71. <frame name="right" src="Default3.aspx">
  72. </frameset> 
  73. </html>
  74.  
  75. checkbox frame
  76.  
  77. <%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default2.aspx.vb" Inherits="Default2" %>
  78.  
  79. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  80.  
  81. <html>
  82. <body>
  83. <center>
  84. <form name=myform>
  85. Enter Your Name:<br>
  86. <%--<input type=text name=user size=10 value="">
  87. <input type=button value="Ok!" onClick="parent.passText(this.form.user.value);">--%>
  88. <input type="checkbox" name="name" value="name1" onclick="parent.passText(this.form.name.value,document.myform.name.checked);" />Name1
  89. <input type="checkbox" name="name1" value="name2" onclick="parent.passText(this.form.name1.value,document.myform.name1.checked);"/>Name2
  90. <input type="checkbox" name="name2" value="name3" onclick="parent.passText(this.form.name2.value,document.myform.name2.checked);"/>Name2 
  91.  
  92. </form>
  93. </center>
  94. </body>
  95. </html>
  96.  
  97. displaying the values frame
  98.  
  99. <html>
  100. <body>
  101. <form name="yourform">
  102. <textarea name="text" rows="5" cols="10">
  103. </textarea>
  104. </form>
  105. </body>
  106. </html>
  107.  
  108.  
  109.  
i hope this solves and if any problem just give what the problem u get

Hi,
Thankyou for above link. But in that link i couldnot found to working on checkbox between frames. It doesn't help me anything.ok
I want to tell you up to know what i had be done and what i want.

I created two forms. In the first frame i had Items with checkbox like names of students etc. When ever i checked on any name It's display on the other frame. Up to know it's fine. But when i deselcted any check box it again display same name.
My requirement is when i deselected the checkbox that particular student name is deleted from the list .
Any one please give suggestion for above problem.

TankQ.

-Raju
Nov 8 '06 #8
rajbala
58 New Member
hi,
I gone through this code. I think it's in vb,any how I change in javascript. While i click on button yes it displaying.but while i deselect it doesn't do any function...
I want when i click on that text area or frame I want again to select that option. I don't want only displaying on text area. I need to select again that selcted items.

tankQ.
-raju.










hi,

I think this code solves ur problem i have taken three checkboxes and in other frame i displayed it in a textarea

Expand|Select|Wrap|Line Numbers
  1.  
  2. This is parent frame
  3.  
  4. <%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %>
  5.  
  6. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  7.  
  8.  <html>
  9. <head>
  10. <script language="JavaScript" type="text/javascript">
  11. var index=0;
  12. function passText(str,str1) {
  13.  
  14. if(str1==true)
  15. {
  16. if(top.frames['right'].document.yourform.text.value=="")
  17. top.frames['right'].document.yourform.text.value=str;
  18. else
  19. top.frames['right'].document.yourform.text.value=top.frames['right'].document.yourform.text.value+"\n"+str;
  20. }
  21. else 
  22. {
  23. var string=top.frames['right'].document.yourform.text.value;
  24. if(string.indexOf(str)!=-1)
  25. index=string.indexOf(str);
  26. if(string.length==str.length)
  27. top.frames['right'].document.yourform.text.value="";
  28. else
  29. {
  30. index=0;index1=0,count=0,flag=0;
  31. index=string.indexOf(str);
  32. var temp="";
  33. while(index1<string.length)
  34. {
  35. if(index1==index)
  36. {
  37. flag=1;
  38. if(index!=0)
  39. {
  40. temp=string.substring(0,count);
  41. count=0;
  42. }
  43. }
  44. else
  45. {
  46.  
  47. ++count;
  48.  
  49. if(count==str.length&& index1<string.length&&flag==1)
  50. {
  51. temp=temp+string.substring(index1+2,string.length);
  52. break;
  53. }
  54. }
  55. index1++;
  56. }
  57. top.frames['right'].document.yourform.text.value=temp;
  58. }
  59. }
  60. }
  61. }
  62. function Textbox()
  63. {
  64. //<input type="text" name="text1" />
  65. }
  66. // End -->
  67. </script>
  68. </head>
  69. <frameset cols="300,*" frameborder=1>
  70. <frame name="left" src="Default2.aspx">
  71. <frame name="right" src="Default3.aspx">
  72. </frameset> 
  73. </html>
  74.  
  75. checkbox frame
  76.  
  77. <%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default2.aspx.vb" Inherits="Default2" %>
  78.  
  79. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  80.  
  81.  <html>
  82. <body>
  83. <center>
  84. <form name=myform>
  85. Enter Your Name:<br>
  86. <%--<input type=text name=user size=10 value="">
  87. <input type=button value="Ok!" onClick="parent.passText(this.form.user.value);">--%>
  88. <input type="checkbox" name="name" value="name1" onclick="parent.passText(this.form.name.value,document.myform.name.checked);" />Name1
  89. <input type="checkbox" name="name1" value="name2" onclick="parent.passText(this.form.name1.value,document.myform.name1.checked);"/>Name2
  90. <input type="checkbox" name="name2" value="name3" onclick="parent.passText(this.form.name2.value,document.myform.name2.checked);"/>Name2     
  91.  
  92. </form>
  93. </center>
  94. </body>
  95. </html>
  96.  
  97. displaying the values frame
  98.  
  99.  <html>
  100. <body>
  101. <form name="yourform">
  102. <textarea name="text" rows="5" cols="10">
  103. </textarea>
  104. </form>
  105. </body>
  106. </html>
  107.  
  108.  
  109.  
i hope this solves and if any problem just give what the problem u get
E=rajbala]Hi,
Thankyou for above link. But in that link i couldnot found to working on checkbox between frames. It doesn't help me anything.ok
I want to tell you up to know what i had be done and what i want.

I created two forms. In the first frame i had Items with checkbox like names of students etc. When ever i checked on any name It's display on the other frame. Up to know it's fine. But when i deselcted any check box it again display same name.
My requirement is when i deselected the checkbox that particular student name is deleted from the list .
Any one please give suggestion for above problem.

TankQ.

-Raju
[/quote]
Nov 9 '06 #9
vee10
141 New Member
hi,

i did the code in .net frame work so the code behind language is vb the script
is the javascript ok

the below code may solve ur problem

Expand|Select|Wrap|Line Numbers
  1.  
  2. Parent frame:
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  <html>
  9. <head>
  10. <script language="JavaScript" type="text/javascript">
  11. var index=0;
  12. function passText(str,str1) 
  13. {
  14. if(str1==true)
  15. {
  16. if(top.frames['right'].document.yourform.text.value=="")
  17. top.frames['right'].document.yourform.text.value=str;
  18. else
  19. top.frames['right'].document.yourform.text.value=top.frames['right'].document.yourform.text.value+"\n"+str;
  20. }
  21. }
  22. function selectText()
  23. {
  24. str=top.frames['right'].document.yourform.text.value;
  25.   if(top.frames['left'].document.myform.name1.checked==false)
  26.  {
  27.  if(str.indexOf(top.frames['left'].document.myform.name1.value)!=-1)
  28.  top.frames['left'].document.myform.name1.checked=true;
  29.  }
  30. if(top.frames['left'].document.myform.name2.checked==false)
  31.  {
  32.  if(str.indexOf(top.frames['left'].document.myform.name2.value)!=-1)
  33.  top.frames['left'].document.myform.name2.checked=true;
  34.  }
  35. if(top.frames['left'].document.myform.name3.checked==false)
  36.  {
  37.  if(str.indexOf(top.frames['left'].document.myform.name3.value)!=-1)
  38.  top.frames['left'].document.myform.name3.checked=true;
  39.  }
  40.  
  41. }
  42.  
  43. // End -->
  44. </script>
  45. </head>
  46. <frameset cols="300,*" frameborder=1>
  47. <frame name="left" src="Default2.aspx">
  48. <frame name="right" src="Default3.aspx">
  49. </frameset> 
  50. </html>
  51.  
  52.  
  53. left frame
  54.  
  55.  
  56.  <html>
  57. <body>
  58. <center>
  59. <form name=myform>
  60. Enter Your Name:<br>
  61. <%--<input type=text name=user size=10 value="">
  62. <input type=button value="Ok!" onClick="parent.passText(this.form.user.value);">--%>
  63. <input type="checkbox" name="name1" value="name1" onclick="parent.passText(this.form.name1.value,document.myform.name1.checked);" />Name1
  64. <input type="checkbox" name="name2" value="name2" onclick="parent.passText(this.form.name2.value,document.myform.name2.checked);"/>Name2
  65. <input type="checkbox" name="name3" value="name3" onclick="parent.passText(this.form.name3.value,document.myform.name3.checked);"/>Name3     
  66.  
  67. </form>
  68. </center>
  69. </body>
  70. </html>
  71.  
  72. [right frame]
  73.  
  74.  
  75.  <html>
  76. <body>
  77. <form name="yourform">
  78. <textarea name="text" rows="5" cols="10"
  79.  onclick="parent.selectText();"></textarea>
  80. </form>
  81. </body>
  82. </html>
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  













hi,
I gone through this code. I think it's in vb,any how I change in javascript. While i click on button yes it displaying.but while i deselect it doesn't do any function...
I want when i click on that text area or frame I want again to select that option. I don't want only displaying on text area. I need to select again that selcted items.

tankQ.
-raju.









[/quote]
Nov 9 '06 #10

Sign in to post your reply or Sign up for a free account.

Similar topics

4
11827
by: James Greig | last post by:
hello people, i'm just learning javascript, could someone point me in the direction of an example of the following, or give me some clues as to how it might be done: what i would like to do is make a self totalling version of this page > http://www.ayrshirehousing.org.uk/applications/applications.html so that basically as a person checked or unchecked boxes, a
4
2899
by: BjoernJackschina | last post by:
HEllo, I still have always the same problem with a no object form in my source code. It is for checking out used radiobuttons or checkboxes.<script <!-- function pruefen(){return true} --> </script> <script language="JAvaScript1.1"><!--
4
1745
by: NaterPotater | last post by:
I can't seem to get my head around the Visual Studio's Deployment Projects: I want the user, at install-time, to be able to specify if they want a icon placed on the desktop or not (I'm trying to use Checkboxes(A)). Seemingly you can just place the Checkbox1Property Name into the User's Desktop Condition but that does not work. I actually saw an article that highlighted this process as "the way to do it", so I downloaded the source and...
5
2202
by: Dave D. | last post by:
I have a total of 8 checkboxes, but the user is only allowed to check any three of them. After have been checked I have an alert box saying that only 3 boxes can be checked. I'm trying to get so that it disable's the checkboxes that are not checked, but then if one of the three get unchecked, then all checkboxes become enabled again. Here's my code so far....(In Javascript) function chkCount() { var i = 0;
1
1682
by: Richard Johansson | last post by:
Hi, I want to create an option for creating shortcuts to my application on the users desktop and Start menu in the setup. In my deployment project i have created the necessary checkboxes, and tried to set Conditions on the folders "User's desktop" and "User's Program Menu", but the conditions doesnt seem to affect shortcuts, only physical files... Have anyone else run into these kinds of problems, or am i just missing something obvious...
6
1472
by: rajbala.3399 | last post by:
Hi, I created two forms. In the first frame i had Items with checkbox like names of students etc. When ever i checked on any name It's display on the other frame. Up to know it's fine. But when i deselcted any check box it again display same name. My requirement is when i deselected the checkbox that particular student name is deleted from the list . Any one please give suggestion for above problem. your help will be appricited. TankQ.
10
5209
by: rn5a | last post by:
All the rows in a DataGrid, including the Header, are accompanied with a CheckBox. I want that when the CheckBox in the Header is checked, then all the CheckBoxes should automatically get checked. I set the AutoPostBack property of the CheckBox in the Header to True & am invoking a sub named 'CheckAllRows' on the CheckedChanged event of this CheckBox. The CheckBox in the Header exists within the HeaderTemplate of a TemplateColumn in the...
6
1944
blazedaces
by: blazedaces | last post by:
Hey, so here's an example of what I want to do: This "window" if you will, or simple gui, will accept an ArrayList<String> and in turn spit out for every one of them a checkbox and a text field where you can rename it to whatever name you chose (later I'll add something to check and make sure none of the names are the same... but for now it doesn't matter). I'm not very familiar with GUI in java so I don't know the best way of doing this. ...
14
2113
by: tdahsu | last post by:
I have twenty-five checkboxes I need to create (don't ask): self.checkbox1 = ... self.checkbox2 = ... .. .. .. self.checkbox25 = ... Right now, my code has 25 lines in it, one for each checkbox, since
1
1498
by: harry_noble1902 | last post by:
Hello I have a "solution" that has 7 VB.Net projects in it. Some of the VB.Net projects are dll librarys but 3 are applications (so there are 7-3=4 dlls) I want to install with a setup program/application. I have created a Setup application as part of my "solution" using the wizard. One of the windows in my Setup application has a check box that says "Install Application 1". Another checkbox says "Install Application 2". The last one...
0
9511
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10139
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9020
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7529
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6769
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5418
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5551
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4093
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3701
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.