cww2
05-07-2008, 12:49 AM
Hi - I've tried passing this hundreds of different ways without effect. In a nutshell, I have an HTML page that is generated dynamically from db and has form elements with the same name plus the numeric ID from the db tacked on the end to make the form elements individual.
With JS, I've been able to determine which form elements need to be processed. Where I'm falling short is when I try to validate those form elements, my code breaks down:
function addrsvp(str)
{
var event_id = +str;
if (Record_Validator(''+event_id+'') == true)
{
document.frm.action = "?action=addrsvp&id="+event_id
document.frm.method = "post"
document.frm.submit()
}
}
// This part works fine - with the Record_Validator, just using the alert box, I've verified "ev_id" is being passed correctly. Where it breaks down is the if statement adding the ev_id to the end of "first" - tried everything I could find:
function Record_Validator(strg)
{
var ev_id = +strg
if (document.frm.first+ev_id+.value == "")
{
alert(''+ev_id+'');
return (false);
}
return true;
}
Any suggestions will be tremendously appreciated.
Chase
With JS, I've been able to determine which form elements need to be processed. Where I'm falling short is when I try to validate those form elements, my code breaks down:
function addrsvp(str)
{
var event_id = +str;
if (Record_Validator(''+event_id+'') == true)
{
document.frm.action = "?action=addrsvp&id="+event_id
document.frm.method = "post"
document.frm.submit()
}
}
// This part works fine - with the Record_Validator, just using the alert box, I've verified "ev_id" is being passed correctly. Where it breaks down is the if statement adding the ev_id to the end of "first" - tried everything I could find:
function Record_Validator(strg)
{
var ev_id = +strg
if (document.frm.first+ev_id+.value == "")
{
alert(''+ev_id+'');
return (false);
}
return true;
}
Any suggestions will be tremendously appreciated.
Chase