session variable between two windows

Discussion in 'ASP General' started by Soha, Apr 30, 2005.

  1. Soha

    Soha Guest

    i'm using the dundas freelib upload code to upload files in my website.
    when the user choses to upload a file a new window is opened and the
    upload procedure goes fine and the file is uploaded successfully. but
    the problem is the i want to know the name of the file in the parent
    window to save it in the database. i tried to use a session variable
    which contains the name of the file but it dosen't work.
    the parent window contains a form which is used to insert new data in
    the database so i can't use the upload window to insert the filename in
    the database.
     
    Soha, Apr 30, 2005
    #1
    1. Advertising

  2. Soha

    Evertjan. Guest

    Soha wrote on 30 apr 2005 in microsoft.public.inetserver.asp.general:

    > i'm using the dundas freelib upload code to upload files in my website.
    > when the user choses to upload a file a new window is opened and the
    > upload procedure goes fine and the file is uploaded successfully. but
    > the problem is the i want to know the name of the file in the parent
    > window to save it in the database. i tried to use a session variable
    > which contains the name of the file but it dosen't work.
    > the parent window contains a form which is used to insert new data in
    > the database so i can't use the upload window to insert the filename in
    > the database.


    Use a streaming file for uploading and register the facts in your database
    before the stream start.

    --
    Evertjan.
    The Netherlands.
    (Replace all crosses with dots in my emailaddress)
     
    Evertjan., Apr 30, 2005
    #2
    1. Advertising

  3. Soha

    Evertjan. Guest

    Evertjan. wrote on 30 apr 2005 in
    microsoft.public.inetserver.asp.general:
    > Soha wrote on 30 apr 2005 in microsoft.public.inetserver.asp.general:
    >
    >> i'm using the dundas freelib upload code to upload files in my
    >> website. when the user choses to upload a file a new window is opened
    >> and the upload procedure goes fine and the file is uploaded
    >> successfully. but the problem is the i want to know the name of the
    >> file in the parent window to save it in the database. i tried to use
    >> a session variable which contains the name of the file but it dosen't
    >> work. the parent window contains a form which is used to insert new
    >> data in the database so i can't use the upload window to insert the
    >> filename in the database.

    >
    > Use a streaming file for uploading and register the facts in your
    > database before the stream start.
    >


    Sorry, this is nonsense, I was thinking of downloading.

    ;-}

    Uploading registration depends upon the uploader module.

    --
    Evertjan.
    The Netherlands.
    (Replace all crosses with dots in my emailaddress)
     
    Evertjan., Apr 30, 2005
    #3
  4. here is some code from one of my projects...
    I think "UserFilename" is what you want

    I cant remember what is going on with the "ServerAssignedName"

    You will have to play around with it..


    set Upload = server.CreateObject("Dundas.Upload.2")
    Upload.UseUniqueNames = True
    Upload.MaxFileSize = 1048576
    Upload.Save(UploadDirectory)

    ServerAssignedName = Mid(Upload.Files(0).Path,
    InstrRev(Upload.Files(0).Path,"\") + 1)
    UserFilename = Mid(Upload.Files(0).OriginalPath,
    InstrRev(Upload.Files(0).OriginalPath,"\") + 1)




    "Soha" <> wrote in message
    news:...
    > i'm using the dundas freelib upload code to upload files in my website.
    > when the user choses to upload a file a new window is opened and the
    > upload procedure goes fine and the file is uploaded successfully. but
    > the problem is the i want to know the name of the file in the parent
    > window to save it in the database. i tried to use a session variable
    > which contains the name of the file but it dosen't work.
    > the parent window contains a form which is used to insert new data in
    > the database so i can't use the upload window to insert the filename in
    > the database.
    >
     
    Kyle Peterson, Apr 30, 2005
    #4
  5. and look out because that code got line breaks added to it when I posted it

    "Kyle Peterson" <> wrote in message
    news:O1Q3K$...
    > here is some code from one of my projects...
    > I think "UserFilename" is what you want
    >
    > I cant remember what is going on with the "ServerAssignedName"
    >
    > You will have to play around with it..
    >
    >
    > set Upload = server.CreateObject("Dundas.Upload.2")
    > Upload.UseUniqueNames = True
    > Upload.MaxFileSize = 1048576
    > Upload.Save(UploadDirectory)
    >
    > ServerAssignedName = Mid(Upload.Files(0).Path,
    > InstrRev(Upload.Files(0).Path,"\") + 1)
    > UserFilename = Mid(Upload.Files(0).OriginalPath,
    > InstrRev(Upload.Files(0).OriginalPath,"\") + 1)
    >
    >
    >
    >
    > "Soha" <> wrote in message
    > news:...
    >> i'm using the dundas freelib upload code to upload files in my website.
    >> when the user choses to upload a file a new window is opened and the
    >> upload procedure goes fine and the file is uploaded successfully. but
    >> the problem is the i want to know the name of the file in the parent
    >> window to save it in the database. i tried to use a session variable
    >> which contains the name of the file but it dosen't work.
    >> the parent window contains a form which is used to insert new data in
    >> the database so i can't use the upload window to insert the filename in
    >> the database.
    >>

    >
    >
     
    Kyle Peterson, Apr 30, 2005
    #5
  6. Soha

    Soha Guest

    i'm sorry but i didn't understand what is "ServerAssignedName". form
    the code i see that ur building a name of the file file but how can i
    use this name in the parent window. dose the parent window see this
    ServerAssignedName"? is it available for the other pages displayed in
    the parent window?
     
    Soha, May 1, 2005
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Alvin Bruney
    Replies:
    1
    Views:
    641
    Rajesh.V
    Oct 15, 2003
  2. Mark
    Replies:
    4
    Views:
    1,168
    Rutger Smit
    Sep 15, 2004
  3. GenxLogic
    Replies:
    3
    Views:
    1,296
    andrewmcdonagh
    Dec 6, 2006
  4. chowchho
    Replies:
    7
    Views:
    646
    Patrice
    Mar 28, 2008
  5. Jazzis
    Replies:
    2
    Views:
    257
    Jazzis
    Sep 23, 2003
Loading...

Share This Page