okay, sorry I understand now. I thought you would have just had one link that swapped the divs. I didn't realise you had a different link for each.
You could change the function like this
- Code: Select all
function toggleProceed(fields, proceedLink)
{
// Loop through the array of id's to check
for (i = 0; i < fields.length; i++)
if (document.getElementById(fields[i]).value == "")
{ // if no value, the reset link to hidden and exit from function
document.getElementById(proceedLink).style.visibility = 'hidden';
return;
}
// If we made it here we can show the link
document.getElementById(proceedLink).style.visibility = 'visible';
}
Now when you call the function use onkeyup="toggleProceed(new Array('id'), 'idofproceedlink')"
I hope that's what you mean.
Cheers