codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:
Search Forums:
  display value to textbox - assigned by a js function  tllcll at 08:02 on Friday, August 26, 2005
 

Hi,
I would like to know how to display the value to textbox 'po_um' which assigned from poLnChk() function. I manage to get the var d_po_um displayed in the alert box as 'document.all.po_um1.value = 'UT' for row 1, the alert message also show 'document.all.po_um2.value = 'UT' for row 2 - which both are correct. But I can't get the value display in the text box of 'po_um'.

I have tried the following statement but give object null:
document.all.po_um(poLnCnt).value = '<%=j_po_um%>';

what is the syntax to assign the value to document.all.po_um(javascript variable/value).value? the above doesnt work. I have tried putting d_po_um only also doesnt work

Pls help

script
====
function poLnChk(obj, poLnCnt, po_num){
d_po_um = "document.all.po_um" +eval(poLnCnt) +".value = " +"'<%=j_po_um%>'";
alert (" ppppp " +d_po_um );
//document.all.po_um(poLnCnt)].value = '<%=j_po_um%>';
//document.all.po_um[poLnCnt].value = '<%=j_po_um%>';
//d_po_um
}

<html>
<%
int i;
for (i=1;i<=15;i++) {%>
<tr>

<td>
<input type="text" name="po_ln<%=i%>" style="width:100%;text-align:right;" onChange="poLnChk(this,<%=i%>, po_num<%=i%>)">
</td>
<td>
<input type="text" name="po_um<%=i%>" style="width:100%" disabled>
</td>
</tr>
</html>












CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums








Recent Forum Threads
•  Why Use Method?
•  Re: Help with filesystem object & displaying in a table
•  Re: Genetic Algorithm Help
•  Re: How to make an investment calculator
•  Re: line breaks in GUI
•  Re: Graph in Gui...
•  Graph in Gui...
•  Re: Counting zero values in a string
•  Re: Help!


Recent Articles
Multiple submit buttons with form validation
Understanding Hibernate ORM for Java/J2EE
HTTP screen-scraping and caching
a javascript calculator
A simple way to JTable
Java Native Interface (JNI)
Parsing Dynamic Layouts
MagicGrid
Caching With ASP.Net
Creating CSS Buttons


Site Survey
Help us serve you better. Take a five minute survey. Click here!

© Copyright codetoad.com 2001-2005