"go to page" link broken
Post new topic  Reply to topic
 Page 1 of 1  [3 posts]   

Offline

Site Rank: Moderator

Moderator

User avatar


Joined: Wed Mar 04, 2009 12:22 am
Posts: 752
Location: Kenneth City, FL

 Profile

 Post subject: "go to page" link broken

Post Posted: Mon Jul 26, 2010 6:24 am 

 


In a thread with more than one page, if I click the "Go to Page" link which makes a Javascript confirmation box pop up and ask me for a page number and enter a number, it takes me to a 404 File not found error.

For instance, the link I should be directed to:
general-health/floridian-sunburn-kit-t429-15.html

Where it actually sends me:
general-health/floridian-sunburn-kit-t429.html&start=15


I looked into it, in "overall_header.html", there should be a "jumpto()" Javascript function towards the top. This is about what it should look like.

Code:
function jumpto()
{
   var page = prompt('{LA_JUMP_PAGE}:', '{ON_PAGE}');
   var per_page = '{PER_PAGE}';
   var base_url = '{A_BASE_URL}';

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


My guess is that the HP version is missing this part.

Code:
if (base_url.indexOf('?') == -1)
      {
         document.location.href = base_url + '?start=' + ((page - 1) * per_page);
      }


:D


Healthy

Online

Sponsored Ad


Joined: Fri Oct 19, 2008 6:19 pm
Posts: ?
Location: Tacoma, Washington

 Post subject: "go to page" link broken

PostPosted: Mon Jul 26, 2010 6:24 am 




Offline

Site Rank: Site Admin

Site Admin

User avatar


Joined: Thu Sep 18, 2008 9:01 pm
Posts: 1437
Location: Tacoma, Washington

 Profile

 Post subject: Re: "go to page" link broken

Post Posted: Tue Jul 27, 2010 9:41 am 

 


Thank you for pointing out this problem! I had no idea the "go to page" wasn't working properly. Also thank you for taking the time to figure out what the problem was... you you were right! I fixed the code and now it should be working. I have no idea why that piece of code was missing in the overall_header file, but it is okay now! :)


Offline

Site Rank: Moderator

Moderator

User avatar


Joined: Wed Mar 04, 2009 12:22 am
Posts: 752
Location: Kenneth City, FL

 Profile

 Post subject: Re: "go to page" link broken

Post Posted: Tue Jul 27, 2010 1:41 pm 

 


I don't feel right pointing issues like this out without offering some sort of input if it's something I know about. :)


Sort by  

Post new topic  Reply to topic
 Page 1 of 1  [3 posts] 
 


Users browsing this forum: No registered users and 1 guest



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:

Jump to:  


HOME » General Topics and Feedback » Suggestions / Feedback » "go to page" link broken


cron

Powered by phpBB
cron