A database for my data

From: Peter (BOUGHTONP)17 Nov 2008 22:40
To: ANT_THOMAS 13 of 158
Hmmm, well I don't know if you can associate no-file-extension with an application.
You could give it a try if you really wanted, but personally I'd be paranoid about it having unintended consequences.

If you don't have an extension and just link to the file, you'll get the dialog asking you what application to use... so it should still work, it'll just be an irritating extra step.
From: ANT_THOMAS17 Nov 2008 23:02
To: Peter (BOUGHTONP) 14 of 158

I'll give it a go without the file extension for the uni link and see if it even offers to open it.

 

If it works then the extra step isn't really a problem since it'll be the lesser of two evils whilst being part of a huge benefit.

 

With the database I'll be giving myself a far better way to see what data I have available and it also means not clicking through a directory structure which is about 10 folders deep on a slow network.

From: ANT_THOMAS18 Nov 2008 01:47
To: ALL15 of 158

Right.

 

Setup the DB, pushing and pulling data to and from it easy enough.

 

One problem. I can generate a link which is correct

 

"file:///Z:/Docs/Uni/MPhil/NMR/2008-10-09-AB-49/10/fid"

 

But when I click it nothing happens, whereas if I copy and paste it to the address bar and press enter it gives me the open file dialog as I want.

 

Why does the link refuse to work?

From: ANT_THOMAS18 Nov 2008 01:52
To: ALL16 of 158

If I give it an extension it makes no difference.

 

I've just tried it in IE7 and without an extension it opens the dialog box asking to either save or go online to find an app that can do it, but not to pick an app of my own. With an extension you can choose the app, then tell it not to ask again so it just opens any .fid file in Spinworks straight away. For once IE wants to work properly instead of Firefox :(

From: andy18 Nov 2008 01:53
To: ANT_THOMAS 17 of 158
try setting the link's target="_blank"?
From: steve18 Nov 2008 03:10
To: ANT_THOMAS 18 of 158
It is probably a security thing.

It is a security thing.

http://kb.mozillazine.org/Links_to_local_pages_don't_work#Disabling_the_Security_Check

Read there to turn it off x
From: steve18 Nov 2008 03:12
To: steve 19 of 158
Although it's looking like you might need to enter individual paths into the prefs which would make you go mad :(

https://addons.mozilla.org/en-US/firefox/addon/281

That seems to be an addon that does what you need to Firefox. Although I read somewhere that you still need to use the context menu as opposed to just clicking :C
From: steve18 Nov 2008 03:14
To: ALL20 of 158
}}}}}}}}}} Applications that treat you like a moron with no not-a-moron option {{{{{{{{{

}}}}}}}}}} Anyone who points out Firefox is open source {{{{{{{{{{{

{{{ Sandwich Toasters }}}
From: ANT_THOMAS18 Nov 2008 23:07
To: ALL21 of 158
I've looked further into things and I think the PHP command "exec" is what I might need to use, but, I can't figure out how to get it to work as a link :C
From: Dan (HERMAND)18 Nov 2008 23:16
To: ANT_THOMAS 22 of 158

WIthout reading the thread much (on mobile) exec lets you run a command on the server (as opposed to the client).

 

To do it as a link just pass a variable through. sanitise it though, to stop people running anything on your server.

From: ANT_THOMAS18 Nov 2008 23:18
To: Dan (HERMAND) 23 of 158
Ah, not what I want then. Command needs to be run client side.
From: steve18 Nov 2008 23:20
To: ANT_THOMAS 24 of 158
PC Format coverdisks used to use some form of magic to make the browser run an .exe installer without complaining. It was discussed on the first Delphi PCF forum.

HTH :$
From: Peter (BOUGHTONP)18 Nov 2008 23:59
To: ALL25 of 158
Oooh - investigate HTA - that lets you execute shell commands and also connect to servers.

Assuming uni machines don't block it.
From: empathy19 Nov 2008 00:25
To: ANT_THOMAS 26 of 158
Write a tiny program (c, vb, whatever) that can open a certain file extension, say .ant and which then simply runs

c:\Program Files\SpinWorks\SpinWorks.exe Z:\Docs\Uni\MPhil\NMR\2008-10-21-AB-26\10\fid

or whatever. You could either have the .ant file contain the correct directory to use in the call. Then associate .ant files with the application on the client computer, and get your web app to produce the appropriate .ant files. Bit of effort involved but at least it will work seamlessly.
From: Ally19 Nov 2008 14:50
To: empathy 27 of 158
But add a crapload of security to check what it's trying to do. Otherwise you're leaving a huge security hole on the computer... not one that's likely to be exploited but still bad practise.
From: ANT_THOMAS30 Nov 2008 00:08
To: ALL28 of 158

I gave up on the getting things to open in Spinworks idea since it seems way more hassle than it's worth right now, but with what I've decided to do I've come across a problem.

 

When I open a full entry to show the full set of data I want to click a link to show any of the spectra as a PNG or JPEG. I want this image to load underneath the main content area, in an extra DIV. Is this possible easily? Or is the alternative an iframe? (which I was trying to avoid)

 

Also, are there are any batch converters for PDF to PNG/JPEG? I tried irfanview but it was being an arse not being able to recognise PDFs properly even after installing the relevant plugins.

From: ANT_THOMAS30 Nov 2008 00:10
To: ANT_THOMAS 29 of 158
Oh, I want this DIV to be invisible until the image link is clicked.
From: Peter (BOUGHTONP)30 Nov 2008 00:30
To: ANT_THOMAS 30 of 158
You don't need an extra div nor an iframe. Just plonk an image there onclick.

If you provide the current HTML you've got, I can give you the appropriate script. :)
From: ANT_THOMAS30 Nov 2008 01:17
To: Peter (BOUGHTONP) 31 of 158
Which bit of the HTML?
From: ANT_THOMAS30 Nov 2008 01:18
To: Peter (BOUGHTONP) 32 of 158

If you want the actual PHP file then I'll C&P the code.

 

Don't shout at me though.