General discussion

Locked

Checkbox-style ListBox

By setivi ·
What is the script, code or method to check the checkbox next to an item in a checkbox-style ListBox?

This conversation is currently closed to new comments.

10 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

Checkbox-style ListBox

by PhiltheGreat In reply to Checkbox-style ListBox

Do you meant by Javascript?

<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=big5">
<script language="JavaScript"></script>
<script language="JavaScript" src="scripts/behActions.js"></script>
<script language="JavaScript" src="scripts/behCourseBuilder.js"></script>
<script language="JavaScript" src="scripts/interactionClass.js"></script>
<script language="JavaScript" src="scripts/elemInptClass.js"></script>
</head>

<body bgcolor="#FFFFFF" text="#000000" onLoad="MM_initInteractions()">
<interaction name="MultCh_Checkboxes01" object="G01" template="010_Multiple Choice/050_MultCh_Checkboxes_03.agt" includesrc="interactionClass.js,elemInptClass.js">
<div name="G01Layer"> <span name="G01question">Put your question text here<br>
</span>
<form name="G01choices">
<span name="G01choice1">
<input name="G01choice1Inp" type="checkbox" onClick="G01.e['choice1'].update()">
Text for choice1<br>
</span> <span name="G01choice2">
<input name="G01choice2Inp" type="checkbox" onClick="G01.e['choice2'].update()">
Text for choice2<br>
</span> <span name="G01choice3">
<input name="G01choice3Inp" type="checkbox" onClick="G01.e['choice3'].update()">
Text for choice3<br>
</span> <span name="G01choice4">
<input name="G01choice4Inp" type="checkbox" onClick="G01.e['choice4'].update()">
Text for choice4<br>
</span>
</form>

Collapse -

Checkbox-style ListBox

by PhiltheGreat In reply to Checkbox-style ListBox

<form name="G01controls">
<input name="G01judge" type="button"

Collapse -

Checkbox-style ListBox

by PhiltheGreat In reply to Checkbox-style ListBox

If you add all the three answers together, then it is the code you need for a listbox.

If this is not, what you want; please clarify your question with more details.

Collapse -

Checkbox-style ListBox

by setivi In reply to Checkbox-style ListBox

Poster rated this answer

Collapse -

Checkbox-style ListBox

by PhiltheGreat In reply to Checkbox-style ListBox

<form name="G01controls">
<input name="G01judge" type="button" value="Submit" onClick="MM_judgeInt('G01')">
<input name="G01reset" type="button" value="Reset" onClick="MM_resetInt('G01','reset','')">
</form>
</div>
<script language="JavaScript">
<!--
// Copyright 1998,1999 Macromedia, Inc. All rights reserved.
function newG01() {
G01 = new MM_interaction('G01',0,1,1,null,0,0,0,'','','c','',0);
G01.add('inpt','choice1',0,1,1,0);
G01.add('inpt','choice2',0,1,1,0);
G01.add('inpt','choice3',0,1,0,0);
G01.add('inpt','choice4',0,1,0,0);
G01.init();
G01.am('segm','Segment: Check Time_',1,1);
G01.am('cond','Time At Limit_','G01.timeAtLimit == true',0);
G01.am('actn','Popup Message','MM_popupMsg(\'You are out of time\')','pm');
G01.am('actn','Set Interaction Properties: Disable Interaction','MM_setIntProps(\'G01.setDisabled(true);\')','sp');
G01.am('end');
G01.am('segm','Segment: Correctness_',1,0);
G01.am('cond','Correct_01','G01.correct == true',0);
G01.am('actn','Popup Message','MM_popupMsg(\'Correct\')','');
G01.am('end');
G01.am('cond','Incorrect_','G01.correct == (false)',0);
G01.am('actn','Popup Message','MM_popupMsg(\'Incorrect\')','');
G01.am('end');
G01.am('cond','Unknown Response_','G01.knownResponse == false',0);
G01.am('actn','Popup Message','MM_popupMsg(\'Unknown Response\')','');
G01.am('end');
G01.am('segm','Segment: Check Tries_',1,1); G01.am('cond','Tries At Limit_','G01.triesAtLimit == true',0);
G01.am('actn','Popup Message','MM_popupMsg(\'You are out of tries\')','pm');
G01.am('actn','Set Interaction Properties: Disable Interaction','MM_setIntProps(\'G01.setDisabled(true);\')','sp');
G01.am('end');
}

Collapse -

Checkbox-style ListBox

by setivi In reply to Checkbox-style ListBox

Poster rated this answer

Collapse -

Checkbox-style ListBox

by PhiltheGreat In reply to Checkbox-style ListBox

if (window.newG01 == null) window.newG01 = newG01;
if (!window.MM_initIntFns) window.MM_initIntFns = ''; window.MM_initIntFns += 'newG01();';
//-->
</script>
<cbi-select object="G01"></interaction>
</body>
</html>

Collapse -

Checkbox-style ListBox

by setivi In reply to Checkbox-style ListBox

Poster rated this answer

Collapse -

Checkbox-style ListBox

by setivi In reply to Checkbox-style ListBox

The question pertains to VB6. Do accept my sincerest apology.

Collapse -

Checkbox-style ListBox

by setivi In reply to Checkbox-style ListBox

This question was closed by the author

Back to Web Development Forum
10 total posts (Page 1 of 1)  

Related Discussions

Related Forums