Forum: JavaScript / DHTML / AJAX Dec 18th, 2008 |
| Replies: 3 Views: 2,273 Here, this should fix it:
EDIT: I don't know why you used an array by the way, and note the change I did with your switch case to see how it works with your buttons.
<!DOCTYPE HTML PUBLIC... |
Forum: JavaScript / DHTML / AJAX Dec 13th, 2008 |
| Replies: 19 Views: 4,844 What you could do is give each checkbox an ID and go by that ID instead of the name, then you can get the name of that checkbox because you have it's ID:
<input type="checkbox" id="checkBox1"... |
Forum: JavaScript / DHTML / AJAX Dec 12th, 2008 |
| Replies: 19 Views: 4,844 That depends on what's in $new['studentId']. Is it a number? I'm guessing it is, and how many do you have, in my example there are 5 checkboxes in the form. If your studentId's follow each other up... |
Forum: JavaScript / DHTML / AJAX Dec 12th, 2008 |
| Replies: 19 Views: 4,844 Excuse me, my previous post was indeed nonsense. This on the other hand should work:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>... |
Forum: JavaScript / DHTML / AJAX Dec 9th, 2008 |
| Replies: 19 Views: 4,844 function checkCheckBoxes() {
var i;
var isOneChecked = false;
for(i=0;i<5;i++) {
if(checkBoxCountry[i].checked) {
isOneChecked = true;
}
}
return... |
Forum: C++ Dec 9th, 2008 |
| Replies: 1 Views: 298 What a coincidence, someone wrote a topic about that yesterday, you can find it here: http://www.daniweb.com/forums/thread161189.html
Oh and your link is wrong, it has a h too much in it. It should... |
Forum: C++ Dec 8th, 2008 |
| Replies: 8 Views: 574 You can't have a function that has the same name of your class, how can you tell what's what?
You have some code outside the main function or any other functions, that doesn't seem right.
Hope... |
Forum: JavaScript / DHTML / AJAX Dec 8th, 2008 |
| Replies: 1 Views: 1,508 When I try to access http://www.airedale911.org/gen_validatorv31.js it says "The system cannot find the file specified."
Maybe that is where your problem lies, otherwise I'll have to see that code... |
Forum: JavaScript / DHTML / AJAX Dec 8th, 2008 |
| Replies: 19 Views: 4,844 onclick="if(this.checked == 1) { alert('checked: '+<? echo $newArray['id'];?>); }"
Hopefully this is what you want : - ) |
Forum: JavaScript / DHTML / AJAX Dec 6th, 2008 |
| Replies: 19 Views: 4,844 I should stop writing my posts so late, anyway
Looking back at my previous post I don't even think you HAVE to give them a unique ID to be able to iterate trough them. ID is there to give each... |
Forum: JavaScript / DHTML / AJAX Dec 6th, 2008 |
| Replies: 19 Views: 4,844 What you need to do in PHP is give each checkbox an individual ID then,
as in:
echo "<input type='checkbox' id='checkbox".$i."' name='".$checkboxName."'> </input>";
Now you can iterate... |
Forum: JavaScript / DHTML / AJAX Dec 5th, 2008 |
| Replies: 19 Views: 4,844 You can iterate trough forum controls with Javascript
var i;
for(i=1;i<18;i++) {
document.formPermissions.elements[i].checked = 1;
} |
Forum: JavaScript / DHTML / AJAX Dec 5th, 2008 |
| Replies: 3 Views: 1,539 How about this:
<script type="text/javascript">
function checkit(formName, checkBox) {
var xx = document.formName.elements.checkBox;
xx.checked = 1;
}
</script>
<form name="myform"> |
Forum: C++ Nov 22nd, 2008 |
| Replies: 12 Views: 1,322 Yeah, my bad;
i² = -1
you can't calculate i but you can use it |
Forum: C++ Nov 22nd, 2008 |
| Replies: 12 Views: 1,322 If you don't mind add your code and I'll try and take a look at it :) |
Forum: C++ Nov 22nd, 2008 |
| Replies: 12 Views: 1,322 * -1
The square root of -1 is -1 we say. So it would just make your number negative.
Maybe this documentation is helpful for you too :)
http://en.wikipedia.org/wiki/Complex_number |
Forum: C++ Nov 22nd, 2008 |
| Replies: 12 Views: 1,322 Well,
the square root of 4 is 2 because 2*2 is 4. So the square root of x is a number which complies to this: y*y = x.
This works for every number that is positive, however, if you try to take the... |
Forum: C++ Nov 22nd, 2008 |
| Replies: 12 Views: 1,322 The square root of 1 is 1, this should lead to the square root of -1 being -1, however, this is imaginary. Taking the square root of a negative number doesn't work.
i = -1
Hope this helps |
Forum: C++ Nov 20th, 2008 |
| Replies: 5 Views: 2,692 1 = 1
10 = 2
100 = 4
1000 = 8
You can solve this in more than one way, well I can think of multiple ways atleast ^^
Hope this helps |
Forum: C++ Nov 20th, 2008 |
| Replies: 4 Views: 409 If you want to use cout and cin you'll have to include <iostream> and use namespace std.
A sample program is something like this:
#include <iostream>
int main() {
int x, y, z, min; //... |