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
17 1902
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
[/quote]
Hi,
Thanks for this.I got this correctly but i need some more in this.
i.e if i checked the checkbox the string is added to textarea.Simila rly if remove the checking then string must deleted from textarea.Rely me as soon as Possible.
hi,
the before one not this one which i have posted is giving that fuctionality
only
is that both functionalities are to be added then can u once explain me what u want
Hi,
Thanks for this.I got this correctly but i need some more in this.
i.e if i checked the checkbox the string is added to textarea.Simila rly if remove the checking then string must deleted from textarea.Rely me as soon as Possible.[/quote]
hi,
At first A big thank's for you.
vb is not working in my system. That one also not clear.
ok i explain once again.
When i make checked on check box the particular name will be dispalyed and when deselect the check box that particular name must be deleted from the text area not from database in mean from the list of text area present in your code. And more over i want again select names from selected names(i.e as per your code when i click on text area names are again select and placed in another frame or anything.)
By second code is out put is when click on names it is displaying but when i deselect the check box it doen't removing the name if in case i again check it displaying names. as per your code number of copy of names are displaying and when we deselect it doen't delete and moreover it doesn't provide to again select from text area.
TankQ
-Raju
hi,
the before one not this one which i have posted is giving that fuctionality
only
is that both functionalities are to be added then can u once explain me what u want
Hi,
Thanks for this.I got this correctly but i need some more in this.
i.e if i checked the checkbox the string is added to textarea.Simila rly if remove the checking then string must deleted from textarea.Rely me as soon as Possible.
[/quote]
hi,
I rectified that problem i have not checked it ok just in this code see whether after deselecting and again selecting whether copies of names are generated and can u tell me whether after deselecting the checkbox whether that name should be deleted and what do u mean by "i want again select names from selected names"
i am not clear about this i feel sorry that i am asking u to explain this many times then i can change code accordingly
don't think about this vb
just paste it and run it that's all -
parent
-
-
<html>
-
<head>
-
<script language="JavaScript" type="text/javascript">
-
var index=0;
-
function passText(str,str1)
-
{
-
if(str1==true)
-
{
-
if(top.frames['right'].document.yourform.text.value=="")
-
top.frames['right'].document.yourform.text.value=str;
-
else
-
{
-
-
var str1=top.frames['right'].document.yourform.text.value;
-
if(str1.indexOf(str)==-1)
-
top.frames['right'].document.yourform.text.value=top.frames['right'].document.yourform.text.value+"\n"+str;
-
}
-
-
}
-
-
}
-
function selectText()
-
{
-
str=top.frames['right'].document.yourform.text.value;
-
if(top.frames['left'].document.myform.name1.checked==false)
-
{
-
if(str.indexOf(top.frames['left'].document.myform.name1.value)!=-1)
-
top.frames['left'].document.myform.name1.checked=true;
-
}
-
if(top.frames['left'].document.myform.name2.checked==false)
-
{
-
if(str.indexOf(top.frames['left'].document.myform.name2.value)!=-1)
-
top.frames['left'].document.myform.name2.checked=true;
-
}
-
if(top.frames['left'].document.myform.name3.checked==false)
-
{
-
if(str.indexOf(top.frames['left'].document.myform.name3.value)!=-1)
-
top.frames['left'].document.myform.name3.checked=true;
-
}
-
-
}
-
-
</script>
-
</head>
-
<frameset cols="300,*" frameborder=1>
-
<frame name="left" src="Default2.aspx">
-
<frame name="right" src="Default3.aspx">
-
</frameset>
-
</html>
-
-
[child frame]
-
-
<html>
-
<body>
-
<center>
-
<form name=myform>
-
Enter Your Name:<br>
-
<%--<input type=text name=user size=10 value="">
-
<input type=button value="Ok!" onClick="parent.passText(this.form.user.value);">--%>
-
<input type="checkbox" name="name1" value="name1" onclick="parent.passText(this.form.name1.value,document.myform.name1.checked);" />Name1
-
<input type="checkbox" name="name2" value="name2" onclick="parent.passText(this.form.name2.value,document.myform.name2.checked);"/>Name2
-
<input type="checkbox" name="name3" value="name3" onclick="parent.passText(this.form.name3.value,document.myform.name3.checked);"/>Name3
-
-
</form>
-
</center>
-
</body>
-
</html>
-
[right]
-
-
-
-
<html>
-
<body>
-
<form name="yourform">
-
<textarea name="text" rows="5" cols="10" onclick="parent.selectText();"></textarea>
-
-
</form>
-
</body>
-
</html>
-
-
-
-
-
-
-
-
hi,
At first A big thank's for you.
vb is not working in my system. That one also not clear.
ok i explain once again.
When i make checked on check box the particular name will be dispalyed and when deselect the check box that particular name must be deleted from the text area not from database in mean from the list of text area present in your code. And more over i want again select names from selected names(i.e as per your code when i click on text area names are again select and placed in another frame or anything.)
By second code is out put is when click on names it is displaying but when i deselect the check box it doen't removing the name if in case i again check it displaying names. as per your code number of copy of names are displaying and when we deselect it doen't delete and moreover it doesn't provide to again select from text area.
TankQ
-Raju
[/quote]
hi,
tahkyou for reply.
The you given is not deleted the element or check box when we deselected the checkbox.
I explain you with a example. \
Step 1:If i had the follwing words
-A
-B
-C
-D
-E
-F
-G........
step 2: I select A,B,C,D from above list by making a ckeck on them.
step 3: Ok Again i want to select B,C from list A,B,C,D (i.e from step 2).
they are selected from different frames.
-Raju
hi,
tahkyou for reply.
The you given is not deleted the element or check box when we deselected the checkbox.
I explain you with a example. \
Step 1:If i had the follwing words
-A
-B
-C
-D
-E
-F
-G........
step 2: I select A,B,C,D from above list by making a ckeck on them.
step 3: Ok Again i want to select B,C from list A,B,C,D (i.e from step 2).
they are selected from different frames.
-Raju
Hi ,
I think u gone through my example.Do u find any answer for that.Actually,
what is my problem is there are some elements with checkboxes-1 in frame1.if we checked the checkbox then that element must be displayed in another frame2 with name and checkbox2.Again if we select checkbox2 then that element must be displayed in another frame3.In frame3 there is no need of checkbox.In this again if deselect any checkbox the corresponding element to that checkbox must be deleted.
please urgent.If enybody found solution then help me.
Iam waiting for reply.
hi,
i think this is the solution -
parent frame
-
<html>
-
<head>
-
<script language="JavaScript" type="text/javascript">
-
var index=0;
-
function passText1(str)
-
{
-
-
if(top.frames['left'].document.myform.name1.checked && top.frames['middle'].document.form1.text.value=="" )
-
{
-
top.frames['middle'].document.form1.check.checked=false;
-
top.frames['middle'].document.form1.text.value=str;
-
}
-
if(top.frames['left'].document.myform.name2.checked && top.frames['middle'].document.form1.text1.value=="" )
-
{
-
top.frames['middle'].document.form1.check1.checked=false;
-
top.frames['middle'].document.form1.text1.value=str;
-
-
}
-
if(top.frames['left'].document.myform.name3.checked && top.frames['middle'].document.form1.text2.value=="")
-
{
-
top.frames['middle'].document.form1.check2.checked=false;
-
top.frames['middle'].document.form1.text2.value=str;
-
-
}
-
else selectText("left");
-
-
}
-
-
-
-
function passText(str,str1)
-
{
-
if(str1==true)
-
{
-
if(top.frames['right'].document.yourform.text.value=="")
-
top.frames['right'].document.yourform.text.value=str;
-
else
-
{
-
var str1=top.frames['right'].document.yourform.text.value;
-
if(str1.indexOf(str)==-1)
-
top.frames['right'].document.yourform.text.value=top.frames['right'].document.yourform.text.value+"\n"+str;
-
}
-
}
-
else selectText("middle");
-
}
-
function selectText(str)
-
{
-
if(str=="left")
-
{
-
if(top.frames['left'].document.myform.name1.checked==false && top.frames['middle'].document.form1.text.value!="" )
-
{
-
-
if(top.frames['middle'].document.form1.check.checked==true)
-
top.frames['middle'].document.form1.check.checked=false;
-
var str1=top.frames['right'].document.yourform.text.value;
-
var str2=top.frames['left'].document.myform.name1.value;
-
select(str1,str2);
-
top.frames['middle'].document.form1.text.value="";
-
-
}
-
if(top.frames['left'].document.myform.name2.checked==false && top.frames['middle'].document.form1.text2.value!="" )
-
{
-
if(top.frames['middle'].document.form1.check1.checked==true)
-
top.frames['middle'].document.form1.check1.checked=false;
-
var str1=top.frames['right'].document.yourform.text.value;
-
var str2=top.frames['left'].document.myform.name2.value;
-
select(str1,str2);
-
top.frames['middle'].document.form1.text1.value="";
-
-
}
-
-
if(top.frames['left'].document.myform.name3.checked==false && top.frames['middle'].document.form1.text2.value!="" )
-
{
-
-
var str1=top.frames['right'].document.yourform.text.value;
-
var str2=top.frames['left'].document.myform.name3.value;
-
select(str1,str2);
-
if(top.frames['middle'].document.form1.check2.checked==true)
-
top.frames['middle'].document.form1.check2.checked=false;
-
top.frames['middle'].document.form1.text2.value="";
-
}
-
}
-
else if(str=="middle")
-
{
-
if(!top.frames['middle'].document.form1.check.checked)
-
{
-
select(top.frames['right'].document.yourform.text.value,top.frames['middle'].document.form1.text.value);
-
}
-
if(!top.frames['middle'].document.form1.check1.checked)
-
{
-
select(top.frames['right'].document.yourform.text.value,top.frames['middle'].document.form1.text1.value);
-
}
-
-
if(!top.frames['middle'].document.form1.check2.checked)
-
{
-
select(top.frames['right'].document.yourform.text.value,top.frames['middle'].document.form1.text2.value);
-
}
-
-
}
-
}
-
function select(str1,str2)
-
{
-
if(str1.indexOf(str2)!=-1)
-
{
-
index=str1.indexOf(str2);
-
if(str1.length==str2.length)
-
top.frames['right'].document.yourform.text.value="";
-
else
-
{
-
index=0;index1=0,count=0,flag=0;
-
index=str1.indexOf(str2);
-
var temp="";
-
while(index1<str1.length)
-
{
-
if(index1==index)
-
{
-
flag=1;
-
if(index!=0)
-
{
-
temp=str1.substring(0,count);
-
count=0;
-
}
-
}
-
else
-
{
-
-
++count;
-
-
if(count==str2.length&& index1<str1.length&&flag==1)
-
{
-
temp=temp+str1.substring(index1+2,str1.length);
-
break;
-
}
-
}
-
index1++;
-
}
-
top.frames['right'].document.yourform.text.value=temp;
-
}
-
}
-
}
-
-
</script>
-
</head>
-
<frameset cols="30%,30%,*" frameborder=1>
-
<frame name="left" src="Default2.aspx">
-
<frame name="middle" src="Default4.aspx">
-
-
<frame name="right" src="Default3.aspx">
-
</frameset>
-
</html>
-
-
left frame
-
-
<html>
-
<body>
-
<center>
-
<form name=myform>
-
Enter Your Name:<br>
-
<%--<input type=text name=user size=10 value="">
-
<input type=button value="Ok!" onClick="parent.passText(this.form.user.value);">--%>
-
<input type="checkbox" name="name1" value="name1" onclick="parent.passText1(this.form.name1.value);" />Name1
-
<input type="checkbox" name="name2" value="name2" onclick="parent.passText1(this.form.name2.value);"/>Name2
-
<input type="checkbox" name="name3" value="name3" onclick="parent.passText1(this.form.name3.value);"/>Name3
-
-
</form>
-
</center>
-
</body>
-
</html>
-
-
middle frame
-
-
<html >
-
-
<body>
-
<form name="form1">
-
<div>
-
<input name="text" type="text" />
-
<input name="check" type="checkbox" onclick="parent.passText(this.form.text.value,document.form1.check.checked);" />
-
<input name="text1" type="text" style="z-index: 100; left: 16px; position: absolute; top: 56px" />
-
<input name="check1" type="checkbox" style="z-index: 101; left: 184px; position: absolute; top: 56px" onclick="parent.passText(this.form.text1.value,document.form1.check1.checked);" />
-
<input name="text2" type="text" style="z-index: 102; left: 16px; position: absolute; top: 96px" />
-
<input name="check2" type="checkbox" style="z-index: 103; left: 192px; position: absolute; top: 96px" onclick="parent.passText(this.form.text2.value,document.form1.check2.checked);" />
-
</div>
-
</form>
-
</body>
-
</html>
-
-
right frame
-
-
-
-
-
<html xmlns="http://www.w3.org/1999/xhtml">
-
<body>
-
<form name="yourform">
-
<textarea name="text" rows="5" cols="10" ></textarea>
-
</form>
-
</body>
-
</html>
-
Hi ,
I think u gone through my example.Do u find any answer for that.Actually,
what is my problem is there are some elements with checkboxes-1 in frame1.if we checked the checkbox then that element must be displayed in another frame2 with name and checkbox2.Again if we select checkbox2 then that element must be displayed in another frame3.In frame3 there is no need of checkbox.In this again if deselect any checkbox the corresponding element to that checkbox must be deleted.
please urgent.If enybody found solution then help me.
Iam waiting for reply.
Hi,
Yes!!!!!!! yes...... that only my requirement. Really i dont have have words to say thank's for your help. You solve my big problem.
A big thank's from raju..
thankyou.
-raju
Sign in to post your reply or Sign up for a free account.
Similar topics |
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
|
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"><!--
|
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...
|
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;
|
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...
| |
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.
|
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...
|
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. ...
|
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
|
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...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
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,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
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...
|
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...
|
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();...
|
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...
| |
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |