thank you. i sure did learn quite a bit. i really like your code, it's a lot easier to read - very efficient. i've always been weak at creating codes as such. i will eventually get what i want, but most likely it's not as clean and not as efficient as others' solution.
got it.
here's how the js link is setup:
<a href="javascript:lnkChkNQ('#Trim(appDetail[Counter][10])#','appReqLine')">#Trim(appDetail[Counter][10])#</a>
and here's the final js code:
// JavaScript Document
var cond = 0;
function lnkChk(tdid,frmname) {
frmobj = document.forms[frmname]...
here's the finished code. now i just to duplicate it for each of the appstatus values... unless that too can be "variable-ize"?
var cond = 0;
function lnkChkNQ(tdid,frmname) {
frmobj = document.forms[frmname];
elmlen=frmobj.length;
var appIndex = 1;
var elemID =...
okay...
this code works on selecting all records with appstatus of NQ -
var cond = 0;
function lnkChkNQ(tdid,frmname) {
frmobj = document.forms[frmname];
elmlen=frmobj.length;
var appIndex = 1;
var elemID = 'applicantID';
for(i=0;i<elmlen;i++) {...
yea, I didn't know what the indexOf does.
here's the page source.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><script type="text/javascript"...
Lee,
I modified the input and added id="applicantID_#Counter#" - that's why I'm using getElementById.
however, I did make the loop change. The loop processed, but it never gave me any element name missing.
okay...
this one will select all the "NQ" lines. but will not deselect.
var cond = 0;
function lnkChkNQ(tdid,frmname) {
frmobj = document.forms[frmname];
elmlen=frmobj.length
for(i=1;i<elmlen;i++) {
var appID = 'applicantID_' + i;
var getApplicantID =...
i'm trying now to pull the value of applicantID - but I'm getting object required.
for(i=1;i<elmlen;i++) {
var prefix = 'appStatus_' + i;
var appName = document.getElementById(prefix).name;
var appValue = document.getElementById(prefix).value...
for(i=1;i<elmlen;i++) {
var prefix = 'appStatus_' + i;
var appName = document.getElementById(prefix).name;
var appstatvalue = hiddenvalue.replace(appName, '');
alert("the value is " + appstatvalue);
} //end for
"hiddenvalue" undefine?
also, I never expected anyone to write it for me. if there was one already written, great! otherwise, I've always been willing to put forth the effort - but I needed some sort of direction - your 'pseudocode' had me started.
I wouldn't even know where to start and what you mean by "server-side scripting" much less starting a javascript program. "
true, the word beginner isn't in that sentence - but i thought anyone reading that would understand.
but I get your point, kath.
nevermind. i forgot i commented the line to call the script. but when I click the link to run the script, nothing happens. no alerts, but no errors either.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.