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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Passing Value To Another Form Question

Status
Not open for further replies.

FontanaS

Programmer
May 1, 2001
357
US
Hi! I have the following code on one form -
<script type="text/Javascript">
window.opener.document.getElementById('OrderFile1').value = document.frmSend.attach1.value;
</script>

The result is that the OrderFile1 value stays blank and there is no value in it.

The value i am trying to pass is a type"file" asp text box.
(<input name="attach1" type="file" size=50>)
Is this a problem?.

The user selects and uploads a file from their computer and i take that value and pass it to the form on another page.

Do i have to reload the parent web page? I really don't want to becasue then I lose all of the other data on t he form.

THANKS!
 
why is the file select a seperate window? and not on the main form?

"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you.
 
The main form was too complicated and I couldn't get it to work on the main form. When i created its own form it worked fine. Just need to figure out how to get that value,
 
When you use type=file you are actually passing a reference to an object (the file on the device) and not the file itself or any textual value.
To be able to access the object in another page (like an ASP page to perform the upload) you need to address the objects posted and their properties rather than just the plain values.

Do you have code to actually retrieve the file and store it on the server or in a database? You can see from that code how the file object is accessed. I do not know if it is possible to assign the object back to another form field to pass on or not or if you have to either retrieve the file itself or give up on it.



At my age I still learn something new every day, but I forget two others.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top