472,378 Members | 1,443 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,378 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 1129

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
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific technical details, Gmail likely implements measures...
0
Oralloy
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the synthesis of my design into a bitstream, not the C++...
0
by: Carina712 | last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand. Background colors can be used to highlight important...
0
by: Rahul1995seven | last post by:
Introduction: In the realm of programming languages, Python has emerged as a powerhouse. With its simplicity, versatility, and robustness, Python has gained popularity among beginners and experts...
2
by: Ricardo de Mila | last post by:
Dear people, good afternoon... I have a form in msAccess with lots of controls and a specific routine must be triggered if the mouse_down event happens in any control. Than I need to discover what...
1
by: Johno34 | last post by:
I have this click event on my form. It speaks to a Datasheet Subform Private Sub Command260_Click() Dim r As DAO.Recordset Set r = Form_frmABCD.Form.RecordsetClone r.MoveFirst Do If...
1
by: ezappsrUS | last post by:
Hi, I wonder if someone knows where I am going wrong below. I have a continuous form and two labels where only one would be visible depending on the checkbox being checked or not. Below is the...
0
by: jack2019x | last post by:
hello, Is there code or static lib for hook swapchain present? I wanna hook dxgi swapchain present for dx11 and dx9.
0
DizelArs
by: DizelArs | last post by:
Hi all) Faced with a problem, element.click() event doesn't work in Safari browser. Tried various tricks like emulating touch event through a function: let clickEvent = new Event('click', {...

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.