Click here to Skip to main content
15,882,464 members
Home / Discussions / Web Development
   

Web Development

 
QuestionJavascript Copy Text Pin
tech_freak1-Feb-07 1:49
tech_freak1-Feb-07 1:49 
AnswerRe: Javascript Copy Text Pin
Vasudevan Deepak Kumar1-Feb-07 3:52
Vasudevan Deepak Kumar1-Feb-07 3:52 
AnswerRe: Javascript Copy Text Pin
David Domingues1-Feb-07 5:44
David Domingues1-Feb-07 5:44 
Questionddl with grid Pin
praveenanand31-Jan-07 20:00
praveenanand31-Jan-07 20:00 
AnswerRe: ddl with grid Pin
badgrs31-Jan-07 22:44
badgrs31-Jan-07 22:44 
QuestionAdd elements from one ListBox to another Pin
varshavmane31-Jan-07 18:09
varshavmane31-Jan-07 18:09 
AnswerRe: Add elements from one ListBox to another Pin
Sachin Pimpale31-Jan-07 19:03
Sachin Pimpale31-Jan-07 19:03 
GeneralRe: Add elements from one ListBox to another Pin
varshavmane31-Jan-07 19:58
varshavmane31-Jan-07 19:58 
Thanks for the reply sir. I got some code but its not working I am not able to track whats wrong.
<html>
<head>
<script language="JavaScript">
function f_optionMove(s_from, s_to)
{
alert(s_from);
var e_from = document.forms['test_form'].elements[s_from],e_to = document.forms['test_form'].elements[s_to];
alert(e_from);
if (!e_from)
return alert ("Error: selectbox with name '" + s_from + "' can't be found.");
if (!e_to)
return alert ("Error: selectbox with name '" + s_from + "' can't be found.");
var n_moved = 0;
for (var i = 0; i < e_from.options.length; i++)
{
if (e_from.options.selected)
{
e_to.options[e_to.options.length] = new Option(e_from.options.text, e_from.options.value);
n_moved++;
}
else if (n_moved)
e_from.options[i - n_moved] = new Option(e_from.options.text, e_from.options.value);
}
if (n_moved)
e_from.options.length = e_from.options.length - n_moved;
else
alert("You haven't selected any options");
}

function f_optionMoveAll(s_from, s_to)
{
var e_from = document.forms['test_form'].elements[s_from],e_to = document.forms['test_form'].elements[s_to];
if (!e_from)
return alert ("Error: selectbox with name '" + s_from + "' can't be found.");
if (!e_to)
return alert ("Error: selectbox with name '" + s_from + "' can't be found.");
e_to.options.length = 0;
for (var i = 0; i < e_from.options.length; i++)
e_to.options = new Option(e_from.options.text, e_from.options.value);
e_from.options.length = 0;
}

function f_selectAll (s_select)
{
var e_select = document.forms['test_form'].elements[s_select];
for (var i = 0; i < e_select.options.length; i++)
e_select.options.selected = true;
}
</script>
</head>
<body>
<form id="test_form" name="test_form" runat="server">
<table border="0" cellpadding="0" cellspacing="0" style="width: 100%">
<tr>
<td>
<select multiple name="source" style="width: 170px; height: 170px">
<option>Vishal</option>
<option>Pooja</option>
<option>Dnyandeo</option>
<option>Varsha</option>
<option>Aditi</option>
<option>Nilesh</option>
</select>
</td>
<td>
<table border="0" cellpadding="0" cellspacing="0" style="width: 100%">
<tr>
<td>
<input type="Button" style="width: 200px;" value="Add Selected >>" onclick="f_optionMove('source', 'destination')">
</td>
</tr>
<tr>
<td>
<input type="Button" style="width: 200px;" value="Remove Selected <<" onclick="f_optionMove('destination', 'source')">
</td>
</tr>
<tr>
<td>
<input type="Button" style="width: 200px;" value="Add All >>" onclick="f_optionMoveAll('source', 'destination')">
</td>
</tr>
<tr>
<td>
<input type="Button" style="width: 200px;" value="Remove All <<" onclick="f_optionMoveAll('destination', 'source')">
</td>
</tr>
<tr>
<td>
<input type="Button" style="width: 200px;" value="Select All Sources" onclick="f_selectAll('source')"></td>
</tr>
<tr>
<td>
<input type="Button" style="width: 200px;" value="Select All Destinations;" onclick="f_selectAll('destination')"></td>
</tr>
</table>
</td>
<td>
<select multiple name="destination" style="width: 170px; height: 170px">
</select>
</td>
</tr>
</table>
</form>
</body>
</html>

Please tell me where I am going wrong.

Questiondesign and control media player Pin
gigo2k631-Jan-07 11:18
gigo2k631-Jan-07 11:18 
AnswerRe: design and control media player Pin
Bradml31-Jan-07 13:23
Bradml31-Jan-07 13:23 
AnswerRe: design and control media player Pin
Vasudevan Deepak Kumar1-Feb-07 3:53
Vasudevan Deepak Kumar1-Feb-07 3:53 
Questiondropdown menu with javascript Pin
MayyMagdy31-Jan-07 2:46
MayyMagdy31-Jan-07 2:46 
AnswerRe: dropdown menu with javascript Pin
badgrs31-Jan-07 2:55
badgrs31-Jan-07 2:55 
GeneralRe: dropdown menu with javascript Pin
MayyMagdy31-Jan-07 5:16
MayyMagdy31-Jan-07 5:16 
GeneralRe: dropdown menu with javascript Pin
badgrs31-Jan-07 6:29
badgrs31-Jan-07 6:29 
QuestionNeed help in making email client Pin
EEmaan30-Jan-07 20:10
EEmaan30-Jan-07 20:10 
AnswerRe: Need help in making email client Pin
Bradml30-Jan-07 20:44
Bradml30-Jan-07 20:44 
Questioni am in trouble because of very big ASP form Pin
ajitscorpio30-Jan-07 10:38
ajitscorpio30-Jan-07 10:38 
AnswerRe: i am in trouble because of very big ASP form Pin
Christian Graus30-Jan-07 10:55
protectorChristian Graus30-Jan-07 10:55 
GeneralRe: i am in trouble because of very big ASP form Pin
Vasudevan Deepak Kumar1-Feb-07 3:55
Vasudevan Deepak Kumar1-Feb-07 3:55 
AnswerRe: i am in trouble because of very big ASP form Pin
Guffa30-Jan-07 14:47
Guffa30-Jan-07 14:47 
QuestionBinary SOAP and DIME - sending email with attachment Pin
sharmankit30-Jan-07 8:22
sharmankit30-Jan-07 8:22 
AnswerRe: Binary SOAP and DIME - sending email with attachment Pin
Vasudevan Deepak Kumar1-Feb-07 3:56
Vasudevan Deepak Kumar1-Feb-07 3:56 
GeneralRe: Binary SOAP and DIME - sending email with attachment Pin
sharmankit1-Feb-07 7:57
sharmankit1-Feb-07 7:57 
GeneralRe: Binary SOAP and DIME - sending email with attachment Pin
sharmankit1-Feb-07 13:35
sharmankit1-Feb-07 13:35 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.