Jump to content
UBot Underground

Recommended Posts

hey I was wondering if an upload file hasn't been chosen then can I have an alert reminding the user that they need to upload their file?

 

What I have so far is that the "upload file" #variable is added to a %list. So if they don't upload the file then it shows in the debugger as 0 items, but when I did a "and if" "comparison" %list = 0 items then "alert", but that didn't work. Tried some other things too, yet no dice.

 

Waddya figure?

Link to post
Share on other sites

I find it sloppy to use alerts, instead, I use define subroutines to test if a client has entered required information. In the sub, I remind them that they have not entered some of the data required and give them instructions on how to enter it as in the following example:

 

Create a define called Check Upload.

 

If

#upload_variable=$nothing

 

Then

Load html

(In the html file, it says something like - You Have Not Yet Uploaded The File! Place your mouse in the box labeled "Upload" and paste in the file you want to upload.)

 

Wait 1 second

 

Check Upload

 

 

End of define

  • Like 1
Link to post
Share on other sites

What I have so far is that the "upload file" #variable is added to a %list. So if they don't upload the file then it shows in the debugger as 0 items, but when I did a "and if" "comparison" %list = 0 items then "alert", but that didn't work.

 

Always initialize your variables/lists/tables somehow if you're gonna have instaces with null fills and at the same time you wanna check conditions on them, or else you will get errors.

 

In your case, initialize your list with a dummy info that you know for sure won't happen in practise and check the IF against that, not against null or zero... Hope it makes sense...

  • Like 1
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...