Jump to content

Recommended Posts

Hi all,,

erfff,, an other compatibility problem between navigators,... it seems the method 'window.moveBy' doesn't work with Opera,

Any tips/links/comments about,... I've searched on yahoo/google but most of the answers/topics are not relevant, or are in german... :)

Thanks in advance,,

l8tr,,
Link to comment
https://forums.phpfreaks.com/topic/8876-windowmoveby-method-problem-with-opera/
Share on other sites

I've fixed that one,,
[!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]
if (browser.isIE) // IE & not supported by Opera
{
x = window.event.clientX + document.documentElement.scrollLeft+ document.body.scrollLeft;
y = window.event.clientY + document.documentElement.scrollTop+ document.body.scrollTop;
}
else // some other browsers
{
x = event.clientX + [b]window.scrollX[/b]; // not supported too by Opera
y = event.clientY + [b]window.scrollY[/b];
}
[/quote]
At this point & using Opera, x & y values are still not numbers value,... lines needed:
[!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]
// lines to add for Opera:
if (isNaN(x)) // opera
{
x= event.clientX;
y= event.clientY;
}
[/quote]
& window.moveBy now works with Opera,, :)

solved,,
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.