phpBB SEO
Boards
Directory  
SEO  
Downloads
  phpBB SEO : Search Engine Optimization, Directory, Forums  
Index
Forums
Annuaire
Référencement
Télécharger
 
  Search Rechercher
    Register
Username :  Password :  Log me on automatically each visit  
S'enregistrer  
 
   
Minor mistake in function jumpto()

 
Post new topic   Reply to topic    phpBB SEO » SEO Forum  » phpBB3 mod Rewrite  » Advanced SEO URL
::  
Author Message
IPB_Refugee



Joined: 24 Jul 2008
Posts: 41

Minor mistake in function jumpto()Posted: Sun Aug 03, 2008 6:59 pm    Post subject: Minor mistake in function jumpto()

Hello,

in function jumpto() you repeatedly use document.location.href

But location is not an object of document - it's an object of window.

Objects of "document":

Quote:
HTML elements
node
all
anchors
applets
forms
images
layers
links


Objects of "window":

Quote:
document
event
history
location


So I think it should be window.location.href instead of document.location.href

Regards
Wolfgang
Back to top
dcz
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 28 Apr 2006
Posts: 14854

Minor mistake in function jumpto()Posted: Mon Aug 04, 2008 9:16 am    Post subject: Re: Minor mistake in function jumpto()

Here, I just followed the way it was done for phpBB.
Here the original cod for jumpto() :
Code:
/**
* Jump to page
*/
function jumpto()
{
   var page = prompt(jump_page, on_page);

   if (page !== null && !isNaN(page) && page > 0)
   {
      document.location.href = base_url.replace(/&/g, '&') + '&start=' + ((page - 1) * per_page);
   }
}


The js I end up with may not be the prettiest, since I'm not as good with js as I am with php, but it works.

++

_________________
Useful links :
SEO Forum || SEO Directory || SEO phpBB || SEO phpBB3 || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Référencement phpBB3 || Recherche
Back to top
Visit poster's website
IPB_Refugee



Joined: 24 Jul 2008
Posts: 41

Minor mistake in function jumpto()Posted: Mon Aug 04, 2008 5:29 pm    Post subject: Re: Minor mistake in function jumpto()

Oh yes, it works indeed. I will report this issue to phpBB.com's bug tracker within the next few days.

Regards
Wolfgang

Done: phpbb.com/bugs/phpbb3/ticket.php?ticket_id=31655
Back to top
dcz
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 28 Apr 2006
Posts: 14854

Minor mistake in function jumpto()Posted: Wed Aug 06, 2008 8:07 am    Post subject: Re: Minor mistake in function jumpto()

hehe, if they do not fix it, we will in next release Wink

_________________
Useful links :
SEO Forum || SEO Directory || SEO phpBB || SEO phpBB3 || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Référencement phpBB3 || Recherche
Back to top
Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    phpBB SEO » SEO Forum  » phpBB3 mod Rewrite  » Advanced SEO URL
Page 1 of 1

Navigation Similar Topics

Jump to: