Deprecated: Function set_magic_quotes_runtime() is deprecated in /home4/mfoster/public_html/cb/forums/include/common.php on line 62

Warning: Cannot modify header information - headers already sent by (output started at /home4/mfoster/public_html/cb/forums/include/common.php:62) in /home4/mfoster/public_html/cb/forums/header.php on line 31

Warning: Cannot modify header information - headers already sent by (output started at /home4/mfoster/public_html/cb/forums/include/common.php:62) in /home4/mfoster/public_html/cb/forums/header.php on line 32

Warning: Cannot modify header information - headers already sent by (output started at /home4/mfoster/public_html/cb/forums/include/common.php:62) in /home4/mfoster/public_html/cb/forums/header.php on line 33

Warning: Cannot modify header information - headers already sent by (output started at /home4/mfoster/public_html/cb/forums/include/common.php:62) in /home4/mfoster/public_html/cb/forums/header.php on line 34
Cross-Browser.com / How add a new button on title bar ?

Cross-Browser.com

X Library Forums

You are not logged in.

Announcement

New user registration is currently disabled.

#1 March 11, 2011 5:01:05 pm

lovelybh
Member
Registered: March 31, 2009
Posts: 23

How add a new button on title bar ?

Hello MikeFoster

Long time no see. How's it going?
I come back here again to say hello.

Now I'm try to apply "xFenster rev 20" to my site.
There are so many changes compare withe rev 19, aren't it?
I had to add and edit some part of script. (I don't know that is correct or not. but no errors big_smile)

I have a question.
There are onClick event in rev20. xFenster.paintAll(),xFenster.showAll(),xFenster.hideAll()...
I want to insert that button on title bar.

like this,
title bar ---------------------------------------------------
(showAll) (hideAll) ... (minimize) (maximize) (close)
-------------------------------------------------------------

How add a new button on title bar?

Last edited by lovelybh (March 11, 2011 5:02:47 pm)

Offline

 

#2 March 12, 2011 3:51:18 pm

MikeFoster
Administrator
From: Alabama, USA
Registered: April 27, 2007
Posts: 874
Website

Re: How add a new button on title bar ?

Hi lovelybh, it's great to hear from you!

Take a look at this demo where I'm experimenting with an xFenster control menu.

Search for "r21" in "xfenster21.js" to see how I added the new button to the title bar.

Thanks!

Offline

 

#3 March 13, 2011 10:05:05 am

lovelybh
Member
Registered: March 31, 2009
Posts: 23

Re: How add a new button on title bar ?

'xFenster control menu' that is what I want. big_smile

It is pretty good. But I can not click 'Sub Menu div'.
I changed conBor element. ('0' -> '1') then It disappear so quickly. I think there are double effect of drag event and onMouseout event.

Thanks!

Offline

 

#4 March 13, 2011 10:30:06 am

MikeFoster
Administrator
From: Alabama, USA
Registered: April 27, 2007
Posts: 874
Website

Re: How add a new button on title bar ?

What browser/OS are you using? There are still some small issues that need to be worked out, but overall it works for me in FireFox, Chrome, Safari, Opera, IE7 and IE8 (all on WinXP-SP3). I will experiment with it to maybe improve the code that determines when to close the menu.

Offline

 

#5 March 13, 2011 11:40:57 am

lovelybh
Member
Registered: March 31, 2009
Posts: 23

Re: How add a new button on title bar ?

I use Windows7, IE8.

If the code is fine, it would be a problem of iframe contents. I tested r21 on iframe mode.
When time permits, upgrade r21 perfectly plz.

I'm ever appreciative of all that you are doing for us.
Thanks Mike Foster !!!

Offline

 

#6 March 13, 2011 1:27:19 pm

lovelybh
Member
Registered: March 31, 2009
Posts: 23

Re: How add a new button on title bar ?

how to refresh iframe on r21 iframe mode ?

  xFenster._refreshwin = function(xf)
  {
    xf.cli.contentWindow.location.reload();
  }

It is not working on my local computer.

Error : no authentication

Last edited by lovelybh (March 13, 2011 1:38:48 pm)

Offline

 

#7 March 13, 2011 1:28:36 pm

MikeFoster
Administrator
From: Alabama, USA
Registered: April 27, 2007
Posts: 874
Website

Re: How add a new button on title bar ?

I think I realize what the problem is - your comment on iframes was the clue. The problem occurs when iframe content is visible to the left or above the menu. I've improved the positioning, so maybe this situation will not occur. If that doesn't completely fix it I could show the "mask" any time the menu is shown - that might be the best thing to do anyhow.

thanks! smile

[edit]
I posted this before I saw your previous post.
[/edit]

Last edited by MikeFoster (March 13, 2011 1:30:15 pm)

Offline

 

#8 March 13, 2011 2:17:02 pm

MikeFoster
Administrator
From: Alabama, USA
Registered: April 27, 2007
Posts: 874
Website

Re: How add a new button on title bar ?

If the src of the iframe is from a different domain than the main page, then you will not be able to access the iframe's document from outside the iframe. This is part of the browser's security model.

Offline

 

#9 March 13, 2011 2:37:23 pm

lovelybh
Member
Registered: March 31, 2009
Posts: 23

Re: How add a new button on title bar ?

So I edit like this,

  xFenster._refreshwin = function(xf)
  {
      var rurl = xf.sB.innerHTML;
      xf.cli.contentWindow.location.href = rurl;
  };

put the url in the sB, and reload it... that is fine?

Offline

 

#10 March 13, 2011 3:05:41 pm

MikeFoster
Administrator
From: Alabama, USA
Registered: April 27, 2007
Posts: 874
Website

Re: How add a new button on title bar ?

Do the URLs for the main page and the iframe have the same domain? If not, then Js from the main page cannot access Js objects in the iframe. It is the browser's security policy.

Offline

 

Board footer

Powered by PunBB 1.2.15
Copyright © 2002–2005 Rickard Andersson

Expand Restore Select Format Eval Load