chakrika
asked on
file upload attachment
Hi,
I've a file upload button in one of my web forms. I attach any document by clicking the browse in the web form.
then I click on submit which submits the doc . It has the following code
if (confirm('Press OK to Save & Process this request')) {
document.forms["Content"]. submit();
}
I click OK, Now all the stuff is saved successfully. but i do not see the attachment in the bottom when I open the doc in lotus notes or web.
what could be possibly wrong?
thanks
I've a file upload button in one of my web forms. I attach any document by clicking the browse in the web form.
then I click on submit which submits the doc . It has the following code
if (confirm('Press OK to Save & Process this request')) {
document.forms["Content"].
}
I click OK, Now all the stuff is saved successfully. but i do not see the attachment in the bottom when I open the doc in lotus notes or web.
what could be possibly wrong?
thanks
ASKER
I checked the code in webquery save agent. its a simple agent that sends email with some values sourced from this form.
I created a simple form, and in the between the <form> </form> tags i created one File upload control.
still it dosen't work. I click browse and point the file and it puts the path in there.
i click on submit and then later when i open the doc in the view in notes the attachment is not there.
first of all i'm not sure if the attachment is getting posted as well.
I created a simple form, and in the between the <form> </form> tags i created one File upload control.
still it dosen't work. I click browse and point the file and it puts the path in there.
i click on submit and then later when i open the doc in the view in notes the attachment is not there.
first of all i'm not sure if the attachment is getting posted as well.
WHen you do a submit, what do u give document.forms[0].submit() ? if yes then your file upload control may not be in that form tag itself
Try this first of all figure out through view source whetehr your file upload control comes in which form tag and then give the submit appropriately
i.e document.forms[<yourformna me>].submi t()
partha
Try this first of all figure out through view source whetehr your file upload control comes in which form tag and then give the submit appropriately
i.e document.forms[<yourformna
partha
ASKER
if i remove all the html in the form and just have this file load then it is posting the attachment.
otherwise it is not.. something wrong with the post.
otherwise it is not.. something wrong with the post.
no the problem is what is sent back to the server as a result of post operation. You have added your own form tag, and when you submit you might be doing a document.forms[0].submit, this doesn't do a post operation of 'your' form tag and if the file upload control falls on this form tag, then it will not be posted
Hope i am clear
partha
Hope i am clear
partha
ASKER
I have the following when I submit.
if (confirm('Press OK to Save & Process this request'))
{
document.forms["MainConten t"].submit ();
}
The file upload control is between the <form> </form> tags.
if (confirm('Press OK to Save & Process this request'))
{
document.forms["MainConten
}
The file upload control is between the <form> </form> tags.
is the fileupload control between the form tag Maincontent, if yes then it will be posted along with the other data to the server otherwise no
partha
partha
ASKER
to be more specific.
the file upload is in between the following code:
<FORM METHOD=POST ACTION="" NAME="MainContent">
<INPUT TYPE=hidden NAME="__Click" VALUE="0">
<BR>
FILE UPLOAD CONTROL IS HERE
submit button is here.
the file upload is in between the following code:
<FORM METHOD=POST ACTION="" NAME="MainContent">
<INPUT TYPE=hidden NAME="__Click" VALUE="0">
<BR>
FILE UPLOAD CONTROL IS HERE
submit button is here.
see the view source and see how many form tags are there.. I seriously doubt there iwll be one more form tag in the middle
Partha
Partha
ASKER
there are no other form tags other then these the one for MainContent.
Can u paste the view source if it is not too much
partha
partha
ASKER
wow.. its real big partha. it won't fit here.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
If you just have one HTML form tag in your domino form try the following
document.forms[1].submit()
document.forms[1].submit()
Hey
THx for the points, but what was the problem?
partha
THx for the points, but what was the problem?
partha
partha