Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Anyone know anything about SoftArtisans FileUp...?

Status
Not open for further replies.

hayley

Programmer
Mar 14, 2001
13
GB
Hi,

I am having a problem using the request object to read in variables on the same page as I am using upl.form later on in the page. this is a piece of the code :

b_Slide_Active = request("b_Slide_Active")

Set upl = Server.CreateObject("SoftArtisans.FileUp")

if b_Slide_Active = "on" or b_Slide_Active = "True" then

s_Relative_Path = "/documents/"
upl.Path = Server.MapPath(s_Relative_Path) & "\"
upl.form("s_Slide_Name").save

i_Position = inStrRev(upl.UserFilename,"\",-1,1)
i_Length = len(upl.UserFilename)
i_cut = i_length - i_Position
s_Slide_Name = right(upl.UserFilename,i_Cut)
s_Slide_Name = replace(s_slide_Name,",","",1,-1,1)
b_Slide_Active = 1

else
b_Slide_Active = 0
s_Slide_Name = null
end if

It doesn't seem to like using the request object on this page and will not read in the b_Slide_Active variable. However, in some instances a file will not be uploaded and therefore I can not use the upl.form object to read the variable either. Can anyone offer any help? Sorry if my explanation is not very clear, I'm very new to all this.

Thanks very much for your help,

Hayley
 
With Fileup you can't get any variables from the form at all because (I think) of the fact that you have to set the form itself to enctype="multipart". You have to instantiate the object anyway and then use it to read the form item (in this case b_slide_active) - you can always close the object again after you've got all the form data you need.

I'm afraid I don't have any sample scripts to hand, but if you look at softartisans' website you'll find that there's a method which will tell you whether a file's been uploaded or not so you won't need the extra variable.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top