[Gmod-ajax] jbrowse embed iframe

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

[Gmod-ajax] jbrowse embed iframe

Philippe Bardou
Hi,

Due to jquery in our website I'm trying to embed JBrowse in an iframe.
It works fine with google-chrome but nothing happens, nothing appears with IE8 and Firefox3.6.6.
Do you have any idea ?

Thanks a lot for your help

Philippe



------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Gmod-ajax mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-ajax
Reply | Threaded
Open this post in threaded view
|

Re: jbrowse embed iframe

Andrew Shinohara-2
Philippe,
    We ran into a similar issue as we are using jQuery in our application as well as JBrowse.  You may not need to embed an iframe.  Take a look at the noConflict method of jQuery:

http://api.jquery.com/jQuery.noConflict/

This allowed us to use jQuery and JBrowse.

-Andrew

On Thu, Jul 1, 2010 at 4:04 AM, Philippe Bardou <[hidden email]> wrote:
Hi,

Due to jquery in our website I'm trying to embed JBrowse in an iframe.
It works fine with google-chrome but nothing happens, nothing appears with IE8 and Firefox3.6.6.
Do you have any idea ?

Thanks a lot for your help

Philippe



------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Gmod-ajax mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-ajax


------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Gmod-ajax mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-ajax
Reply | Threaded
Open this post in threaded view
|

Re: jbrowse embed iframe

Mitch Skinner
On 07/01/2010 06:27 AM, Andrew Shinohara wrote:
> Philippe,
>     We ran into a similar issue as we are using jQuery in our
> application as well as JBrowse.  You may not need to embed an iframe.  
> Take a look at the noConflict method of jQuery:
>
> http://api.jquery.com/jQuery.noConflict/
>
> This allowed us to use jQuery and JBrowse.

Thanks for pointing this out.  I did remove the conflicting $ function
from JBrowse last December in response to Jerome Mariette's comment back
then:

http://github.com/jbrowse/jbrowse/commit/ed13ddeb11dd28137c6d3c3022fe38e42efdf6d1

and I was hoping that would allow jQuery and JBrowse to coexist without
requiring jQuery.noConflict.

Philippe:
> Due to jquery in our website I'm trying to embed JBrowse in an iframe.
> It works fine with google-chrome but nothing happens, nothing appears with IE8 and Firefox3.6.6.
> Do you have any idea ?

Did you try to embed without an iframe?

I do think JBrowse ought to work in an iframe as well; does it work if
you navigate to the page directly (not in an iframe)?  If that works,
then I don't know why it wouldn't work inside an iframe.

Mitch

------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Gmod-ajax mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-ajax
Reply | Threaded
Open this post in threaded view
|

[Gmod-ajax] jbrowse display:none

Philippe Bardou
In reply to this post by Andrew Shinohara-2
Hi all,

I'm trying to include jbrowse in our "rich" web application.
To do that, I need to "display:none" the jbrowse div but some display bugs appear ?

At start I thought that my problem cames from conflict with jquery but finaly not.

<body>
 <span onclick="if(document.getElementById('GenomeBrowser').style.display=='none') {document.getElementById('GenomeBrowser').style.display='block';} else {document.getElementById('GenomeBrowser').style.display='none';}">
 Click Me
 </span>

 <div id="GenomeBrowser" style="display: none; height: 100%; width: 100%; padding: 0; border: 0;"></div>
</body>

If I start without "display: none;" all works fine but it is not what I need...

Hope I'm clear... ?

Thanks for your reply

Philippe

PS : Thanks a lot Andrew and Mich for your previous replies...!
Philippe,
    We ran into a similar issue as we are using jQuery in our application as well as JBrowse.  You may not need to embed an iframe.  Take a look at the noConflict method of jQuery:

http://api.jquery.com/jQuery.noConflict/

This allowed us to use jQuery and JBrowse.

-Andrew

On Thu, Jul 1, 2010 at 4:04 AM, Philippe Bardou <[hidden email]> wrote:
Hi,

Due to jquery in our website I'm trying to embed JBrowse in an iframe.
It works fine with google-chrome but nothing happens, nothing appears with IE8 and Firefox3.6.6.
Do you have any idea ?

Thanks a lot for your help

Philippe



------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Gmod-ajax mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-ajax

------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Gmod-ajax mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-ajax
Reply | Threaded
Open this post in threaded view
|

Re: jbrowse display:none

Mitch Skinner
Hmmm, I hadn't thought about this kind of usage.

When JBrowse starts up, it puts some UI elements on the screen, and it measures how big those are (because some of the layout JBrowse does can't be done, as far as I know, in pure CSS; the JBrowse javascript calculates the positions/sizes of some of the JBrowse UI elements itself).  But if those UI elements aren't displayed, then I would imagine that the results of the size measurements would be wrong, or undefined, or somehow not what JBrowse expects.

I'm speculating; it would be easier to diagnose if you could send me a URL so that I could see what's going on myself.  But, assuming that I'm guessing correctly about what the problem is, then I think the solution is to run the Browser constructor only after the "GenomeBrowser" element has been displayed.

Specifically, somewhere in the page you presumably currently have something like this:

           var b = new Browser({
                                   containerID: "GenomeBrowser",
                                   refSeqs: refSeqs,
                                   trackData: trackInfo,
                                   defaultTracks: "DNA,gene,mRNA,noncodingRNA",
                                   location: queryParams.loc,
                                   tracks: queryParams.tracks,
                                   bookmark: bookmarkCallback
                               });

What you can do is remove that "new Browser" call from its current location on the page, and put in into the onclick handler instead, after you set style.display='block'.

I'm not sure what would happen if the JBrowse element is displayed, then hidden, then displayed again; you might have to remove the element from the page entirely and then recreate it when you want it to be shown again.  In other words, bad things will probably happen if you run the Browser constructor more than once with the same element as the container, but you should be safe if you remove and recreate that element before you run the Browser constructor again.

Hope this helps,
Mitch

On 07/01/2010 07:44 AM, Philippe Bardou wrote:
Hi all,

I'm trying to include jbrowse in our "rich" web application.
To do that, I need to "display:none" the jbrowse div but some display bugs appear ?

At start I thought that my problem cames from conflict with jquery but finaly not.

<body>
 <span onclick="if(document.getElementById('GenomeBrowser').style.display=='none') {document.getElementById('GenomeBrowser').style.display='block';} else {document.getElementById('GenomeBrowser').style.display='none';}">
 Click Me
 </span>

 <div id="GenomeBrowser" style="display: none; height: 100%; width: 100%; padding: 0; border: 0;"></div>
</body>

If I start without "display: none;" all works fine but it is not what I need...

Hope I'm clear... ?

Thanks for your reply

Philippe

PS : Thanks a lot Andrew and Mich for your previous replies...!
  
Philippe,
    We ran into a similar issue as we are using jQuery in our application as well as JBrowse.  You may not need to embed an iframe.  Take a look at the noConflict method of jQuery:

http://api.jquery.com/jQuery.noConflict/

This allowed us to use jQuery and JBrowse.

-Andrew

On Thu, Jul 1, 2010 at 4:04 AM, Philippe Bardou <[hidden email]> wrote:
Hi,

Due to jquery in our website I'm trying to embed JBrowse in an iframe.
It works fine with google-chrome but nothing happens, nothing appears with IE8 and Firefox3.6.6.
Do you have any idea ?

Thanks a lot for your help

Philippe



------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Gmod-ajax mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-ajax
------------------------------------------------------------------------------ This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________ Gmod-ajax mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gmod-ajax


------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Gmod-ajax mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-ajax