Hello,
I have a javascript grid on my ASP page which displays information about the history of specific units produced in our manufacturing facility. One of the results is the order number on which the unit was shipped. If the unit was not shipped, obviously there is no order number; the default value of this field on the data table is 0.
Herein lies the problem; if the order number is 0, I do not want the grid to display...
User Profile
Collapse
-
mdock started a topic using a vbscript function to feed a hyperlink into a javascript grid on an ASP pagein ASP Classicusing a vbscript function to feed a hyperlink into a javascript grid on an ASP page
-
Well, where it is performing this function is in a grid, and here is the code which produces that column of the grid:
Code:Grid1.colAttributes[4] = ' align=center'; Grid1.colFormat[4] = '<Font Size=2 Face="Arial" Color=Black >'; Grid1.colData[4] = 'dspchk(rsProduction.fields.getValue(\'QDispersion\'),rsProduction.fields.getValue(\'dispersion_lower\'),rsProduction.fields.getValue(\'dispersion_upper\'))';
-
-
The line it is referring to is in the file scriptlibrary/datagrid.asp which says it is copyrighted by Microsoft. (In other words, I didn't write it.) And line 403 is this:
[size=1]strHTML [/size][size=1][color=#0000ff]+= [/color][/size][size=1]eval([/size][size=1][color=#840084]this[/color][/size][size=1].colData[nCol]);
[/size]Leave a comment:
-
Here is another thing I have tried. I read somewhere that if one of the commands executed by an if/then/else statement is "end function," there will be problems because it never reads the "end if" and so the statement is not closed properly. Or something like that! So I tried this:
Code:function dspchk(QDispersion,dispersion_lower,dispersion_upper) if (isNull(QDispersion) or rtrim(QDispersion)="" or QDispersion="0")
Leave a comment:
-
I have also tried doing it this way:
Code:function dspchk(QDispersion,dispersion_lower,dispersion_upper) if QDispersion>0 then QD=cint(QDispersion) else dspchk=QDispersion exit function end if if (isNull(dispersion_lower) or rtrim(dispersion_lower)="") then DL=0 else DL=cint(dispersion_lower) end if if (isNull(dispersion_upper) or rtrim(dispersion_upper)=""
Leave a comment:
-
Oh and by the way, that space in the word "upper" in line 1 isn't really there, it just showed up that way in the post for some reason.
Thanks!Leave a comment:
-
But, Jared, the error has changed. It is now:
[HTML]
Microsoft JScript runtime error '800a138f'
Object expected
/_ScriptLibrary/DataGrid.ASP, line 403
[/HTML]Leave a comment:
-
Jared,
Thanks so much for your reply. I reformatted the code to match the format you suggested, but I am still getting the error.
Just for the record, my code now looks like this:
Code:function dspchk(QDispersion,dispersion_lower, dispersion_upper) if QDispersion>0 then QD=cint(QDispersion) if (isNull(dispersion_lower) or rtrim(dispersion_lower)="") then DL=0 else
Leave a comment:
-
[font=Verdana][size=2]OK, well, maybe not. I'm going to try one more time:[/size][/font]
[font=Verdana][/font]
<FONT face=Verdana size=2>[HTML]
Microsoft VBScript compilation error '800a03f6'
Expected 'End'
/BatchReportCRIn fo2.asp, line 319 else DL=cint(dispers ion_lower)^[/HTML]Leave a comment:
-
Sorry, I forgot the HTML tags around the error. Here it is:
[HTML]
<font face="Arial" size=2>
<p>Microsoft VBScript compilation </font> <font face="Arial" size=2>error '800a03f6'</font>
<p>
<font face="Arial" size=2>Expected 'End'</font>
<p>
<font face="Arial" size=2>/BatchReportCRIn fo2.asp</font><font...Leave a comment:
-
VBScript compilation error '800a03f6' expected end
Hello everyone,
I am attempting to add a function to an existing ASP page. The default script of the page is VBScript. The page is returning the following error:
Microsoft VBScript compilation [font=Arial][size=2]error '800a03f6'[/size][/font][font=Times New Roman][size=3] [/size][/font]
[font=Arial][size=2]Expected 'End'[/size][/font]
[font=Arial][size=2]/BatchReportCRIn fo2.asp[/size][/font][font=Arial][size=2],...
No activity results to display
Show More
Leave a comment: