WebProWorld Part of WebProNews.com
Page One Link To Us Edit Profile Private Messages Archives FAQ RSS Feeds  
 

Go Back   WebProWorld > Webmaster, IT and Security Discussion > Web Programming Discussion Forum
Subscribe to the Newsletter FREE!


Register FAQ Members List Calendar Arcade Chatbox Mark Forums Read

Web Programming Discussion Forum Working with an API? Developing a plugin? Writing a Mod or script for your favorite blog, Web 2.0 site or Forum? Welcome.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-10-2005, 04:42 PM
WebProWorld Member
 

Join Date: Jul 2003
Location: Fairview, NC
Posts: 87
twopooches RepRank 0
Default Javascript form calculation error

I would very much appreciate feedback on this problem.

the error can be found at
http://twopooches.com/cost.htm
'checked' is null or not an object...

I only get this on IE. On NE and FF it works fine... even works in IE when testing locally.

When I installed a couple of days ago it worked fine.
Problem occurs when you click calculate.

I even tried changing a few things and it still did not work on IE, online

This one is driving me nuts...
__________________
Website consulting and design for...
small business, home based companies, personal or hobby websites
http://twopooches.com/
Reply With Quote
  #2 (permalink)  
Old 02-13-2005, 10:44 PM
WebProWorld New Member
 

Join Date: Feb 2005
Posts: 1
shoshanaz RepRank 0
Default Re: Javascript form calculation error

I think you are trying to use "checked" on an option list, and the property should be "selected" as below:

function KW_getVal(o){ //v1.2
var retVal="0";if (o.type=="select-one")
{retVal=(o.selectedIndex==-1)?0:o.options[o.selectedIndex].value;}
else if (o.length>1){for (var i=0;i<o.length;i++) if (o[i].selected) retVal=o[i].value;
} else if (o.type=="checkbox") {retVal=(o.checked)?o.value:0;} else {
retVal=Number(o.value)}return parseFloat(retVal);
}
Reply With Quote
Reply

  WebProWorld > Webmaster, IT and Security Discussion > Web Programming Discussion Forum
Tags: , , ,



Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Search Engine Optimization by vBSEO 3.2.0