|
it
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Passing File names between different files!!!
I have a form called which collects user data in a form in 'default.asp'. It has a link for a file 'upload.asp' where user can browse files from his local system. When the user clicks on ATTACH button, the file gets uploaded to the server in upload_response.asp. I am using AspUpload component to upload files. The user then fills some other details on the form. After the user is finished entering details, he clicks on submit. Then default_response.asp collects all the details from default.asp and emails all the details to one email id. Now the problem is: I have the file name which gets uploaded to the server in upload_response.asp. I want that file name to get stored in some variable in default.asp so that i can take that variable's value in default_response.asp, so that i can attach that file which the user has uploaded with the email which is being sent. I am not able to get the variable's value from upload_response.asp to default.asp Please help..... riteshjai***@gmail.com wrote:
Show quote > Let me explain my problem: Please don't multipost.> > I have a form called which collects user data in a form in > 'default.asp'. It has a link for a file 'upload.asp' where user can > browse files from his local system. When the user clicks on ATTACH > button, the file gets uploaded to the server in upload_response.asp. I > am using AspUpload component to upload files. The user then fills some > other details on the form. > After the user is finished entering details, he clicks on submit. Then > default_response.asp collects all the details from default.asp and > emails all the details to one email id. Now the problem is: > > I have the file name which gets uploaded to the server in > upload_response.asp. I want that file name to get stored in some > variable in default.asp so that i can take that variable's value in > default_response.asp, so that i can attach that file which the user has > uploaded with the email which is being sent. I am not able to get the > variable's value from upload_response.asp to default.asp > > Please help..... This question was answered 5 days ago in comp.lang.javascript. But you obviously haven't checked there to see if anyone was prepared to go to the trouble of replying to your post. -- Mike Brind See,
My problem was not understood well there...and i thought that i posted the question in the wrong group. thats why i posted it here. Please let me know if you have a solution for the above problem. also, last time i felt that i didnt explain the problem properly. This time i tried to be clear.... Please help me.... riteshjai***@gmail.com wrote:
Mike Brind wrote: Show quote > riteshjai***@gmail.com wrote: X-posted to comp.language.javascript> > > Let me explain my problem: > > > > > > I have a form called which collects user data in a form in > > > 'default.asp'. It has a link for a file 'upload.asp' where user can > > > browse files from his local system. When the user clicks on ATTACH > > > button, the file gets uploaded to the server in upload_response.asp. I > > > am using AspUpload component to upload files. The user then fills some > > > other details on the form. > > > After the user is finished entering details, he clicks on submit. Then > > > default_response.asp collects all the details from default.asp and > > > emails all the details to one email id. Now the problem is: > > > > > > I have the file name which gets uploaded to the server in > > > upload_response.asp. I want that file name to get stored in some > > > variable in default.asp so that i can take that variable's value in > > > default_response.asp, so that i can attach that file which the user has > > > uploaded with the email which is being sent. I am not able to get the > > > variable's value from upload_response.asp to default.asp > > > > > > Please help..... > > > > Please don't multipost. > > > > This question was answered 5 days ago in comp.lang.javascript. > > > But you obviously haven't checked there to see if anyone was prepared > > to go to the trouble of replying to your post. > > > > -- > > Mike Brind > See, > My problem was not understood well there...and i thought that i posted > the question in the wrong group. thats why i posted it here. Please let > me know if you have a solution for the above problem. also, last time i > felt that i didnt explain the problem properly. This time i tried to be > clear.... > > Please help me.... I see you have checked now. The answer that was provided is this: Store the file name in the Session object, which is accessable by all asp pages which the user calls up in a session. Although comp.language.javascript is indeed the wrong group to post to, that answer still shows a perfect understanding of your problem from one of their contributors, because it is the correct answer. http://www.w3schools.com/asp/asp_sessions.asp -- Mike Brind But what if the user has disabled the cookies on his system?? Then what
choice do i have?? riteshjai***@gmail.com wrote:
> But what if the user has disabled the cookies on his system?? Then what What are you talking about? I haven't said anything about cookies. The> choice do i have?? link I gave you explains how to use the Session object to store information. The Session object and cookies are two completely different things. And please, when you reply in google groups, do not use the Reply link at the end of the post. It wipes out what you are replying to. Click the Show options link next to the poster's name and use the reply link there. -- Mike Brind Mike Brind wrote:
> riteshjai***@gmail.com wrote: Actually, Mike, sessions do depend on cookies. The session id is stored in a >> But what if the user has disabled the cookies on his system?? Then >> what choice do i have?? > > What are you talking about? I haven't said anything about cookies. cookie on the user's machine. No cookies = no sessions. -- Microsoft MVP - ASP/ASP.NET Please reply to the newsgroup. This email account is my spam trap so I don't check it very often. If you must reply off-line, then remove the "NO SPAM" Bob Barrows [MVP] wrote:
> Of course they do. What on earth was I thinking of??!?> Actually, Mike, sessions do depend on cookies. The session id is stored in a > cookie on the user's machine. No cookies = no sessions. > riteshjai***@gmail.com said the following on 3/12/2006 2:39 AM:
> But what if the user has disabled the cookies on his system?? Then what Probably the same choice as you have if they have javascript disabled.> choice do i have?? How did this thread get in comp.lang.javascript though? -- Randy comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/ Removing the OT group from the crosspost.
riteshjai***@gmail.com wrote: > But what if the user has disabled the cookies on his system?? Then Please quote the message to which you are replying.> what choice do i have?? Show quote > I have a form called which collects user data in a form in Without sessions or cookies, all that is left is> 'default.asp'. It has a link for a file 'upload.asp' where user can > browse files from his local system. When the user clicks on ATTACH > button, the file gets uploaded to the server in upload_response.asp. I > am using AspUpload component to upload files. The user then fills some > other details on the form. > After the user is finished entering details, he clicks on submit. Then > default_response.asp collects all the details from default.asp and > emails all the details to one email id. Now the problem is: > > I have the file name which gets uploaded to the server in > upload_response.asp. I want that file name to get stored in some > variable in default.asp so that i can take that variable's value in > default_response.asp, so that i can attach that file which the user > has uploaded with the email which is being sent. I am not able to get > the variable's value from upload_response.asp to default.asp A. Application variable B. Text file on the server C. Database Pick your alternative. Bob Barrows -- Microsoft MVP - ASP/ASP.NET Please reply to the newsgroup. This email account is my spam trap so I don't check it very often. If you must reply off-line, then remove the "NO SPAM" "
> Without sessions or cookies, all that is left is "> A. Application variable > B. Text file on the server > C. Database > > Pick your alternative. You mentioned about the text file on the server. Can you please elaborate on this?? How can i make use of this?? as far as i understood, you are trying to say that i should maintain one text file on the server. Then i can write the file name on that text file and then pick the file name from that text file to attach it with the mail. Is this what you are trying to say?? People, I am new to this Google groups and dont know how to use it effectively. Please dont mind if i do something wrong. Also i am a fresher in a job, so dont know too much about all these technical stuff. Please dont mind if sometime i posta foolish question. riteshjai***@gmail.com wrote:
[snip] > as far as i understood, you are trying to say that i should maintain I believe that is precisely the suggestion. You are effectively using> one text file on the server. Then i can write the file name on that > text file and then pick the file name from that text file to attach it > with the mail. Is this what you are trying to say?? [/snip] a flat text file as a temporary data store. You will need to use something like the ActiveX "Scripting.FileSystemObject" to create, access, write to and save the file. Further lines of research on this option are:- - Scripting.FileSystemObject - Server.CreateObject("Scriping.FileSystemObject") - to create an instance - Server.MapPath - to ensure that the correct file path is given - Ensuring that your server directories have appropriate read/write permissions (e.g. CHMOD for unix based systems). - Consider the likelihood of simultaneous access to the text file if two separate users want to write to it at the same time. Storing the file name in a database may be a better solution if this is likely to be the case. Regards Julian Turner
Show quote
> I believe that is precisely the suggestion. You are effectively using Thanks very much Bob.> a flat text file as a temporary data store. You will need to use > something like the ActiveX "Scripting.FileSystemObject" to create, > access, write to and save the file. Further lines of research on this > option are:- > > - Scripting.FileSystemObject > - Server.CreateObject("Scriping.FileSystemObject") - to create an > instance > - Server.MapPath - to ensure that the correct file path is given > - Ensuring that your server directories have appropriate read/write > permissions (e.g. CHMOD for unix based systems). > - Consider the likelihood of simultaneous access to the text file if > two separate users want to write to it at the same time. Storing the > file name in a database may be a better solution if this is likely to > be the case. I was able to solve this problem using the suggestion given by you about using the text file. And thanks a lot to all the kind persons who took their time to answer my questions. (sometimes foolish i believe... Show quote :-) ) |
|||||||||||||||||||||||