shage Posted September 22, 2007 Share Posted September 22, 2007 anyone know why the page dont change when using onchange in firefox but works perfect in ie. Thank you <select id = "program" onChange = "ChangeProgram(this.options(this.selectedIndex).value)"> Quote Link to comment https://forums.phpfreaks.com/topic/70234-solved-firefox/ Share on other sites More sharing options...
shage Posted September 22, 2007 Author Share Posted September 22, 2007 <script language="javascript"> <!-- var old_code = 'pps'; function ChangeProgram(code) { var aSpans = document.body.all.tags("span"); for (i=0; i< aSpans.length; i++){ aSpans(i).innerText = aSpans(i).innerText.replace(old_code,code); } old_code = code; } var old_limit = 'core=h'; function ChangeLimit(limit) { var aSpans = document.body.all.tags("span"); for (i=0; i< aSpans.length; i++){ aSpans(i).innerText = aSpans(i).innerText.replace(old_limit,limit); } old_limit = limit; } //--> </script><style type="text/css"> <!-- body { margin-top: 0px; } --> </style> <table> <tr> <td align ="center" height = "20" class = "program" colspan = "2"> Select the program you want to promote (Default is Active Console): <select id = "program" onChange = "ChangeProgram(this.options(this.selectedIndex).value)"> <option value = "cfree" SELECTED>chickens</option> <option value = "pps">peoples</option> <option value = "revs">religon</option> <option value = "revscf">religon crazy</option> <option value = "pps2">people 2 people</option> </select> </td> </tr> <tr> <td align ="center" height = "20"> </td> </tr> <tr> <td align ="center" height = "20" class = "program" colspan = "2"> Select the picture type you want to use (Default is Hardcore): <select id = "program" onChange = "ChangeLimit(this.options(this.selectedIndex).value)"> <option value = "core=h" SELECTED>Happy pictures</option> <option value = "core=s">Silly pictures</option> </select> </td> </tr> <tr> <td align ="center" height = "20"> </td> </tr> <?php $acct_id = $_SERVER[REMOTE_USER]; //read only active sites $handle = @fopen("../../ondeck/sites.txt", "r"); if ($handle) { while (!feof($handle)) { $buffer = fgets($handle); $buffer = trim($buffer); list($status, $sitename) = explode("/",$buffer); if($status == 'active'){ $active_sites[] = $sitename; } } fclose($handle); } sort($active_sites); foreach ( $active_sites as $site) { $site = str_replace('_','',$site); echo('<tr><td><font size = "2"><b>'. strtoupper($site) . '</b></font></td><td>'); echo('<img src = "images/feed-icon-12x12.jpg"> <span class = "textformat">http://www.' . $site . '.com/blog/wp-rss2.php?rage=' . $acct_id . '&core=h&style=pps</span>'); echo('</td></tr>'); } ?> </table> This is the whole code but dont understand why the options dont change when you pick them in firefox but works perfect in ie Quote Link to comment https://forums.phpfreaks.com/topic/70234-solved-firefox/#findComment-352758 Share on other sites More sharing options...
cooldude832 Posted September 22, 2007 Share Posted September 22, 2007 Just out of curiosity did u read what this forum is for, PHP PROBLEMS. You post javascript, move to a javascript fourm Quote Link to comment https://forums.phpfreaks.com/topic/70234-solved-firefox/#findComment-352767 Share on other sites More sharing options...
shage Posted September 22, 2007 Author Share Posted September 22, 2007 ahh its a js problem my bad dont have to be a smartass Quote Link to comment https://forums.phpfreaks.com/topic/70234-solved-firefox/#findComment-352768 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.