From: Giles V. <gv...@sa...> - 2009-12-18 00:41:22
|
Hi Jerome, I don't know about this particular case, but it is very common that JS libraries like JQuery, Dojo, Mootools and so on can't be used together on the same page. This is often due to the fact that each library extends Javascript in a similar, but subtly different way and conflict with each other. If you are intending to embed Jbrowse on your page, you're probably better off using the same libraries Jbrowse uses. Either that, or embed Jbrowse in an iframe. Regards, Giles On 17 Dec 2009, at 16:01, Mariette wrote: > > Re HI, > > I fugured out that it's a conflict between jquery and dojo. Do you > have > a version of jbrowse > not using dojo ? Do you know if it's possible to mix the both of > them in > a same web page. > > Jerome > > > > > Mariette a écrit : >> Hi everyone, >> >> I'm trying to add jbrowse to our website, which is basicly a >> detection >> and annotation >> platform for non coding RNA. When RNAs are detected, I'd like to show >> them up using >> jbrowse, but I got some trouble adding it to our web page ! >> So I added all the javascript and css to our page and then placed the >> following code ( >> which is the one provided in the index.html) to the javascript >> section : >> >> var queryParams = >> dojo.queryToObject(window.location.search.slice(1)); >> var bookmarkCallback = function(brwsr) { >> return window.location.protocol >> + "//" + window.location.host >> + window.location.pathname >> + "?loc=" + brwsr.visibleRegion() >> + "&tracks=" + brwsr.visibleTracks(); >> } >> >> var t = new Browser({ >> containerID: "GenomeBrowser", >> refSeqs: refSeqs, >> trackData: trackInfo, >> defaultTracks: "DNA,gene,mRNA,noncodingRNA", >> location: queryParams.loc, >> tracks: queryParams.tracks, >> bookmark: bookmarkCallback >> }); >> >> then I added the div to my page content (still just like it is in the >> index.html page of jbrowse) : >> <div id="GenomeBrowser" style="height: 100%; width: 100%; padding: 0; >> border: 0;"></div> >> >> I can see my page changing but I'm far from having the result I can >> get when using it localy !! >> So I was wondering if using it the ?loc and &tracks are important, we >> give to our page some >> arguments and it may be a problem ? >> >> Also, there was something wrong in the Utils.js file, I had to change >> the following function from : >> function $(element) { >> ... >> } >> >> to >> function (element) { >> ... >> } >> >> It may be a problem has well ! >> Thanks for giving me some info if I'm doing something wrong or not, >> >> Jerome >> > > > ------------------------------------------------------------------------------ > This SF.Net email is sponsored by the Verizon Developer Community > Take advantage of Verizon's best-in-class app development support > A streamlined, 14 day to market process makes app distribution fast > and easy > Join now and get one step closer to millions of Verizon customers > http://p.sf.net/sfu/verizon-dev2dev > _______________________________________________ > Gmod-ajax mailing list > Gmo...@li... > https://lists.sourceforge.net/lists/listinfo/gmod-ajax -- The Wellcome Trust Sanger Institute is operated by Genome Research Limited, a charity registered in England with number 1021457 and a company registered in England with number 2742969, whose registered office is 215 Euston Road, London, NW1 2BE. |