Avatar of Craig Lambie
Craig LambieFlag for Australia

asked on 

JS function updating className then stopping, no error?

Hi Experts,

I have a JS function that updates the className of a cell in a Table.

My issue is that if there is a k value it hits the alert 'k start' but then doesn't hit the 'k done' alert.
It seems to stop at the first alert?

Ideas??

Thanks in advance
function changeIframe(strCode,j) {
var tbl
var k
 
 
	tbl = document.getElementById("tblData");
	
	alert(j);
	document.iframe_BankExceptions.location.href = 'LimitBankExceptions.asp?strCode=' + strCode;
	
	//Change Color of Row
	k = document.frmRowID.LastRowID.value;
	alert(k);
	
	if (k != '0') {
		alert('k start');
		tbl.rows(k).cells(9).className = 'BONDS';
		alert('k done');
	}//end if
	
	tbl.rows(j).cells(9).className = 'BONDSLite';
	
	
	document.frmRowID.LastRowID.value = j;
	
	alert(document.frmRowID.LastRowID.value); //= j
	
} //End changeIframe

Open in new window

Web Languages and StandardsAJAXJavaScript

Avatar of undefined
Last Comment
Craig Lambie
ASKER CERTIFIED SOLUTION
Avatar of Morcalavin
Morcalavin
Flag of United States of America image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of Craig Lambie
Craig Lambie
Flag of Australia image

ASKER

Fast and correct!!
Perfect!
Thanks!!
JavaScript
JavaScript

JavaScript is a dynamic, object-based language commonly used for client-side scripting in web browsers. Recently, server side JavaScript frameworks have also emerged. JavaScript runs on nearly every operating system and in almost every mainstream web browser.

127K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo