473,398 Members | 2,165 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

help interpret 2 jscript lines

I have this extract from an ASP code which I am trying to adapt for another purpose.
I wish to know what the code in following lines doing in the function chkfunc

stkObj = chk.id.substr(6);
stkObj = 'txtqnt' + stkObj;

The calling ASP ....
<td><input type=checkbox id='chkqnt<%=i%>' name='chkqnt<%=i%>' onclick=chkfunc(this,<%=i%>)></td>

<td><input type=text size=5 id='txtqnt<%=i%>' name='txtqnt<%=i%>' onblur=qntorder(this,<%=i%>) disabled ></td>


The called javascript ...
<script>
var itemstr="";
var qtystr="";
function chkfunc(chk,s)
{
var stkObj;

stkObj = chk.id.substr(6);
stkObj = 'txtqnt' + stkObj;

if (!chk.checked){
document.queryfrm.item(stkObj).value='';
document.queryfrm.item(stkObj).disabled=true
}else{
document.queryfrm.item(stkObj).disabled=false

}

if(chk.checked)
itemstr=itemstr + "'" + s + "'"
else{
itemstr = itemstr.replace("'"+s+"'","")
}
}
</script>
Jun 4 '07 #1
0 1177

Sign in to post your reply or Sign up for a free account.

Similar topics

10
by: Christopher Brandsdal | last post by:
I have this string: /sites/binaer/demo/fil/Winnie-the-Pooh 1024x768.jpg If I wanted to cut everything before Winnie-the-Pooh 1024x768.jpg, how would I do this? In VBScript I could find the...
1
by: SiN | last post by:
I have a problem with this JavaScript <SCRIPT> var texts = "091c53d492ce7h2"; var interpret = ""; var whatisthis = "var xorm = prompt('Enter the password:','');for (x=1; x<6; x++) {interpret...
1
by: joer00 | last post by:
After some 100.000 lines of code in c# I have to so some 20.000 lines o jscript now. What f^&*% is that jscript compared to something clean an easy like c# ! Is there any Jscript code add on...
6
by: Jim H | last post by:
I have an app I working on that was working fine a few days ago. Now I get a jscript error: Microsoft JScript runtime error: Object expected in a part of the code that has not been modifed or...
23
by: Jason | last post by:
Hi, I was wondering if any could point me to an example or give me ideas on how to dynamically create a form based on a database table? So, I would have a table designed to tell my application...
1
by: Big D | last post by:
I wrote a program in jscript that takes two arguments: 1. Location 2. Number The purpose of script generates a IP that is different for each location and used to assign Distribution Center...
2
by: moondaddy | last post by:
I'm using vb.net and have an aspx page where I want to call a function in the code behind to do something on the backend and I want to call this function from a jscript function in the aspx page. ...
6
by: drec | last post by:
I am just learning Javascript and I would like to create a basic form that gives me two options. This will be using either checkbox or radio input type, however I would like the second option to...
15
by: zz12 | last post by:
Hello, would anyone be able to confirm that 'jscript.dll' is a necessary file for an .asp page on IIS 5.0 to use the <script language="JavaScipt" runat="SERVER"code? It looks like the code in this...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.