Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.
![](https://s.yimg.com/ag/images/4689/38762719596_aa72ac_192sq.jpg)
rsmith985
Senior in Computer Science. Feel free to email me with job offers :)
JavaScript : Problem with document.write()?
Im new to JavaScript and I have traced problems I have been having to this. Can you tell me what Im doing wrong.
Works
if( document.myform.box1.checked ){
document.write( "true<br>" );
} else {
document.write( "false<br>" );
}
Prints
true
Works
if( document.myform.box2.checked ){
document.write( "true<br>" );
} else {
document.write( "false<br>" );
}
Prints
true
Works
if(true){
document.write( "true<br>" );
}
else{
document.write( "false<br>" );
}
if(false){
document.write( "true<br>" );
}
else{
document.write( "false<br>" );
}
Prints
true
false
Doesnt Work
if( document.myform.box1.checked ){
document.write( "true<br>" );
} else {
document.write( "false<br>" );
}
if( document.myform.box2.checked ){
document.write( "true<br>" );
} else {
document.write( "false<br>" );
}
Prints
true
The first 3 print what you would expect, the last only prints the first line. It wont print both true/false messages. Any ideas why?
2 AnswersProgramming & Design1 decade agoJavaScript & DOM : Telling if a checkbox has been checked?
Ive never written anything in javascript before, and I am having some difficulties figuring the DOM out. What I want to do is have a form with checkboxes, when a user hits a submit button, whatever checkboxes were selected will display a different table. Right now Im having trouble telling if a checkbox is checked. I havent really found any tutorials out there to describe this well. In a nutshell this is what I have.
<head>
function GetResults(form) {
var d = document;
d.write("<html><body>");
if( form.box["1"].checked ){ // what goes here?
d.write("hi<br>");
}
d.write("</body></html>");
}
</head><body><form>
<input type="checkbox" name="box" value="1" />
<input type="checkbox" name="box" value="2" />
<input type="button" value="Get Results" onclick="GetResults( this.form );" />
</form></body></html>
Any suggestions would be helpful, I'm sure I am doing many things wrong.
4 AnswersProgramming & Design1 decade agoMouse over pop-up window, ASP .net?
I am working on a webpage in .Net.
I would like to have when I mouse over a table cell for a small pop-up window with a message to appear.
To see an example of what I would like to do - http://www.tvguide.com/listings/default.aspx
Any Ideas on how this is done?
Hopefully it doesnt matter but the tables are built using Anthem.net for AJAX support.
2 AnswersProgramming & Design1 decade agoC Programming - Reading input from STDIN - need help.?
I need to write a program in pure C. Coming from a C++/Java background I am slightly confused.
I would like to read in a float value from STDIN. I see there are functions like read(), scanf().... that will let you read in char[], but nothing to read in something else.
So how can a read in a float, or how would I convert a char[] to a float.
5 AnswersProgramming & Design1 decade agoC Passing a 3-D array of char strings to a function?
So I have a 3-D array of char strings -
char* val[256][256][256];
I need to pass a reference of this to a function, how do I do this?
If it was a single array I can pass it as follows
char* val[256]
func(val);
....
void func(char** a){}
However
void func(char**** a){}
doesnt work.
Any suggestions?
1 AnswerProgramming & Design1 decade agoHow do you disassemble an office chair?
More specifically how do you disconnect the cylinder from the base and seat?
6 AnswersMaintenance & Repairs1 decade ago