Marvin Javascript error on Mozilla

User e34a92cce5

17-03-2005 16:10:45

Hi,


I have been using the Javascript utility to provide controls on the Marvin applet, that will take users to new sites. I use a jpg image for the control item, which when clicked will open a new window in another site that will have relevant information. My code:





mview_param("param", ":M:150:150:L:10:L:10:L:10:L:10");





mview_param("cell0", "|<% cd_structure %>|NCI ID:648480|C13H12N2O5S2|MW: 340.38|SIM: 87.3%|view.jpg|js:window.open(\'http://nci.nih.gov?count=0',\'ccgwindow\',\'width=750 height=550 fullscreen=no,toolbar=no,status=no,menubar=yes,scrollbars=yes,resizable=yes,location=no left=0,top=0\')|");








It seems to work well on IE, but gives me netscape.javascript.JSException error when I use Mozilla.

ChemAxon efa1591b5a

18-03-2005 12:24:10

I reckon the problem you reported is related to MarvinView rather than MarvinSpace. I moved it to the appropriate forum.


Regards,


Miklos

ChemAxon 7c2d26e5cf

18-03-2005 15:12:04

The exception proves that the Java - JavaScript communication does not work in your example.


Perhaps, you have missed to set the mayscript parameter to true, like this:


Code:
mview_mayscript = true;



See the following example. It demonstrates the Java - JavaScript communication. http://www.chemaxon.com/marvin/doc/dev/example-view2.4.html


If you have already set the mayscript parameter, there may be a browser problem.


About browser compatibility problems, you can read more in the following documents.


http://www.chemaxon.com/marvin/doc/bugs/faq.html


http://www.chemaxon.com/marvin/doc/user/for-mac-users.html


Which platform do you use (OS type, Java/browser version)?

User e34a92cce5

18-03-2005 15:37:16

Yes, Tamas. u were right. I didn't add the mayscript parameter. Mozilla is very strict with these. Works fine now