NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Programming
Reload this Page Question on this (works in IE not FF)

Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics.

Advanced Search
3 members in live chat ~  


Closed Thread
 
LinkBack Thread Tools
Old 06-18-2005, 07:46 PM THREAD STARTER               #1 (permalink)
Senior Member
 
Ringr's Avatar
Join Date: Jul 2004
Posts: 1,381
Ringr is a splendid one to beholdRingr is a splendid one to beholdRingr is a splendid one to beholdRingr is a splendid one to beholdRingr is a splendid one to beholdRingr is a splendid one to beholdRingr is a splendid one to beholdRingr is a splendid one to behold
 



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&amp;ucat=$ucat&amp;archive=$url_archive&amp;subaction=$subaction&amp;id=$id&amp;page=$j&amp;$user_query\">$j</option> "; }
 else { $pages .= "<option value=\"$PHP_SELF?start_from=$pages_start_from&amp;ucat=$ucat&amp;archive=$url_archive&amp;subaction=$subaction&amp;id=$id&amp;page=$j&amp;$user_query\">$j</option> "; }      
        $pages_start_from += $number;
    }
    $pages .= "</select>";
    $prev_next_msg = str_replace("{pages-dropdown}", $pages, $prev_next_msg);
   }
What can be changed so it will work in FF too, not just IE?
Ringr is offline  
Old 06-19-2005, 06:06 AM   #2 (permalink)
NamePros Regular
Join Date: Oct 2003
Location: Sweden
Posts: 395
cerebus has a spectacular aura aboutcerebus has a spectacular aura about
 


Animal Rescue Wildlife Animal Cruelty
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.
cerebus is offline  
Closed Thread


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

 
All times are GMT -7. The time now is 12:32 PM.

Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger