| |
| |
|
|
|
|
| |
|
| |
|
| :: |
| Author |
Message |
IPB_Refugee

Joined: 24 Jul 2008 Posts: 41
|
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

Joined: 28 Apr 2006 Posts: 14854
|
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 |
|
 |
IPB_Refugee

Joined: 24 Jul 2008 Posts: 41
|
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

Joined: 28 Apr 2006 Posts: 14854
|
|
| Back to top |
|
 |
|
| Navigation |
Similar Topics |
|
|
|
|
|
|
|
| |
|
|
|
|
| |
|
|
|
|
| |