Mediv Posted March 16, 2012 Share Posted March 16, 2012 There is a project that is running on the server, users refer to it from the outside, the task of pressing a button on the report form and open a user's browser. The problem is that you can not use ShellApi unit, because when I call the hyperlink, the report will open on the server not the client, which is logical, Prompt startup options for the hyperlink. Thank you. Есть проект который крутиться на серваке, к нему обращаются пользователи снаружи, задача по нажатию на кнопку формировать отчет и открывать у пользователя в браузере, если есть плагин откроет страницу, нет - скачает и сохранит. Проблема в том что нельзя использовать ShellApi unit, потому что когда я вызываю гиперсылку, то отчет открывается на серваке а не на клиенте, что логично, Подскажите варианты запуска гиперссылки по кнопке. Спасибо. Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted March 16, 2012 Administrators Share Posted March 16, 2012 There is a project that is running on the server, users refer to it from the outside, the task of pressing a button on the report form and open a user's browser. The problem is that you can not use ShellApi unit, because when I call the hyperlink, the report will open on the server not the client, which is logical, Prompt startup options for the hyperlink. Thank you. On web side your app already runs inside a browser window. Do you want to open a new browser window or ? Link to comment Share on other sites More sharing options...
Mediv Posted March 16, 2012 Author Share Posted March 16, 2012 Yes, need to open a new window in your browser. Link to comment Share on other sites More sharing options...
zilav Posted March 16, 2012 Share Posted March 16, 2012 Есть проект который крутиться на серваке, к нему обращаются пользователи снаружи, задача по нажатию на кнопку формировать отчет и открывать у пользователя в браузере, если есть плагин откроет страницу, нет - скачает и сохранит. Проблема в том что нельзя использовать ShellApi unit, потому что когда я вызываю гиперсылку, то отчет открывается на серваке а не на клиенте, что логично, Подскажите варианты запуска гиперссылки по кнопке. Спасибо. Используй CSS чтобы превратить ссылку в кнопку. Примеров полно, например http://webdesignerwall.com/tutorials/css3-gradient-buttons. Добавь параметр target=_blank в тег <a>, чтобы ссылка открывалась в новой вкладке/окне. Это самый простой вариант. Link to comment Share on other sites More sharing options...
Mediv Posted March 19, 2012 Author Share Posted March 19, 2012 Можешь кинуть пример исп-ия css?? Я так понимаю нужно использовать UniServerModule.CustomFiles, там нужно указать пусть до сценария?? или сам код написать? Спасибо. Link to comment Share on other sites More sharing options...
Mediv Posted March 19, 2012 Author Share Posted March 19, 2012 Разобрался, через CustomCss, кнопка появилась, спасибо за помощь. Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now