Welcome, Guest
Please Login or Register.    Lost Password?

Can the Table JX Grid be configured to download
(1 viewing) (1) Guest
This is the optional Forum header for the Suggestion Box.
Go to bottomPage: 12
TOPIC: Can the Table JX Grid be configured to download
#642
Re:Can the Table JX Grid be configured to download 1 Month, 3 Weeks ago Karma: 0
Hi Viljem,

Thank you for your help.

I used your suggestions and have managed to make it work.

How i did it was as below:

1. Using phpAdmin i created 2 fields frm_dir1 and frm_dir2

2. I assigned frm_dir1 a default value of {<a href="www.<mywebsite>.com/components/com...ploads/requestquote/} (..without curly brackets...)

3. I assigned frm_dir2 a default value of {>Download</a>}
(..without curly brackets...)

4. Then I created a view, {CREATE VIEW requestquote_view as SELECT frm_name,frm_email,concat(frm_dir1,frm_file,frm_dir2) as Filename,`recordtime`,`ipaddress` FROM jos_chronoforms_requestquote;}

5. I recreated my list using Table JX to get from the view table

After this steps when i ran my list i could see a hyperlink on Download which when clicked downloads the referred file.

It works!!

Thank You again Viljem.

PS. Is there a way i can do this same thing without using the view table? Is there a way i can get Table JX to concatenate the directory and filename just before displaying on the list?
Please let me know if you have any ideas on this.

Regards
dalonehacker
Fresh Boarder
Posts: 9
graphgraph
User Offline Click here to see the profile of this user
Last Edit: 2010/07/13 20:37 By dalonehacker.
The administrator has disabled public write access.
 
#648
Re:Can the Table JX Grid be configured to download 1 Month, 3 Weeks ago Karma: 1
Hi,

no problem, I am glad to help you.

1.
Is there a way i can do this same thing without using the view table?
If not using the view you can still write a piece of php code

2.
Is there a way i can get Table JX to concatenate the directory and filename just before displaying on the list?
Nice solution for that would be sql view.
e.g.
Code:


CREATE VIEW Something AS
SELECT CONCAT('www.domain.com/', Folder, '/', FileName)
FROM Table


(above solution was not tested, but it should work)

You will get something like:
www.domain.com/documents/JohnTravolta.jpg

Best regards,
Viljem
viljem
Admin
Posts: 153
graph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
Go to topPage: 12
Tools JX, Powered by Joomla!; Joomla templates by SG web hosting