?
Solved

file upload attachment

Posted on 2005-02-28
15
Medium Priority
?
249 Views
Last Modified: 2013-12-18
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
0
Comment
Question by:chakrika
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 8
  • 6
15 Comments
 
LVL 14

Expert Comment

by:p_partha
ID: 13421598
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
 

Author Comment

by:chakrika
ID: 13422157
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
 
LVL 14

Expert Comment

by:p_partha
ID: 13422290
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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:chakrika
ID: 13422323
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
 
LVL 14

Expert Comment

by:p_partha
ID: 13422372
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
 

Author Comment

by:chakrika
ID: 13422495
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
 
LVL 14

Expert Comment

by:p_partha
ID: 13422515
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
 

Author Comment

by:chakrika
ID: 13422533
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
 
LVL 14

Expert Comment

by:p_partha
ID: 13422701
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
 

Author Comment

by:chakrika
ID: 13422830
there are no other form tags other then these the one for MainContent.

0
 
LVL 14

Expert Comment

by:p_partha
ID: 13422867
Can u paste the view source if it is not too much

partha
0
 

Author Comment

by:chakrika
ID: 13422938
wow.. its real big partha. it won't fit here.
0
 
LVL 14

Accepted Solution

by:
p_partha earned 400 total points
ID: 13423712
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
 
LVL 3

Expert Comment

by:sravikiran
ID: 13425508
If you just have one HTML form tag in your domino form try the following

document.forms[1].submit()
0
 
LVL 14

Expert Comment

by:p_partha
ID: 13486452
Hey
THx for the points, but what was the problem?

partha
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

You’ve got a lotus Domino web server, and you have been told that “leverage browser caching” is a must do. This means that we have to tell the browser everywhere in the web to use cache. In other words, we set (and send) an expiration date in the HT…
  In today’s Arena we can’t imagine our lives without Internet as we are highly used to of it. If we consider our life style just for only 2 min we found that face to face communication is swapped by e-communication.  Every Where from Works place to…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question