Search the web
Sign In
New User? Sign Up
JS-Jive · The premiere Yahoo! Javascript Group
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Want to share photos of your group with the world? Add a group photo to Flickr.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Messages 21033 - 21062 of 21091   Newest  |  < Newer  |  Older >  |  Oldest
Messages: Show Message Summaries   (Group by Topic) Sort by Date v  
#21062 From: Hassan Schroeder <hassan@...>
Date: Wed Mar 28, 2007 11:17 pm
Subject: Re: checkbox values?
laughingandj...
Offline Offline
Send Email Send Email
 
caitlin_weaver wrote:

> I have a form with three checkboxes, and want to set another variable
> depending on which boxes are checked.
>
> The boxes have values of 1, 2, and 4, and I want to add up the values
> of whichever boxes are checked.
>
> The problem is that I'm getting a value of 7 no matter what boxes are
> checked.

> var b1 = document.form1.base1.value;
> var b2 = document.form1.base2.value;
> var b3 = document.form1.base3.value;

Exactly -- you're adding *all the values* regardless of whether the
box is "successful", i.e. checked. :-)

Untested, but something like

  var b1 = (document.form.base1.checked)? document.form1.base1.value: 0;

would probably do it.

Alternatively, add event handlers to the checkboxes so they keep a
running total as they're clicked and un-clicked. :-)

HTH!
--
Hassan Schroeder ----------------------------- hassan@...
Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com
                 opinion: webtuitive.blogspot.com

                           dream.  code.

#21061 From: Hassan Schroeder <hassan@...>
Date: Wed Mar 28, 2007 11:17 pm
Subject: Re: checkbox values?
laughingandj...
Offline Offline
Send Email Send Email
 
caitlin_weaver wrote:

> I have a form with three checkboxes, and want to set another variable
> depending on which boxes are checked.
>
> The boxes have values of 1, 2, and 4, and I want to add up the values
> of whichever boxes are checked.
>
> The problem is that I'm getting a value of 7 no matter what boxes are
> checked.

> var b1 = document.form1.base1.value;
> var b2 = document.form1.base2.value;
> var b3 = document.form1.base3.value;

Exactly -- you're adding *all the values* regardless of whether the
box is "successful", i.e. checked. :-)

Untested, but something like

  var b1 = (document.form.base1.checked)? document.form1.base1.value: 0;

would probably do it.

Alternatively, add event handlers to the checkboxes so they keep a
running total as they're clicked and un-clicked. :-)

HTH!
--
Hassan Schroeder ----------------------------- hassan@...
Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com
                 opinion: webtuitive.blogspot.com

                           dream.  code.

#21060 From: "caitlin_weaver" <caitlin_weaver@...>
Date: Sat Mar 24, 2007 3:13 am
Subject: checkbox values?
caitlin_weaver
Offline Offline
Send Email Send Email
 
I have a form with three checkboxes, and want to set another variable
depending on which boxes are checked.

The boxes have values of 1, 2, and 4, and I want to add up the values
of whichever boxes are checked.

The problem is that I'm getting a value of 7 no matter what boxes are
checked.

Any ideas?

---------------------------------


<script language="javascript">
	 <!--
		 function getbase() {

  var b1 = document.form1.base1.value;
  var b2 = document.form1.base2.value;
  var b3 = document.form1.base3.value;

  document.form1.bases.value = parseFloat(b1) + parseFloat(b2) +
parseFloat(b3);

}
	 //-->

</script>

</head>

<body>

<form name="form1">

1<input type="checkbox" name="base1" value="1">
2<input type="checkbox" name="base2" value="2">
3<input type="checkbox" name="base3" value="4">

<br><br>

<input name="bases" type="text">

<br><br>

<input type=submit onclick="getbase()">


</form>

#21059 From: "spot_notrub" <spot_notrub@...>
Date: Fri Mar 23, 2007 5:24 am
Subject: Javascript "permission denied" error - .parent
spot_notrub
Offline Offline
Send Email Send Email
 
Hi,
I am trying to get some training material to run within an LMS
(learning management system). This material is produced
with "Articulate" software which takes PowerPoint files and converts
them to a Flash presentation.
In the presentation is an "exit" button which exits the Articulate
presentation and I need it to go to the next page in the LMS.
After much experimentation I added the JavaScript function:
parent.ReturnToDOTS(); into a text file called flashcommand.js which
is the "general fscommand handler for ALL output formats". DOTS is
the name of our LMS.
The exact code is:
case "ART_CloseAndExit":
if (!g_bLMS)
{
parent.ReturnToDOTS();
}
break;

Here is the problem: This function works fine on some of our PCs but
not others (permission denied error)! Any idea why that might happen?
We have checked the version of Java on the PCs and it appears to be
the same.
regards
spot

#21058 From: Hassan Schroeder <hassan@...>
Date: Wed Mar 28, 2007 11:17 pm
Subject: Re: checkbox values?
laughingandj...
Offline Offline
Send Email Send Email
 
caitlin_weaver wrote:

> I have a form with three checkboxes, and want to set another variable
> depending on which boxes are checked.
>
> The boxes have values of 1, 2, and 4, and I want to add up the values
> of whichever boxes are checked.
>
> The problem is that I'm getting a value of 7 no matter what boxes are
> checked.

> var b1 = document.form1.base1.value;
> var b2 = document.form1.base2.value;
> var b3 = document.form1.base3.value;

Exactly -- you're adding *all the values* regardless of whether the
box is "successful", i.e. checked. :-)

Untested, but something like

  var b1 = (document.form.base1.checked)? document.form1.base1.value: 0;

would probably do it.

Alternatively, add event handlers to the checkboxes so they keep a
running total as they're clicked and un-clicked. :-)

HTH!
--
Hassan Schroeder ----------------------------- hassan@...
Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com
                 opinion: webtuitive.blogspot.com

                           dream.  code.

#21057 From: Hassan Schroeder <hassan@...>
Date: Wed Mar 28, 2007 11:17 pm
Subject: Re: checkbox values?
laughingandj...
Offline Offline
Send Email Send Email
 
caitlin_weaver wrote:

> I have a form with three checkboxes, and want to set another variable
> depending on which boxes are checked.
>
> The boxes have values of 1, 2, and 4, and I want to add up the values
> of whichever boxes are checked.
>
> The problem is that I'm getting a value of 7 no matter what boxes are
> checked.

> var b1 = document.form1.base1.value;
> var b2 = document.form1.base2.value;
> var b3 = document.form1.base3.value;

Exactly -- you're adding *all the values* regardless of whether the
box is "successful", i.e. checked. :-)

Untested, but something like

  var b1 = (document.form.base1.checked)? document.form1.base1.value: 0;

would probably do it.

Alternatively, add event handlers to the checkboxes so they keep a
running total as they're clicked and un-clicked. :-)

HTH!
--
Hassan Schroeder ----------------------------- hassan@...
Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com
                 opinion: webtuitive.blogspot.com

                           dream.  code.

#21056 From: Hassan Schroeder <hassan@...>
Date: Wed Mar 28, 2007 11:17 pm
Subject: Re: checkbox values?
laughingandj...
Offline Offline
Send Email Send Email
 
caitlin_weaver wrote:

> I have a form with three checkboxes, and want to set another variable
> depending on which boxes are checked.
>
> The boxes have values of 1, 2, and 4, and I want to add up the values
> of whichever boxes are checked.
>
> The problem is that I'm getting a value of 7 no matter what boxes are
> checked.

> var b1 = document.form1.base1.value;
> var b2 = document.form1.base2.value;
> var b3 = document.form1.base3.value;

Exactly -- you're adding *all the values* regardless of whether the
box is "successful", i.e. checked. :-)

Untested, but something like

  var b1 = (document.form.base1.checked)? document.form1.base1.value: 0;

would probably do it.

Alternatively, add event handlers to the checkboxes so they keep a
running total as they're clicked and un-clicked. :-)

HTH!
--
Hassan Schroeder ----------------------------- hassan@...
Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com
                 opinion: webtuitive.blogspot.com

                           dream.  code.

#21055 From: "spot_notrub" <spot_notrub@...>
Date: Fri Mar 23, 2007 5:24 am
Subject: Javascript "permission denied" error - .parent
spot_notrub
Offline Offline
Send Email Send Email
 
Hi,
I am trying to get some training material to run within an LMS
(learning management system). This material is produced
with "Articulate" software which takes PowerPoint files and converts
them to a Flash presentation.
In the presentation is an "exit" button which exits the Articulate
presentation and I need it to go to the next page in the LMS.
After much experimentation I added the JavaScript function:
parent.ReturnToDOTS(); into a text file called flashcommand.js which
is the "general fscommand handler for ALL output formats". DOTS is
the name of our LMS.
The exact code is:
case "ART_CloseAndExit":
if (!g_bLMS)
{
parent.ReturnToDOTS();
}
break;

Here is the problem: This function works fine on some of our PCs but
not others (permission denied error)! Any idea why that might happen?
We have checked the version of Java on the PCs and it appears to be
the same.
regards
spot

#21054 From: "caitlin_weaver" <caitlin_weaver@...>
Date: Sat Mar 24, 2007 3:13 am
Subject: checkbox values?
caitlin_weaver
Offline Offline
Send Email Send Email
 
I have a form with three checkboxes, and want to set another variable
depending on which boxes are checked.

The boxes have values of 1, 2, and 4, and I want to add up the values
of whichever boxes are checked.

The problem is that I'm getting a value of 7 no matter what boxes are
checked.

Any ideas?

---------------------------------


<script language="javascript">
	 <!--
		 function getbase() {

  var b1 = document.form1.base1.value;
  var b2 = document.form1.base2.value;
  var b3 = document.form1.base3.value;

  document.form1.bases.value = parseFloat(b1) + parseFloat(b2) +
parseFloat(b3);

}
	 //-->

</script>

</head>

<body>

<form name="form1">

1<input type="checkbox" name="base1" value="1">
2<input type="checkbox" name="base2" value="2">
3<input type="checkbox" name="base3" value="4">

<br><br>

<input name="bases" type="text">

<br><br>

<input type=submit onclick="getbase()">


</form>

#21053 From: "spot_notrub" <spot_notrub@...>
Date: Fri Mar 23, 2007 5:24 am
Subject: Javascript "permission denied" error - .parent
spot_notrub
Offline Offline
Send Email Send Email
 
Hi,
I am trying to get some training material to run within an LMS
(learning management system). This material is produced
with "Articulate" software which takes PowerPoint files and converts
them to a Flash presentation.
In the presentation is an "exit" button which exits the Articulate
presentation and I need it to go to the next page in the LMS.
After much experimentation I added the JavaScript function:
parent.ReturnToDOTS(); into a text file called flashcommand.js which
is the "general fscommand handler for ALL output formats". DOTS is
the name of our LMS.
The exact code is:
case "ART_CloseAndExit":
if (!g_bLMS)
{
parent.ReturnToDOTS();
}
break;

Here is the problem: This function works fine on some of our PCs but
not others (permission denied error)! Any idea why that might happen?
We have checked the version of Java on the PCs and it appears to be
the same.
regards
spot

#21052 From: "caitlin_weaver" <caitlin_weaver@...>
Date: Sat Mar 24, 2007 3:13 am
Subject: checkbox values?
caitlin_weaver
Offline Offline
Send Email Send Email
 
I have a form with three checkboxes, and want to set another variable
depending on which boxes are checked.

The boxes have values of 1, 2, and 4, and I want to add up the values
of whichever boxes are checked.

The problem is that I'm getting a value of 7 no matter what boxes are
checked.

Any ideas?

---------------------------------


<script language="javascript">
	 <!--
		 function getbase() {

  var b1 = document.form1.base1.value;
  var b2 = document.form1.base2.value;
  var b3 = document.form1.base3.value;

  document.form1.bases.value = parseFloat(b1) + parseFloat(b2) +
parseFloat(b3);

}
	 //-->

</script>

</head>

<body>

<form name="form1">

1<input type="checkbox" name="base1" value="1">
2<input type="checkbox" name="base2" value="2">
3<input type="checkbox" name="base3" value="4">

<br><br>

<input name="bases" type="text">

<br><br>

<input type=submit onclick="getbase()">


</form>

#21051 From: Hassan Schroeder <hassan@...>
Date: Wed Mar 28, 2007 11:17 pm
Subject: Re: checkbox values?
laughingandj...
Offline Offline
Send Email Send Email
 
caitlin_weaver wrote:

> I have a form with three checkboxes, and want to set another variable
> depending on which boxes are checked.
>
> The boxes have values of 1, 2, and 4, and I want to add up the values
> of whichever boxes are checked.
>
> The problem is that I'm getting a value of 7 no matter what boxes are
> checked.

> var b1 = document.form1.base1.value;
> var b2 = document.form1.base2.value;
> var b3 = document.form1.base3.value;

Exactly -- you're adding *all the values* regardless of whether the
box is "successful", i.e. checked. :-)

Untested, but something like

  var b1 = (document.form.base1.checked)? document.form1.base1.value: 0;

would probably do it.

Alternatively, add event handlers to the checkboxes so they keep a
running total as they're clicked and un-clicked. :-)

HTH!
--
Hassan Schroeder ----------------------------- hassan@...
Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com
                 opinion: webtuitive.blogspot.com

                           dream.  code.

#21050 From: Hassan Schroeder <hassan@...>
Date: Wed Mar 28, 2007 11:17 pm
Subject: Re: checkbox values?
laughingandj...
Offline Offline
Send Email Send Email
 
caitlin_weaver wrote:

> I have a form with three checkboxes, and want to set another variable
> depending on which boxes are checked.
>
> The boxes have values of 1, 2, and 4, and I want to add up the values
> of whichever boxes are checked.
>
> The problem is that I'm getting a value of 7 no matter what boxes are
> checked.

> var b1 = document.form1.base1.value;
> var b2 = document.form1.base2.value;
> var b3 = document.form1.base3.value;

Exactly -- you're adding *all the values* regardless of whether the
box is "successful", i.e. checked. :-)

Untested, but something like

  var b1 = (document.form.base1.checked)? document.form1.base1.value: 0;

would probably do it.

Alternatively, add event handlers to the checkboxes so they keep a
running total as they're clicked and un-clicked. :-)

HTH!
--
Hassan Schroeder ----------------------------- hassan@...
Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com
                 opinion: webtuitive.blogspot.com

                           dream.  code.

#21049 From: "spot_notrub" <spot_notrub@...>
Date: Fri Mar 23, 2007 5:24 am
Subject: Javascript "permission denied" error - .parent
spot_notrub
Offline Offline
Send Email Send Email
 
Hi,
I am trying to get some training material to run within an LMS
(learning management system). This material is produced
with "Articulate" software which takes PowerPoint files and converts
them to a Flash presentation.
In the presentation is an "exit" button which exits the Articulate
presentation and I need it to go to the next page in the LMS.
After much experimentation I added the JavaScript function:
parent.ReturnToDOTS(); into a text file called flashcommand.js which
is the "general fscommand handler for ALL output formats". DOTS is
the name of our LMS.
The exact code is:
case "ART_CloseAndExit":
if (!g_bLMS)
{
parent.ReturnToDOTS();
}
break;

Here is the problem: This function works fine on some of our PCs but
not others (permission denied error)! Any idea why that might happen?
We have checked the version of Java on the PCs and it appears to be
the same.
regards
spot

#21048 From: "caitlin_weaver" <caitlin_weaver@...>
Date: Sat Mar 24, 2007 3:13 am
Subject: checkbox values?
caitlin_weaver
Offline Offline
Send Email Send Email
 
I have a form with three checkboxes, and want to set another variable
depending on which boxes are checked.

The boxes have values of 1, 2, and 4, and I want to add up the values
of whichever boxes are checked.

The problem is that I'm getting a value of 7 no matter what boxes are
checked.

Any ideas?

---------------------------------


<script language="javascript">
	 <!--
		 function getbase() {

  var b1 = document.form1.base1.value;
  var b2 = document.form1.base2.value;
  var b3 = document.form1.base3.value;

  document.form1.bases.value = parseFloat(b1) + parseFloat(b2) +
parseFloat(b3);

}
	 //-->

</script>

</head>

<body>

<form name="form1">

1<input type="checkbox" name="base1" value="1">
2<input type="checkbox" name="base2" value="2">
3<input type="checkbox" name="base3" value="4">

<br><br>

<input name="bases" type="text">

<br><br>

<input type=submit onclick="getbase()">


</form>

#21047 From: "caitlin_weaver" <caitlin_weaver@...>
Date: Sat Mar 24, 2007 3:13 am
Subject: checkbox values?
caitlin_weaver
Offline Offline
Send Email Send Email
 
I have a form with three checkboxes, and want to set another variable
depending on which boxes are checked.

The boxes have values of 1, 2, and 4, and I want to add up the values
of whichever boxes are checked.

The problem is that I'm getting a value of 7 no matter what boxes are
checked.

Any ideas?

---------------------------------


<script language="javascript">
	 <!--
		 function getbase() {

  var b1 = document.form1.base1.value;
  var b2 = document.form1.base2.value;
  var b3 = document.form1.base3.value;

  document.form1.bases.value = parseFloat(b1) + parseFloat(b2) +
parseFloat(b3);

}
	 //-->

</script>

</head>

<body>

<form name="form1">

1<input type="checkbox" name="base1" value="1">
2<input type="checkbox" name="base2" value="2">
3<input type="checkbox" name="base3" value="4">

<br><br>

<input name="bases" type="text">

<br><br>

<input type=submit onclick="getbase()">


</form>

#21046 From: "spot_notrub" <spot_notrub@...>
Date: Fri Mar 23, 2007 5:24 am
Subject: Javascript "permission denied" error - .parent
spot_notrub
Offline Offline
Send Email Send Email
 
Hi,
I am trying to get some training material to run within an LMS
(learning management system). This material is produced
with "Articulate" software which takes PowerPoint files and converts
them to a Flash presentation.
In the presentation is an "exit" button which exits the Articulate
presentation and I need it to go to the next page in the LMS.
After much experimentation I added the JavaScript function:
parent.ReturnToDOTS(); into a text file called flashcommand.js which
is the "general fscommand handler for ALL output formats". DOTS is
the name of our LMS.
The exact code is:
case "ART_CloseAndExit":
if (!g_bLMS)
{
parent.ReturnToDOTS();
}
break;

Here is the problem: This function works fine on some of our PCs but
not others (permission denied error)! Any idea why that might happen?
We have checked the version of Java on the PCs and it appears to be
the same.
regards
spot

#21045 From: "spot_notrub" <spot_notrub@...>
Date: Fri Mar 23, 2007 5:24 am
Subject: Javascript "permission denied" error - .parent
spot_notrub
Offline Offline
Send Email Send Email
 
Hi,
I am trying to get some training material to run within an LMS
(learning management system). This material is produced
with "Articulate" software which takes PowerPoint files and converts
them to a Flash presentation.
In the presentation is an "exit" button which exits the Articulate
presentation and I need it to go to the next page in the LMS.
After much experimentation I added the JavaScript function:
parent.ReturnToDOTS(); into a text file called flashcommand.js which
is the "general fscommand handler for ALL output formats". DOTS is
the name of our LMS.
The exact code is:
case "ART_CloseAndExit":
if (!g_bLMS)
{
parent.ReturnToDOTS();
}
break;

Here is the problem: This function works fine on some of our PCs but
not others (permission denied error)! Any idea why that might happen?
We have checked the version of Java on the PCs and it appears to be
the same.
regards
spot

#21044 From: "caitlin_weaver" <caitlin_weaver@...>
Date: Sat Mar 24, 2007 3:13 am
Subject: checkbox values?
caitlin_weaver
Offline Offline
Send Email Send Email
 
I have a form with three checkboxes, and want to set another variable
depending on which boxes are checked.

The boxes have values of 1, 2, and 4, and I want to add up the values
of whichever boxes are checked.

The problem is that I'm getting a value of 7 no matter what boxes are
checked.

Any ideas?

---------------------------------


<script language="javascript">
	 <!--
		 function getbase() {

  var b1 = document.form1.base1.value;
  var b2 = document.form1.base2.value;
  var b3 = document.form1.base3.value;

  document.form1.bases.value = parseFloat(b1) + parseFloat(b2) +
parseFloat(b3);

}
	 //-->

</script>

</head>

<body>

<form name="form1">

1<input type="checkbox" name="base1" value="1">
2<input type="checkbox" name="base2" value="2">
3<input type="checkbox" name="base3" value="4">

<br><br>

<input name="bases" type="text">

<br><br>

<input type=submit onclick="getbase()">


</form>

#21043 From: "spot_notrub" <spot_notrub@...>
Date: Fri Mar 23, 2007 5:24 am
Subject: Javascript "permission denied" error - .parent
spot_notrub
Offline Offline
Send Email Send Email
 
Hi,
I am trying to get some training material to run within an LMS
(learning management system). This material is produced
with "Articulate" software which takes PowerPoint files and converts
them to a Flash presentation.
In the presentation is an "exit" button which exits the Articulate
presentation and I need it to go to the next page in the LMS.
After much experimentation I added the JavaScript function:
parent.ReturnToDOTS(); into a text file called flashcommand.js which
is the "general fscommand handler for ALL output formats". DOTS is
the name of our LMS.
The exact code is:
case "ART_CloseAndExit":
if (!g_bLMS)
{
parent.ReturnToDOTS();
}
break;

Here is the problem: This function works fine on some of our PCs but
not others (permission denied error)! Any idea why that might happen?
We have checked the version of Java on the PCs and it appears to be
the same.
regards
spot

#21042 From: "caitlin_weaver" <caitlin_weaver@...>
Date: Sat Mar 24, 2007 3:13 am
Subject: checkbox values?
caitlin_weaver
Offline Offline
Send Email Send Email
 
I have a form with three checkboxes, and want to set another variable
depending on which boxes are checked.

The boxes have values of 1, 2, and 4, and I want to add up the values
of whichever boxes are checked.

The problem is that I'm getting a value of 7 no matter what boxes are
checked.

Any ideas?

---------------------------------


<script language="javascript">
	 <!--
		 function getbase() {

  var b1 = document.form1.base1.value;
  var b2 = document.form1.base2.value;
  var b3 = document.form1.base3.value;

  document.form1.bases.value = parseFloat(b1) + parseFloat(b2) +
parseFloat(b3);

}
	 //-->

</script>

</head>

<body>

<form name="form1">

1<input type="checkbox" name="base1" value="1">
2<input type="checkbox" name="base2" value="2">
3<input type="checkbox" name="base3" value="4">

<br><br>

<input name="bases" type="text">

<br><br>

<input type=submit onclick="getbase()">


</form>

#21041 From: "spot_notrub" <spot_notrub@...>
Date: Fri Mar 23, 2007 5:24 am
Subject: Javascript "permission denied" error - .parent
spot_notrub
Offline Offline
Send Email Send Email
 
Hi,
I am trying to get some training material to run within an LMS
(learning management system). This material is produced
with "Articulate" software which takes PowerPoint files and converts
them to a Flash presentation.
In the presentation is an "exit" button which exits the Articulate
presentation and I need it to go to the next page in the LMS.
After much experimentation I added the JavaScript function:
parent.ReturnToDOTS(); into a text file called flashcommand.js which
is the "general fscommand handler for ALL output formats". DOTS is
the name of our LMS.
The exact code is:
case "ART_CloseAndExit":
if (!g_bLMS)
{
parent.ReturnToDOTS();
}
break;

Here is the problem: This function works fine on some of our PCs but
not others (permission denied error)! Any idea why that might happen?
We have checked the version of Java on the PCs and it appears to be
the same.
regards
spot

#21040 From: "caitlin_weaver" <caitlin_weaver@...>
Date: Sat Mar 24, 2007 3:13 am
Subject: checkbox values?
caitlin_weaver
Offline Offline
Send Email Send Email
 
I have a form with three checkboxes, and want to set another variable
depending on which boxes are checked.

The boxes have values of 1, 2, and 4, and I want to add up the values
of whichever boxes are checked.

The problem is that I'm getting a value of 7 no matter what boxes are
checked.

Any ideas?

---------------------------------


<script language="javascript">
	 <!--
		 function getbase() {

  var b1 = document.form1.base1.value;
  var b2 = document.form1.base2.value;
  var b3 = document.form1.base3.value;

  document.form1.bases.value = parseFloat(b1) + parseFloat(b2) +
parseFloat(b3);

}
	 //-->

</script>

</head>

<body>

<form name="form1">

1<input type="checkbox" name="base1" value="1">
2<input type="checkbox" name="base2" value="2">
3<input type="checkbox" name="base3" value="4">

<br><br>

<input name="bases" type="text">

<br><br>

<input type=submit onclick="getbase()">


</form>

#21039 From: liorean <liorean@...>
Date: Tue Feb 13, 2007 10:34 am
Subject: Re: JavaScript Debugging on IE7?
liorean
Offline Offline
Send Email Send Email
 
On 05/02/07, darianlassan <darianlassan@...> wrote:
>  I wonder if there are any similar tools for debugging JavaScript on
>  internet explorer 7 like I got used to on firefox and opera. I have no
>  useful error messages in IE7. (They are far too unprecise and do not
>  even point to the right file.)
>
>  Can anybody point me to a nice tool?

There has for a long time existed a totally worthless free debugging
tool called the "Microsoft Script Debugger".

A much better debugger comes with the Visual Studio program. You can
get Visual Studio Express for free, so that is a much better choice.

A third and pretty good choice is the script debugger that comes with
Microsoft Office. Enabling it may require you to run the installer
again, though, to check in the debugger option.
--
David "liorean" Andersson

#21038 From: "rockmohit" <rockmohit@...>
Date: Wed Feb 7, 2007 8:12 am
Subject: How can we measure the size of a web page?
rockmohit
Offline Offline
Send Email Send Email
 
Hi all.

Can we measure the size(not screen size i.e not height,width) of a Web
page through javascript?
If yes, how?


Thanks,
Mohit

#21037 From: "darianlassan" <darianlassan@...>
Date: Mon Feb 5, 2007 4:15 pm
Subject: JavaScript Debugging on IE7?
darianlassan
Offline Offline
Send Email Send Email
 
Hi,

I wonder if there are any similar tools for debugging JavaScript on
internet explorer 7 like I got used to on firefox and opera. I have no
useful error messages in IE7. (They are far too unprecise and do not
even point to the right file.)

Can anybody point me to a nice tool?

#21036 From: liorean <liorean@...>
Date: Fri Jan 19, 2007 8:36 pm
Subject: Re: Using prototype
liorean
Offline Offline
Send Email Send Email
 
On 1/19/07, upand_at_them <upand_at_them@...> wrote:
> I've been reading about the prototype object, but I don't understand
>  the difference between that that regular way of adding
>  properties/methods.
>
>  What's the difference between these two?...
>
>  function foo() {
>  this.bar=42;
>  }

Why not try it?

>  function foo() {
>  }
>  foo.prototype.bar = 42;

Let's do a little test:

     function foo(){
         this.bar=7;
     }
     foo.prototype.bar=42;

     var
         obj=new foo;

     alert(obj.bar); // ==> 7
     alert(obj.hasOwnProperty(bar)); // ==> true
     delete obj.bar; // delete the bar property from the actual obj object
     alert(obj.bar); // ==> 42
     alert(obj.hasOwnProperty(bar)); // ==> false
     foo.prototype.bar=13; // change the bar property of the foo prototype
     alert(obj.bar); // ==> 13
     alert(obj.hasOwnProperty(bar)); // ==> false
     foo.prototype={bar:3}; // replace the foo prototype with another object
     alert(obj.bar); // ==> 13
     alert(obj.hasOwnProperty(bar)); // ==> false

When an instance is created, it's internal [[prototype]] property is
set to the value of the constructor's "prototype" property. When a
member is looked up, if it is not found on the object, it will be
looked up on the object contained in the internal [[prototype]]
prototype.

You could also look at a discussion from JavaScript_Official list not long ago:
<uri:http://www.archivesat.com/JavaScript_Official/thread2269357.htm>
--
David "liorean" Andersson

#21035 From: "upand_at_them" <upand_at_them@...>
Date: Fri Jan 19, 2007 9:37 pm
Subject: Re: Using prototype
upand_at_them
Offline Offline
Send Email Send Email
 
#21034 From: "Dan G. Switzer, II" <dswitzer@...>
Date: Fri Jan 19, 2007 8:17 pm
Subject: RE: Using prototype
dswitzer2
Offline Offline
Send Email Send Email
 
Mike,

>I've been reading about the prototype object, but I don't understand
>the difference between that that regular way of adding
>properties/methods.
>
>What's the difference between these two?...
>
>function foo() {
>this.bar = 42;
>}
>
>function foo() {
>}
>foo.prototype.bar = 42;

The "prototype" method make the property available to all "foo"
objects--even existing objects, so it's useful if you ever need to add to
existing objects (for example, you've written some code to extend a JS
object.)

There's also some differences in the way the browser manages the object. If
memory serves me correctly, memory is only allocated for the
"foo.prototype.bar" for the base object (unless overwritten,) where in the
"this.bar" method memory is allotted for each unique instance. This can be
good or bad depending on your code. I normally only using the "prototype"
method when actually defining methods for my objects.

-Dan

#21033 From: "upand_at_them" <upand_at_them@...>
Date: Fri Jan 19, 2007 7:18 pm
Subject: Using prototype
upand_at_them
Offline Offline
Send Email Send Email
 
I've been reading about the prototype object, but I don't understand
the difference between that that regular way of adding
properties/methods.

What's the difference between these two?...

function foo() {
this.bar = 42;
}

function foo() {
}
foo.prototype.bar = 42;

-Mike

Messages 21033 - 21062 of 21091   Newest  |  < Newer  |  Older >  |  Oldest
Advanced
Add to My Yahoo!      XML What's This?

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help