...

View Full Version : Firefox/IE errors



Navigator
11-24-2008, 02:46 AM
I have a code for my paginator that allows users to just type a page number to go to. (below)



function pgntr_jump_to_page()
{
var max_pages = document.getElementById('max_pages');
var pgntr_url = document.getElementById('pgntr_url');
var set_pages = document.getElementById('pgntr_set');

if(set_pages.value <= max_pages.value && set_pages.value > 0)
{
document.location = pgntr_url.value + set_pages.value;
document.getElementById('pagei_jump_box').style.display = 'none';
}
else
{
var a = confirm("The page number you entered is invalid, it must be between 0 and " + max_pages.value);

if(a == false)
{
document.getElementById('pagei_jump_box').style.display = 'none';
}
}
}


This issues are as follows:

IE: In internet explorer the code works up to one point when you actually check that the number is valid. If it's less than 0 it works and displays the confirmation box, but if it's greater than the max number of pages it will take you to that page still. I don't get that little "error" symbol on the bottom left. So the code is right in syntax, just not how I want it to work.

Fire Fox: The issue with fire fox is that when you click "Go" on the pop-up id does nothing, no redirection, no confirmation box. I am guess that has to do with the document.getElementById things.

I am not sure how to fix these errors, I have been at it for the past two or more hours.

abduraooft
11-24-2008, 06:23 AM
We need your html also to test the code at our end. Or a link would be better.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum