How can I launch an OSX application from the browser? - html

I'm coding an admin panel with a web interface that will only be run locally (not client-facing or hosted on an external server), and it would be helpful if it could launch an application from an <a href="">. Is this possible? I understand that this could be a browser security thing, but I also know that there are iTunes and App Store links (not quite sure how those work either), and I assume this is also possible for launching "x" application. How can I do this?

it is only possible if the application you want to start registers its own URI scheme with the OS. Though you could write your own app that starts other apps on demand. You'll have to register your own scheme then.

Found a solution! Instead of using an <a href="">, I've decided to run a shell command from a PHP script that just does open application_name.app and redirect back to the referrer.

Related

Building a web page without having internet access

I want to build a web site using my laptop in areas where I often do not have internet access - no active browser. How do I check my pages to see how things are going without a browser?
Just drag-and-drop the .html file into your favourite web-browser. It should open up with the "file:///" protocol automatically.
You should always have a local web server installed on your machine for development.
For example, Mac OSX comes with Apache pre-installed. You might have to activate it. You can also install a server language like PHP or Python. Again, OSX comes with those pre-installed, might just need activation. Google how to set up a local server on the type of OS you have.
You should try to replicate the type of server setup you will be using in production.
That will permit you to code locally and test in your browser.
You should also use some kind of versioning system like Git. So, you code on your local machine, then you can push your code to the cloud once in a while for backup. When you're ready, upload your code to the production server and try it out.

Can I deploy an HTML5 application using the WebAppRT executable?

I see that the lastest versions of Firefox come with a webapprt.exe and webapprt-stub.exe executable. I think that they are for the Open Web Apps system but I would like to know if it's possible to use the WebAppRT container with external made applications. I mean that I could distribute the WebAppRT executable, the shared libs required and my HTML files and deploy it offline without having Firefox installed.
Why?
What do you mean by "external made applications"?
Why don't you just create a web app as explained in Building Web apps - App Center | MDN ?
It will take care of the details and allow your app to reach more platform than doing it manually. For a glance see Platform-specific details of app installation - App Center | MDN
You don't have to do anything special to install apps on different platforms. All the information you need to provide, such as the app name, is contained in the app manifest. Here are some platform-specific details about how apps are installed on each platform. These details assume that Firefox has been installed on the platform.
To make that path easier, you can follow tutorials or clone an existing open-source web app that has something in common to see how it's done.
What did you mean?
If you mean to just manually locally install a some app that you write, the simplest thing to do would be to install any app, look at what's been done and replicate the steps with your app. But what's the point?
My guess is: it will work only if the local OS has a platform to actually execute the app. Then that platform will also be able to install the app properly. So, it will be simpler to you to just make a regular web app and have it installed through standard means.
Or were you thinking of something else?

Why does the asp.net website administration tool give timeout message (mysql db)?

i have an asp.net-mvc website and I am trying to use the asp.net website administration tool but when i click in visual studio 2010 to launch it, it brings up a browser that says:
An error was encountered. Please return to the previous page and try again.
i can't click back but when i click on "How do i use this tool", i get this error:
Tool Has Timed Out
As a security measure, the Web Site Administration Tool times out after a period of inactivity. Changes to machine.config or web.config may also result in the tool needing to be restarted. To continue configuring your web site, restart the tool.
when i run my website, i am able to connect to the database fine and i am also able to insert new users through the default Account/LogOn interface.
Any suggestions on how to debug why i can't launch the admin tool ?
The project's path shouldn't contain #% or spaces
Could you please try the following:
Close your browser completely. Whether you are using IE or Firefox to test your website, you should make sure all browser windows are closed.
Kill the asp.net development server. It is located in your taskbar
Or, if you are hosting your site in IIS, force an iisreset.
Now try to run the Web Site Administration Tool again.
If it still does not work yet, could you please provide which browser you are using, and which OS and host?
The project's path shouldn't contain #% or spaces
My Project path was D:\Programming\C#\Tests\MVCApplication\
and that is what caused the problem.
I was getting the exact same error message with VS2010 .NET 4.0 framework. I created my solution in a subfolder titled "C#". Renaming the subfolder to CSharp fixed my problem.
I hope this helps.

How to distribute a web site for review?

I'm not sure if this is a programming question, or would be better served on a sister site.
I want to mock up a web site & distribute it by email to some non-tech people for comment.
I can't ask then to install an Apache server, but wondered if I could bundle the site into an .exe, or a .zip and have them open Index.php and play around with the site.
All users are non-techie; all will use Windows; the site is coded in PHP and all internal references to URLs, CSS< images are by way of $_SERVER['DOCUMENT_ROOT']
Any advice?
Just throw it on a web server hiding behind some authentication.
It'd be hard to ask a non-techie person to get it running seeing that it would need apache or another server that would run the php. If I were you I'd probably set up a site that's password protected, you send the link & password to the people and they have a look.
I recommend using something like XAMPP if you can get them to install it. Unfortunately, your website cannot run locally as is without the proper software.
Alternatively, you can either pay for web-hosting or create a server that you can access via its IP address from another user's machine. Make use of this guide for access control if you wish.

open a network file from an intranet web application

I am currently building an intranet applicaiton using asp.net mvc and I am wondering if there is a way to link to a file or folder available on the network.
I tried simply
open folder
But obviously that won't work as it just gives the output: file:///G:/folder/ which doesn't actually open to anywhere. I understand that this is for security and that is fine, i am jsut wondering if there are any workaround or anything in an intranet setup? Would impersonation of any type possibly work? Any other ideas?
You could open that file from the server, and serve it to the client. Your web server will act as a proxy. If the files are accessible to the server, and there are no special permissions for the users, or if you can encode those permissions in roles or business rules, then it's quite easy.