Alpha Video Training
Results 1 to 10 of 10

Thread: Request.Variables

  1. #1
    Member ColinJD's Avatar
    Real Name
    Colin Davies
    Join Date
    Jun 2006
    Location
    NZ
    Posts
    481

    Default Request.Variables

    Can someone help as to why the code below just returns an error,
    I am Posting data to the page from a form and the request.raw txt show the named field "Suburb"
    I'm sure I'm missing something simple, but what.


    Code:
    dim SuburbC as C
    if eval_valid("Request.Variables.Suburb") then
    	SuburbC = Request.Variables.Suburb
    else
    	SuburbC = "null"
    end if
    Thx

  2. #2
    "Certified" Alphaholic chadbrown's Avatar
    Real Name
    Chad Brown
    Join Date
    Aug 2007
    Location
    Aurora, Ontario, Canada
    Posts
    1,408

    Default Re: Request.Variables

    Maybe skip the null just ""

  3. #3
    Member ColinJD's Avatar
    Real Name
    Colin Davies
    Join Date
    Jun 2006
    Location
    NZ
    Posts
    481

    Default Re: Request.Variables

    Hi Chad
    It doesn't actually go to the "NULL"
    -
    Code:
    eval_valid("Request.Variables.Suburb")
    returns true,
    But when I try to take the value via
    Code:
    SuburbC = Request.Variables.Suburb
    the error occurs

  4. #4
    Moderator Steve Wood's Avatar
    Real Name
    Steve Wood
    Join Date
    Nov 2003
    Location
    Bay Area, California
    Posts
    8,827

    Default Re: Request.Variables

    So what's the error? What value are you posting for Suburb?
    Steve Wood
    Join the ALPHA DEVELOPERS NETWORK
    There is no Cloud. It's just someone else's computer.
    Web - Mobile - Hosting - Products - Frameworks - Developer Resources
    AlphaToGo | IADN (100% Alpha Anywhere Websites)

  5. #5
    Member ColinJD's Avatar
    Real Name
    Colin Davies
    Join Date
    Jun 2006
    Location
    NZ
    Posts
    481

    Default Re: Request.Variables

    The Server just fails to process the code,
    "I'm don't know how to find the error code for a server page.
    Suburb is a Alpha-Character value eg "Johsonville"
    Both pages are using the same charset; eg ISO-8859-1

  6. #6
    Member ColinJD's Avatar
    Real Name
    Colin Davies
    Join Date
    Jun 2006
    Location
    NZ
    Posts
    481

    Default Re: Request.Variables

    Note:
    Have found a workaround using session Variables,
    Not elegant, but it works,
    The problem with the request Variables still seems totally illogical.

  7. #7
    Moderator Steve Wood's Avatar
    Real Name
    Steve Wood
    Join Date
    Nov 2003
    Location
    Bay Area, California
    Posts
    8,827

    Default Re: Request.Variables

    I still can't figure out what your "error" is. If nothing is reported, how is that an error? If I take your code unedited, it works perfectly. BTW, I never use "resquest.variables.xyz", I just use the variable name.
    Steve Wood
    Join the ALPHA DEVELOPERS NETWORK
    There is no Cloud. It's just someone else's computer.
    Web - Mobile - Hosting - Products - Frameworks - Developer Resources
    AlphaToGo | IADN (100% Alpha Anywhere Websites)

  8. #8
    Member ColinJD's Avatar
    Real Name
    Colin Davies
    Join Date
    Jun 2006
    Location
    NZ
    Posts
    481

    Default Re: Request.Variables

    Yes, Normally I just use the variable name eg Xyz, instead of the more implicit structure. But the simple name was not working so I thought I'd call the variable by its complete handle.
    The error is weird as I the server just stops Processing at the point where I either test or try to read a "Posted Variable",
    Note even with the Aurigma Control the Posted values eg SourceFileName_1 or whatever cause a similar error.
    eg Any Code I put after a posted variable being read is not processed.
    All the variables come through on the request.raw output though.

  9. #9
    Moderator Steve Wood's Avatar
    Real Name
    Steve Wood
    Join Date
    Nov 2003
    Location
    Bay Area, California
    Posts
    8,827

    Default Re: Request.Variables

    Ah, that rings a bell now. The Aurigma Uploader. Not sure if I shared this with you when we were on the phone, but this is my upload.a5w page that is called from the aurigma page that has all of the javascript. Maybe it will help just as reference. You should recognize the Aurigma variables by name.

    Code:
    <%a5
    
    strImagePath  = "[PathAlias.photos]\\" + session.__protected__album
    strThumbsPath = "[PathAlias.project]\\" + "thumbs\\" + session.__protected__album
    
    if file.exists(strImagePath) = .f.
    	file.dir_create_recurse(strImagePath)
    end if
    if file.exists(strThumbsPath) = .f.
    	file.dir_create_recurse(strThumbsPath)
    end if
    
    dim tbl as p
    tbl=table.open("[PathAlias.ADB_Path]\photoimage")
    	tbl.enter_begin()
    		tbl.User_id 	= session.__protected__ulink
    		tbl.Albumid 	= session.__protected__album
    		tbl.Filename 	= SourceFile_1.filename
    	tbl.enter_end()
    tbl.close()	
    
    '"-BLOBS-----------------------------------"
    file.from_blob(strImagePath+"\\"+ SourceFile_1.filename,SourceFile_1.data)
    file.from_blob(strThumbsPath+"\\t1_"+FILE.FILENAME_PARSE(SourceFile_1.filename,"n")+".jpg",Thumbnail1_1.data)
    file.from_blob(strThumbsPath+"\\t2_"+FILE.FILENAME_PARSE(SourceFile_1.filename,"n")+".jpg",Thumbnail2_1.data)
    
    save_to_file(request.raw,"c:\test.txt")
    
    
    %>
    Steve Wood
    Join the ALPHA DEVELOPERS NETWORK
    There is no Cloud. It's just someone else's computer.
    Web - Mobile - Hosting - Products - Frameworks - Developer Resources
    AlphaToGo | IADN (100% Alpha Anywhere Websites)

  10. #10
    Member ColinJD's Avatar
    Real Name
    Colin Davies
    Join Date
    Jun 2006
    Location
    NZ
    Posts
    481

    Default Re: Request.Variables

    Yes The uploader also provides functionality for additional field and form uploads. What particularly interests me there is in the (Robust Approach) which I bet is far better than anything that I can create on the fly.
    Note the Blob gets the Data without problem, its just extracting the filename causes the server to behave erratically in processing the A5 script.
    For now I have it working but I expect to be rewriting, refactoring this project in a month or two, thus I'll revisit it.
    I really appreciate your assistance Steve.

Similar Threads

  1. Request.Variables not found
    By ezwise in forum Application Server Version 9 - Web/Browser Applications
    Replies: 11
    Last Post: 12-05-2008, 08:33 PM
  2. Request.Variables usage
    By ezwise in forum Application Server Version 9 - Web/Browser Applications
    Replies: 2
    Last Post: 11-21-2008, 02:07 PM
  3. Request Variables and SSI
    By PCS in forum Web Application Server v7
    Replies: 3
    Last Post: 08-09-2006, 02:41 PM
  4. Request Variables
    By PCS in forum Web Application Server v7
    Replies: 1
    Last Post: 08-08-2006, 12:30 PM
  5. Request Variables and A5W_info
    By robert swanson in forum Web Application Server v6
    Replies: 3
    Last Post: 10-17-2005, 04:14 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •