From: Egon W. <e.w...@sc...> - 2006-01-09 09:21:05
|
On Monday 09 January 2006 10:08, nve...@cl... wrote: > De: Tjaart de Beer <tj...@tu...> > >I am a newbie tryinh to developing pages with javascript. I am trying to > >enable a user to load any pdb file (from the PDB) into Jmol from a > >webpage. I have tried using the following: > > > >jmolApplet(600, "load http://www.pdb.org/pdb/files/1tx2.pdb"); > > > >without any success. It gives me an error saying "bad URL" but if I open > >up the link in Firefox I see the physical pdb file. > > > >The idea is to allow the user to type in a pdb file code which will then > >be automatically loaded. Any ideas? > > I think this is a security problem, the Applet probably doesn't have the > right to access an other webserver than the one it was downloaded from. You > should check the archives of the mailing lists (or wait for someone to > help), there are probably examples on how to do this. Indeed! That's it... Tjaart, please look in the archives and on the Jmol homepage for the applet 'proxy'... it is a CGI-BIN script for your webserver that allows proxy-ing PDB files from the PDB server... There is more options given at: http://www.bioinformatics.org/firstglance/fgij/datameth.htm The proxy is mentioned down the bottom of the page. Could not find the proxy code though... not sure where that is now... Anyone who remembers where that proxy can be downloaded? Egon -- Egon Willighagen http://chem-bla-ics.blogspot.com/ |