User 7b0ee04e66
28-10-2009 15:19:38
Hello
I am trying to set a dynamic link using a dynamic URL field to my PC c:drive
The value displayed in the field is
C:\IJC\A.bmp
When I add a widget on my form to display the data, the text present says
A problem reading URL C:\IJC\A.bmp encountered (unknown protocol: c)
instead of displaying my image.
Is it possible to do this? Or is my syntax wrong?
Thanks
Catherine
ChemAxon fa971619eb
29-10-2009 16:14:36
User 7b0ee04e66
29-10-2009 16:35:39
Thanks, I just saw it in the webex
Catherine
User 99b1bdd34f
16-03-2011 16:24:28
Hi Tim,
long ago we had a chat. How are you?
We are currently building dynamic links to a network drive.
The database is containing a path and filename.
We wanted to construct a dynmic link like this:
file:///{path}\{filename}
Unfortunately the dynamic link functionality is replacing backslashes with %5C which is leading to a broken link, at least the file does not open by clicking the link.
e.g.:
file:///"%5C%5CGe-hafx-san01%5Cdds+new%5Ccustomer%5CPEX_ligand%5Cresults_AD%5CSPR%5C20110311_SPR
Do you know how to circumvent the automatic substitution by the dynamic link functionality?
When defining a static path like
file:///\\networkserverX\folderA\subfolderB\{filename}
the dynamic link functionality is working and the target file is opening.
But we want to keep the path dynamic as well.
Many thanks and all the best,
Robert
User 791c148e8a
16-03-2011 17:02:09
URL syntax is
protocol://domain:port/path?query_string#fragment_id
'C:\IJC\A.bmp' is a filename. If you try to interpret it as URL then C will be protocol (part before colon). And there is no such protocol. That's what you got in the error message.
Most likely you want to create URL like
file:///C:\IJC\A.bmp
Here the protocol is file and there is an empty domain(host)/port part followed with a path. I suppose this will work on windows. If this doesn't work then you can try to substitute 'C:' with 'C|' and backslashes with regular slashes.
-Radim
ChemAxon e189db4705
16-03-2011 17:34:12
I use Firefox to convert file path to correct URL on Windows. Open Firefox (or probably other browsers as well) and fill this to location:
c:\temp\img\pict.png
and press Enter. The picture is opened and the location URL is converted to:
file:///c:/temp/img/pict.png
which can be used in schema editor for a new dynamic URL field:
file:///c:/temp/img/{somekey}.png
User 99b1bdd34f
16-03-2011 18:13:29
Hi,
opening a file from a windows network drive is working fine, when using a simple dynamic link composed of:
file:///\\networkserverX\folderA\subfolderB\{filename}
No worries about backslashes or the file:/// prefix.
The entire path is translated perfectly and the dynamic element
{filename} is substituted by fileA.ext
That works and the file opens.
As soon as I want to use also the network path (\\networkserverX\folderA\subfolderB) as a dynamic element ( {path} )it doesn't work any more.
Backslashes are substituted by %5C.
If slashed are applied instead, they got substituted by %2F, but that doesn't make the link work.
Sorry for being so unprecise in my previous email.
I am using ijc 5.3.1 on a WindowsXP system.
Many thanks and all the best,
Robert
ChemAxon e189db4705
17-03-2011 09:44:53
I tested URL to network drives and using Firefox (as described above) it converts original:
\\MY-PC\Public\image1.png
to URL like:
file://///MY-PC/Public/image1.png
And then this is possible to use in IJC:
file://///MY-PC/Public/{fileName}
I don't use backslashes in final URL in Instant JChem.
User 99b1bdd34f
17-03-2011 09:58:15
Hi,
backslashes or slashes itself are not the problem.
As soon as you put the path into a database field and use it for building a dynamic link, then the substitution takes place (%5C or %2F) and the link is broken.
The workaround for me is now to put all result files I want to hyperlink into a single folder and build a static network path with a dynamic file name element. This is not optimal but should do it.
Many thanks for your help and all the best,
Robert
ChemAxon e189db4705
17-03-2011 11:03:11
Hi Robert,
I think I understand now. I tested to put part of the path to filename which is used as parameter. Now I see how / or \ chars are incorrectly replaced. This is a bug and we'll look at it.
thanks
Petr
ChemAxon 2bdd02d1e5
10-10-2011 10:51:49
This bug was fixed in 5.5.0 version of IJC. Version 5.6.0.2 is currently available and includes the fix for this too.
Filip