Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

variable in form change 1

Status
Not open for further replies.

werD420

Technical User
Sep 14, 2004
181
US
how would i do the below im trying to pass which form element it will be called through asp
<script language="JavaScript" type="text/javascript">
<!--
function getFName(browse, attach)
{
var path;
var pos;
var filename;
var jar;
path = browse;
pos=path.lastIndexOf("\\");
filename = path.substring(pos+1);
alert(filename)

jar="attach1"
document.frmSend.+jar+.value=filename;

}

//-->
</script>

<% ASP Web App Development %>
 
Try this:
Code:
document.forms['frmSend'].elements[jar].value=filename;

Lee
 
I see thanks alot

<% ASP Web App Development %>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top