Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

function properties

Status
Not open for further replies.

aadam

Technical User
Sep 29, 2006
11
0
0
CA
the javaconsole is telling me that ss has no properties. i've searched the web but have not found the correct code or don't understand it to correct my error. i think i need an "either " "or" statement or something like that. in the html i have two fields that are named member and one value has "Yes" the other a value of "no". here's my function code
> }
> function NoneWithCheck(ss) {
> if(ss.length > 0) { return false; }
> return true;
> }
> so if you have time or the inclination i would be appreciative of some help.
>
 
if i knew exactly what u meant i'd answer. but if this is what u mean; cause i'm new to javascript just a beginner really i'll copy what i have above the code i've alredy listed.
if(NoneWithCheck(document.adedformjs.member.value))
{ errormessage += "\n\nPlease check one of the boxes..Yes or No"; }
i hope this helps u help me thanks dan for your swift reply.
eric
 
Do you have a form named "adedformjs" and a field in that named "member"? Also, where is that "if" statement called from?

If you're unsure, post your HTML & JS, or a URL to it.

Dan



Coedit Limited - Delivering standards compliant, accessible web solutions

[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
i'd have to do a lot of copying and pasting so here's the url
i do have a form called adedformjs and two fields named member .
the if statement is to check required fields in the form action code.
thanks for your interest,
Eric
 
It looks like the "NoneWithCheck" function expects a radio group, not a value... so change this:

Code:
if(NoneWithCheck(document.adedformjs.member.value))

to this:

Code:
if(NoneWithCheck(document.adedformjs.member))

Hope this helps,
Dan




Coedit Limited - Delivering standards compliant, accessible web solutions

[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
thanks dan,
its working better in that i get a pop up with the missing fields noted except for the member field. and also i get part of the code in the pop up . namely, and its my fault i guess its a quotation mark or something but here's what it says in the pop up... your first name is required"firstname ext field" it has that for all the fields with the appropriate error message. the t for text is missing in the pop up its not a typo.
but the member (radio button) field isn't "returned" as an error if its not checked.
thanks we're ..you're zeroing in on my ineptitude.
Eric
 
i got rid of the quotation marks. it seems i added the field name and type of field namely text .to the error message. i'm going to watch ncis and call it a night. i have some phoning to do for my volunteer work to do tonight as well.
 
i've added these lines to line 117 in the code:
function NoneWithCheck(ss) {
if(ss.length > 0;} i <ss.length; i++} {
if{ss.value.length { return false; }
}
it seems i get an error for line 117 that i'm missing a bracket [mad]? not sure if its right or what to do.
 
You have a missing for, curly braces instead of parentheses, missing curly braces, and missing parentheses. Time to get some sleep and tackle it when you're awake?

Lee
 
it works now.
thsnks Dan and trollacious.
this site is awesome.you guys are great. many thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top