Click here to Skip to main content
15,905,914 members
Home / Discussions / Web Development
   

Web Development

 
GeneralRe: Idiot <DIV> question Pin
Roger Wright26-Feb-05 21:52
professionalRoger Wright26-Feb-05 21:52 
GeneralRe: Idiot <DIV> question Pin
alex.barylski28-Feb-05 14:14
alex.barylski28-Feb-05 14:14 
QuestionHow can i set the automatic debugging Pin
22-Feb-05 8:28
suss22-Feb-05 8:28 
GeneralWebservice raise events Pin
Hadi Fakhreddine22-Feb-05 8:19
Hadi Fakhreddine22-Feb-05 8:19 
QuestionHow to prevent another fuction while executing one function Pin
Amitux22-Feb-05 1:53
Amitux22-Feb-05 1:53 
AnswerRe: How to prevent another fuction while executing one function Pin
Yulianto.22-Feb-05 15:51
Yulianto.22-Feb-05 15:51 
GeneralMSHTML DOM Pin
Jack Clift21-Feb-05 12:56
Jack Clift21-Feb-05 12:56 
GeneralNeed help with Listboxes/arrays Pin
PaigeFrank21-Feb-05 10:31
PaigeFrank21-Feb-05 10:31 
I am trying to write a web page that allows a user to select things from box1 (hospitallist1) which then show up in box2(selHospitals) - this works. Box2 items then need to be passed to the next page - I know I am just being braindead but I have been trying things for 3 hours - I cannot get this to pass the values to the next page. When I move items to the new listbox - does this create the array or do I need to do something else to create the string?. Any help is appreciated - I am new to .asp!

Below is the code for both programs.

Prog1:
<%@ Language=VBScript %>













function addtocombo()
{
var i = 0
var selectedItem
var selectedText
var selectedValue
var newoption1

for (counter = 0; counter < userslist.hospitallist.length; counter++)
{if (userslist.hospitallist.options(counter).selected == 1)
{selectedItem = document.userslist.hospitallist.selectedIndex;

selectedText =
document.userslist.hospitallist.options[counter].text;

selectedValue =
document.userslist.hospitallist.options[counter].value;

newoption1 = new Option(selectedText, selectedValue, false, false);

document.userslist.selitems.options[i] = newoption1;

i = i + 1}
}

}


function moveit()
{
var boxLength = document.userslist.selHospitals.length;
var selectedItem = document.userslist.hospitallist1.selectedIndex;
var selectedText =
document.userslist.hospitallist1.options[selectedItem].text;
var selectedValue =
document.userslist.hospitallist1.options[selectedItem].value;
var i;
var isNew = true;


if (boxLength != 0)
{
for (i = 0; i < boxLength; i++)
{thisitem = document.userslist.selHospitals.options[i].text;
if (thisitem == selectedText)
{isNew = false;
break;}
}
}
if (isNew)
{ newoption = new Option(selectedText, selectedValue, false, false);
document.userslist.selHospitals.options[boxLength] = newoption;}

document.userslist.hospitallist1.selectedIndex=-1;
}

function removefromcombo()
{ var boxLength = document.userslist.selHospitals.length;

arrSelected = new Array();

var count = 0;
for (i = 0; i < boxLength; i++)
{if (document.userslist.selHospitals.options[i].selected)
{arrSelected[count] =
document.userslist.selHospitals.options[i].value;}
count++;
}
var x;

for (i = 0; i < boxLength; i++)
{for (x = 0; x < arrSelected.length; x++)
{if (document.userslist.selHospitals.options[i].value ==
arrSelected[x])
{document.userslist.selHospitals.options[i] = null;}
}
boxLength = document.userslist.selHospitals.length;
}
}

//-->



<%
dim hospitallist1
dim selHospitals
%>


Hospital Selection List









Click on Name to Add


Hospital List User's Current Hospital
List



------ ALL HOSPITALS -----
ARH Regional Medical Center
Baptist Hospital East
Baptist Hospital Northeast
Baptist Regional Medical Center
Berea Hospital
Bluegrass Community Hospital
Bourbon Community Hospital
Breckinridge Memorial Hospital
Caldwell County Hospital
Caritas Medical Center
Carroll County Hospital
Casey County Hospital
Caverna Memorial Hospital Inc.




















Prog2:





<%
dim strHospitalList
dim whatislist


strHospitalList = (Request.form("sHospitals"))
whatislist = TypeName(strHospitalList)
Response.write "List = " & strHospitalList
%>



GeneralRe: Need help with Listboxes/arrays Pin
alex.barylski21-Feb-05 12:00
alex.barylski21-Feb-05 12:00 
GeneralRe: Need help with Listboxes/arrays Pin
satya chhikara27-Feb-05 22:22
satya chhikara27-Feb-05 22:22 
GeneralList Elements in Columns with CSS Pin
Roland Bär21-Feb-05 10:25
Roland Bär21-Feb-05 10:25 
GeneralForced spacing Pin
Esmo200021-Feb-05 7:43
Esmo200021-Feb-05 7:43 
GeneralRe: Forced spacing Pin
TSmelser21-Feb-05 8:03
TSmelser21-Feb-05 8:03 
GeneralRe: Forced spacing Pin
Esmo200021-Feb-05 8:36
Esmo200021-Feb-05 8:36 
QuestionHow to find an elements Left and Top positions in HTML page Pin
nagarajuepuri21-Feb-05 6:56
nagarajuepuri21-Feb-05 6:56 
AnswerRe: How to find an elements Left and Top positions in HTML page Pin
alex.barylski21-Feb-05 12:06
alex.barylski21-Feb-05 12:06 
QuestionHow can i exclude HEADER Pin
Anonymous21-Feb-05 6:44
Anonymous21-Feb-05 6:44 
QuestionRequest QueryString Problem?? Pin
mjay200421-Feb-05 5:20
mjay200421-Feb-05 5:20 
AnswerRe: Request QueryString Problem?? Pin
satya chhikara27-Feb-05 22:31
satya chhikara27-Feb-05 22:31 
Generalabout function .exec() Pin
kinkei21-Feb-05 0:27
kinkei21-Feb-05 0:27 
GeneralVertical scroll behavior Pin
Marc Soleda20-Feb-05 23:14
Marc Soleda20-Feb-05 23:14 
General&quot;GET&quot; or &quot;POST&quot; Pin
Member 174700020-Feb-05 10:30
Member 174700020-Feb-05 10:30 
GeneralRe: &quot;GET&quot; or &quot;POST&quot; Pin
alex.barylski21-Feb-05 12:12
alex.barylski21-Feb-05 12:12 
GeneralASP multi-form database driven results page Pin
Member 174700020-Feb-05 7:46
Member 174700020-Feb-05 7:46 
GeneralWeb Application Pin
mitthooo19-Feb-05 22:36
mitthooo19-Feb-05 22:36 

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.