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
chakrikaAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

p_parthaCommented:
Is there any code in webquerysave removing the attachment. Also check witha new form with just the file upload control and see whether u are able to see the attachment

partha
0
chakrikaAuthor Commented:
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.

0
p_parthaCommented:
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[<yourformname>].submit()

partha
0
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

chakrikaAuthor Commented:
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.

0
p_parthaCommented:
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
0
chakrikaAuthor Commented:
I have the following when I submit.

  if (confirm('Press OK to Save & Process this request'))
     {
       document.forms["MainContent"].submit();
      }  

The file upload control is between the <form>  </form> tags.
0
p_parthaCommented:
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
0
chakrikaAuthor Commented:
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.
0
p_parthaCommented:
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
0
chakrikaAuthor Commented:
there are no other form tags other then these the one for MainContent.

0
p_parthaCommented:
Can u paste the view source if it is not too much

partha
0
chakrikaAuthor Commented:
wow.. its real big partha. it won't fit here.
0
p_parthaCommented:
am running out of ideas, but is there a large junk of text thas' been sent and the server is timing out.. am not sure what other problem it cud be, or is the file too large?

Partha
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
sravikiranCommented:
If you just have one HTML form tag in your domino form try the following

document.forms[1].submit()
0
p_parthaCommented:
Hey
THx for the points, but what was the problem?

partha
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Lotus IBM

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.