View Complete Thread | FoxWeb Forum Home
Search:
Date:    Msg ID:   
From:    Thread:   
Subject:   
I am having trouble using the auth object in conjuntion with a file download (but only if the file type is that of a word document).
 
If the auth object is not used the word doc download works fine.
 
Here is a sample of the problem
 
File saved as "testword.fwx"
 
<%
Auth.AuthTable = "data\Users.dbf"
Auth.AuthFormFile = "authform.fwx"
Auth.Header = ""
Auth.Footer = ""
Auth.SaveCookie = 1
Auth.Authenticate()
 
cShowType = Request.QueryString("ShowType")
If Empty(cShowType)
     Response.Write("<html><head><title>Word Test</title></head><body><br>")
     Response.Write('<a href="javascript:window.open('+"'testword.fwx?ShowType=1','Wordwindow','left=0,top=0,width=800,height=700,scrollbars,menubar'"+')">Click to view word file</a>')
     Response.Write("<br>")
     Response.Write('<a href="javascript:window.open('+"'testword.fwx?ShowType=2','Wordwindow','left=0,top=0,width=800,height=700,scrollbars,menubar'"+')">Click to view image file</a>')
     Response.write("<br></body></html>")
Else
     If cShowType = "1"
          Response.ContentType = "application/msword"
     Else
          Response.ContentType = "image/jpeg"
     Endif
Endif
Response.End
%>