dcsimg
Using Javascript with ASP
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   c_m
Posted On:   Tuesday, September 16, 2003 11:46 AM

I am trying to access form data using the following code. for(var i = 1;i <= <%Parts%>; i++) for(j=1; j <= <%Machs%>; j++) x = toString(i); y = toString(j); ColRowStr = x + y; if("document.RankOrder.Matrix_"+colRowStr+".value == 1") { break; } This is javascript within an .asp page. I keep getting an vbscript error for "Type mismatch" referring to the test condition i <= <%Parts%>; In addition, I have made several attempts to bulid the string requesting the value from the form using: ("document.RankOrder.Matrix_"   More>>

I am trying to access form data using the following code.

for(var i = 1;i <= <%Parts%>; i++)

for(j=1; j <= <%Machs%>; j++)

x = toString(i);

y = toString(j);

ColRowStr = x + y;

if("document.RankOrder.Matrix_"+colRowStr+".value == 1")

{

break;
}


This is javascript within an .asp page. I keep getting an vbscript error for "Type mismatch" referring to the test condition i <= <%Parts%>;


In addition, I have made several attempts to bulid the string requesting the value from the form using:


("document.RankOrder.Matrix_"+colRowStr+".value == 1")


I have also received type mismatch errors here.


Any help would be greatly appreciated.

   <<Less

Re: Using Javascript with ASP

Posted By:   Anonymous  
Posted On:   Wednesday, September 17, 2003 03:54 AM

The ASP should produce a HTML page containing JavaScript. The ASP is executed on server. The JS is executed on client (browser). So on serverside there doesn´t has to be valid JavaScript.


But without knowing ASP: is <%Parts%> right? In JSP you would write <%=Parts%>.

About | Sitemap | Contact