Client Script debug
I have an editable grid that I'd like to alert on if certain in the grid match a certain value. So on Cell exit I have:
var myItemRow = eworkGetCurrentRow ("grdInstrumentShop");
var strCurrentStatus = eworkGetCell("grdInstrumentShop", 6, myItemRow);
var strtrace = eworkGetCell("grdInstrumentShop", 8, myItemRow);
alert (" trace = " + strtrace + ");
alert ("strCurrentStatus = " + strCurrentStatus + ");
if((strCurrentStatus == "Fab Completed")&&(strtrace is null))
{
alert("Please provide the material trace information");
}
return true;
Nothing ever happens. Even the extra alerts I added for debug don't popup. What am I missing?
Thanks!
Comments
-
I think the "is null" part of your script is not valid in JScript. There are a number of ways to test as far as I can see with a quick google.
Frankly whenver I get into client scripting I feel as though I am working in the dark. Compared to C# it is very awkward to diagnose issues. I know you can trace through code in IE, but I must admit I avoid it so much that I have never tried to get it working, myself.
BTW, there is no need to return anything, and that may cause an issue as well, I have no idea (You have to see the resulting page source to tell).
0 -
You were right - but I also had an error in the extra alert lines I was trying to use for debug. Here's what works:
function fnAlertforTrace()
{
var myItemRow = eworkGetCurrentRow ("grdInstrumentShop");
var strCurrentStatus = eworkGetCell("grdInstrumentShop", 6, myItemRow);
var strtrace = eworkGetCell("grdInstrumentShop", 8, myItemRow);
alert (" trace = " + strtrace );
alert ("strCurrentStatus = " + strCurrentStatus );
if((strCurrentStatus == "Fab Completed")&&(strtrace == ""))
{
alert("Please provide the material trace information");
}
return true;
}Thanks for the help!
0
Categories
- All Categories
- 123 Developer Announcements
- 54 Articles
- 152 General Questions
- 148 Thrust Services
- 57 Developer Hackathon
- 37 Thrust Studio
- 20.6K Analytics
- 4.2K AppWorks
- 9K Extended ECM
- 918 Core Messaging
- 84 Digital Asset Management
- 9.4K Documentum
- 32 eDOCS
- 190 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management
- 10 XM Fax
- Follow Categories