Sometimes it is the simple things that just get you stumped. Please excuse this interuption, and hopefully maybe someone might comment. Thanks for all the great information on the list! It is a valuable resource. Now my question: I have a small application that I want to put a local file link_to on the page. I want to be able to click on the link, and launch word to open the file. I don''t really need to store the file in the DB, I just need the link. For the life of me, I can''t seem to be able to find the correct ''action'' for this link. Any suggestions or pointers? Thanks again. Mike Buckley\ -- ------------------------------ [img]http://www.mjbuckley.org/gmail-2.png[/img] _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
I''m also a novice, but why not put an <a href=''localfilename.doc''>click here to launch</a> in the appropriate rhtml file in the view directory. If you need access to Ruby variables to get the local name of the file, you can use <%= rubycodehere %> embedded within the href statement. On 9/5/05, Mike Buckley - <mjb.buck-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > Sometimes it is the simple things that just get you stumped. > > Please excuse this interuption, and hopefully maybe someone might comment. > > > Thanks for all the great information on the list! It is a valuable > resource. > > Now my question: > > I have a small application that I want to put a local file link_to on the > page. I want to be able to click on the link, and launch word to open the > file. I don''t really need to store the file in the DB, I just need the link. > For the life of me, I can''t seem to be able to find the correct ''action'' for > this link. > > Any suggestions or pointers? > > Thanks again. > > Mike Buckley\ > > > -- > ------------------------------ > [img]http://www.mjbuckley.org/gmail-2.png[/img] > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails > > >-- http://www.chronicdisorder.net _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
I may have mis-spoken here, it doesn''t appear that easy. The filename info is in the database, as a varchar cell, and it displays as C:\directory\filename.doc The link call using A href seems to eat the info the browser needs to call the mime type, so I am sunk.... Anyone else care to jump in? Mike On 9/5/05, Jason <spit.respectable-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > I''m also a novice, but why not put an > <a href=''localfilename.doc''>click here to launch</a> > in the appropriate rhtml file in the view directory. > > If you need access to Ruby variables to get the local name of the file, > you can use <%= rubycodehere %> embedded within the href statement. > > > > On 9/5/05, Mike Buckley - <mjb.buck-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > Sometimes it is the simple things that just get you stumped. > > > > Please excuse this interuption, and hopefully maybe someone might > > comment. > > > > > > Thanks for all the great information on the list! It is a valuable > > resource. > > > > Now my question: > > > > I have a small application that I want to put a local file link_to on > > the page. I want to be able to click on the link, and launch word to open > > the file. I don''t really need to store the file in the DB, I just need the > > link. For the life of me, I can''t seem to be able to find the correct > > ''action'' for this link. > > > > Any suggestions or pointers? > > > > Thanks again. > > > > Mike Buckley\ > > > > > > -- > > ------------------------------ > > [img]http://www.mjbuckley.org/gmail-2.png[/img] > > > > _______________________________________________ > > Rails mailing list > > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > > > > > -- > http://www.chronicdisorder.net-- ------------------------------ [img]http://www.mjbuckley.org/gmail-2.png[/img] _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
Ok, now I have a similar question for the list -- part of my pet project keeps track of a few MP3 files on the harddrive, and I wanted to give the user the option to launch the file in the default media player. The full path of the file is stored in an SQL table. My code creates the correct link: <a href="file://<%= song.path_to_audio %>">Launch the file</a> BUT clicking on the link doesn''t do anything. Viewing the generated HTML for this link and pasting it into c:\test.htm will launch the MP3 file into a player correctly. Why does the same HTML not work correctly when webbrick is serving it to my browser? Details: Windows XP, Web Brick, both Firefox and IE. I''m adding the HTML to the edit page for ''song''. Thanks, Jason On 9/5/05, Mike Buckley - <mjb.buck-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > I may have mis-spoken here, it doesn''t appear that easy. The filename info > is in the database, as a varchar cell, and it displays as > C:\directory\filename.doc The link call using A href seems to eat the info > the browser needs to call the mime type, so I am sunk.... > > Anyone else care to jump in? > > Mike > > > On 9/5/05, Jason <spit.respectable-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > I''m also a novice, but why not put an > > <a href=''localfilename.doc''>click here to launch</a> > > in the appropriate rhtml file in the view directory. > > > > If you need access to Ruby variables to get the local name of the file, > > you can use <%= rubycodehere %> embedded within the href statement. > > > > > > > > On 9/5/05, Mike Buckley - < mjb.buck-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > Sometimes it is the simple things that just get you stumped. > > > > > > Please excuse this interuption, and hopefully maybe someone might > > > comment. > > > > > > > > > Thanks for all the great information on the list! It is a valuable > > > resource. > > > > > > Now my question: > > > > > > I have a small application that I want to put a local file link_to on > > > the page. I want to be able to click on the link, and launch word to open > > > the file. I don''t really need to store the file in the DB, I just need the > > > link. For the life of me, I can''t seem to be able to find the correct > > > ''action'' for this link. > > > > > > Any suggestions or pointers? > > > > > > Thanks again. > > > > > > Mike Buckley\ > > > > > > > > > -- > > > ------------------------------ > > > [img]http://www.mjbuckley.org/gmail-2.png[/img] > > > > > > _______________________________________________ > > > Rails mailing list > > > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > > > > > > > > > > > -- > > http://www.chronicdisorder.net > > > > > -- > ------------------------------ > [img]http://www.mjbuckley.org/gmail-2.png[/img] >-- http://www.chronicdisorder.net _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails