| | |||||
| ||||||||
| Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics. |
![]() |
| | LinkBack | Thread Tools |
| | THREAD STARTER #1 (permalink) |
| Senior Member Join Date: Jul 2004
Posts: 1,381
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | Question on this (works in IE not FF) Hey guys, The following PHP coding is for a dropdown box type deal, however when you select something from the dropdown, it goes no where in FireFox. Yet in IE it does like it is supposed to. Code: if($number){
$pages_count = @ceil($count_all/$number);
$pages_start_from = 0;
$pages = "<select class=\"cn-pagedrop\" name=\"gotopage\" onchange=\"window.location.href = document.all.gotopage.value;\">";
$currentpage = $start_from / $number + 1;
for($j=1;$j<=$pages_count;$j++){
if ($currentpage == $j) { $pages .= "<option selected value=\"$PHP_SELF?start_from=$pages_start_from&ucat=$ucat&archive=$url_archive&subaction=$subaction&id=$id&page=$j&$user_query\">$j</option> "; }
else { $pages .= "<option value=\"$PHP_SELF?start_from=$pages_start_from&ucat=$ucat&archive=$url_archive&subaction=$subaction&id=$id&page=$j&$user_query\">$j</option> "; }
$pages_start_from += $number;
}
$pages .= "</select>";
$prev_next_msg = str_replace("{pages-dropdown}", $pages, $prev_next_msg);
} |
| |
| | #2 (permalink) |
| NamePros Regular Join Date: Oct 2003 Location: Sweden
Posts: 395
![]() ![]() | Change "document.all.gotopage.value;" to "this.value;" and it should work. Actually what you have now should work, if you haven't set a doctype saying you are writing a standardized webpage (the document.all-method is an IE idea). But you should try to use correct semantics and keep to web standards. The document.getElementById-method would then be the correct replacement for document.all, but now you dont need it as you are referring to the very same element. |
| |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Not at trick question | Coastalguy | The Break Room | 5 | 05-04-2005 04:22 PM |
| Quick question... | kektex | Domain Newbies | 1 | 03-31-2005 01:24 PM |
| little question.. | khkhan | Domain Appraisals | 2 | 11-20-2004 04:28 AM |
| media player works perfect on PC but not Mac ?? | josmets | Graphic Design / Flash | 0 | 10-19-2003 10:41 PM |