Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

JavaScript Forum


You are currently viewing our JavaScript Forum as a guest. Please register to participate.
Login



Reply
Setting form field in Javascript
Old 01-25-2007, 09:51 PM Setting form field in Javascript
Junior Talker

Posts: 3
Trades: 0
Hi there!
I am using javascript with asp. I have a form field and onclick, I call the javascript and pass 1) a table name 2) form field name 3) value.
I am able to receive the values correctly in the javascript function. Now I want to be able to set the value of the form field in the javascript function...Only thing is I am using the same function for abt 10 form fields...so I will have a loop, which works fine too. Problem is to get the fld name suplied to the function and be able to use it...code is as follows...
<script language="JavaScript1.2"><!--
function Func(tbl, fld, val)
{
//alert(tbl);
//alert(fld);
//alert(val);

document.Hiddenform.fld<%=x%>.value=val;

}
// --></script>
The fld in red is not getting the field name and instead just displays fld....i know its simple...something like +fld+ or soemthing....but i cant seem to get it...Any clues???
Thanks in Advance!!!
terp_in_umcp is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Reply     « Reply to Setting form field in Javascript
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.11304 seconds with 12 queries