Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Senior Coder
    Join Date
    May 2006
    Posts
    1,683
    Thanks
    28
    Thanked 4 Times in 4 Posts

    Why the difference - No not betweeen IE and FF !

    Hi

    Veiwing in Moz FF or IE I get the same problem.

    On my website I use js to hide an info box on start up and reveal only on a mouse-over.

    This works fine on some pages - but doesn't on others even though I am sure that the code is identical

    Can anyone spot what I have done wrong ?

    The pages are live on :
    http://www.yodbod.com/ad_manager_a.php

    If you just click on the top GO (ie with "Local Services" already selected) you will see that the READ THIS info box is hidden until you roll over it.

    BUT
    if you select "Cars Bikes & Boats" section (instead of "Local Services" )
    you see that the info box is visable on loading - and wrecking the page cos no-one will guess that you need to roll on and off the READ THIS label.

    Both "start" functions appear to be the same and yet they behave differently - please help

    Thanks
    Last edited by jeddi; 11-01-2006 at 12:12 PM.
    If you want to attract and keep more clients, then offer great customer support.

    Support-Focus.com. automates the process and gives you a trust seal to place on your website.
    I recommend that you at least take the 30 day free trial.

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    Seems like you have some php on your page that is doing something. We would need to see the php code.
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #3
    Senior Coder
    Join Date
    May 2006
    Posts
    1,683
    Thanks
    28
    Thanked 4 Times in 4 Posts
    Thanks for looking

    Well, I have now put all the functions into an external file.
    This means that they definitely use the same functions.

    BUT I still get the same problem

    Here are the functions: ( the others are clearly in the source )

    From functions1.js

    Code:
    function show_tip1(targetID) { 
        document.getElementById(targetID).style.visibility = "visible"; 
    }  // end of function
    
    function show_part(targetID) { 
        document.getElementById(targetID).style.visibility = "visible"; 
    }  // end of function
    
    function show_tip2(targetID) { 
        document.getElementById(targetID).style.visibility = "visible"; 
    }  // end of function
    
    function show_agent() { 
        document.getElementById('agent').style.visibility = "visible";
    		document.getElementById('layer2').style.visibility = "hidden";		
    }  // end of function
    
    function hide_agent() { 
    		document.getElementById('layer2').style.visibility = "visible";
        document.getElementById('agent').style.visibility = "hidden";	
    }  // end of function
    
    function show_offwant() { 
        document.getElementById('offwant').style.visibility = "visible";
    }  // end of function
    
    function hide_offwant() { 
        document.getElementById('offwant').style.visibility = "hidden";
    }  // end of function
    
    function show_read() { 
        document.getElementById('read').style.visibility = "visible";
    		document.getElementById('layer1').style.visibility = "hidden";
    }  // end of function
    
    function hide_read() { 
        document.getElementById('read').style.visibility = "hidden";
    		document.getElementById('layer1').style.visibility = "visible";
    }  // end of function
    
    function show_layer2(targetID) {
        document.getElementById(targetID).style.visibility = "visible";
        document.getElementById('layer3').style.visibility = "visible";
    		document.getElementById('readThis').style.visibility = "hidden";
    		document.getElementById('theTips1').style.visibility = "hidden";
    		document.getElementById('theTips2').style.visibility = "hidden";
    		document.getElementById('layer1').style.visibility = "hidden";
    		document.getElementById('part').style.visibility = "hidden";  
    		document.getElementById('ow').style.visibility = "hidden";
    }  // end of function
    
    function start(){
    document.getElementById('layer1').style.visibility = "visible";
    document.getElementById('readThis').style.visibility = "visible";
    document.getElementById('layer2').style.visibility = "hidden";
    document.getElementById('layer3').style.visibility = "hidden";
    document.getElementById('theTips1').style.visibility = "hidden";
    document.getElementById('theTips2').style.visibility = "hidden";
    document.getElementById('part').style.visibility = "hidden";
    document.getElementById('agent').style.visibility = "hidden";
    document.getElementById('offwant').style.visibility = "hidden";
    document.getElementById('read').style.visibility = "hidden";
    document.main_fm.x_area_cd.focus()
    }  // end of function


    So - maybe its the php ?

    Here is the php script for the problem page:
    (It's a bit long )

    PHP Code:
    <?php 
    /*
    *  motors_add_fm.php
    *
    * Called by : motors_add.php
    *
    *  
    *   FORM for add an advert to motors table.
    *
    */
    $area = array( 
         
    "a"=>'Central',
             
    "b"=>'North',
             
    "c"=>'East',
                
    "d"=>'South',
                
    "e"=>'West'
                
    );

    $off_want = array( 
          
    "o"=>'Offered',
                
    "w"=>'Wanted'
          
    );    
                                 
    $cat = array(
             
    "a" =>  'Saloon',
             
    "b" =>  'Hatchback',
             
    "c" =>  'Estate',
             
    "d" =>  '4 x 4',
             
    "e" =>  'P carrier',
             
    "f" =>  'Minibus',
             
    "g" =>  'Vans',
             
    "h" =>  'Other com',
             
    "i" =>  'Caravans',
             
    "j" =>  'Motorbike',
             
    "k" =>  'Mopeds',
             
    "l" =>  'Quads',
             
    "m" =>  'M. Boats'
             
    );

    $Dprice_cd = array(
                     
    "a" => ' o.n.o.',
                     
    "b" => ' o.v.n.o.',
                     
    "c" => ' no offers',
                     
    "d" => ' each',
                     
    "e" => ' the lot',
                     
    "f" => ' '                                   
                      
    );     
    ?>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <!-- Thank you for showing an interest in this source code -->
    <!-- Copyright Notice: copyright 2005 yodbod.com.  -->
    <!-- All the scripts and layouts are copyright material. -->
    <!--  No part of this website may be copied in anyway whatsoever. -->
    <!-- If you would like similar programming work performed, please use the "Contact Us" form. -->

    <head>
    <title>Yodbod.com - Adding a new advert</title>

    <script type="text/javascript" src="functions1.js"> </script>

    <script type="text/javascript">
    <!--
    function chk_length(){
    limit1= 1500
    document.main_fm.opt_lg_count.value=(limit1-document.main_fm.x_desc_lng.value.length)+' characters free'
    document.main_fm.x_loc_sht.value=document.main_fm.x_loc_sht.value.replace(/^\s*(.)/, document.main_fm.x_loc_sht.value.match(/^\s*(.)/)[1].toUpperCase())
    document.main_fm.x_post_cd1.value=document.main_fm.x_post_cd1.value.toUpperCase()
    document.main_fm.x_post_cd2.value=document.main_fm.x_post_cd2.value.toUpperCase()
    document.main_fm.x_model.value= document.main_fm.x_model.value.replace(/^\s*(.)/, document.main_fm.x_model.value.match(/^\s*(.)/)[1].toUpperCase())
    document.main_fm.x_desc_lng.value=document.main_fm.x_desc_lng.value.replace(/^\s*(.)/, document.main_fm.x_desc_lng.value.match(/^\s*(.)/)[1].toUpperCase())
    document.main_fm.x_comp.value=document.main_fm.x_comp.value.replace(/^\s*(.)/, document.main_fm.x_comp.value.match(/^\s*(.)/)[1].toUpperCase())
    document.main_fm.x_contact.value=document.main_fm.x_contact.value.replace(/^\s*(.)/, document.main_fm.x_contact.value.match(/^\s*(.)/)[1].toUpperCase())

     if(document.main_fm.x_desc_lng.value.length>limit1){
      document.main_fm.x_desc_lng.value=document.main_fm.x_desc_lng.value.substring(0,limit1)
        } // end if
    }  // end of function

    document.onkeyup=chk_length
    // -->
    </script>

    <!-- Using a linked stylesheet -->
    <link rel="STYLESHEET" type="text/css" href="/yodbod.css">

    </head>
    <body onLoad="start();" bgcolor="#ccffff" >
    <img alt="header (13K)" src="/flashtest1.jpg" height="130" width="920" >

    <?php 

    include("Letter_yod.inc");

    $connection mysql_connect($host,$user,$password)  
    or die (
    "Couldn't connect to server.");
    $db mysql_select_db($database$connection)
    or die (
    "Couldn't select database.");    

    if (
    $mess == "yes") {
         echo
    "
         <div class = 'comments' style='width:130px; position:absolute;left:20px; top:200px; color:red; font-size:14px;font-weight:bold;'>
         <blink>ERROR!</blink><BR><BR>
         <span style='font-size:12px;'>$message1<BR><BR>$message2<BR><BR>$message3</span>
         </div> "
    ;
         } 
    // endif
    ?>
    <div class = "heading" style='font-weight:bold;' >
    Posting your advert to the Cars Bikes & Boats Section in <?php echo "$N_city"?>.
    </div>

    <div id="readThis" style='width:100px;position:absolute;left:200px; top:190px;'>
    <span class='head1' style="text-align:center;text-decoration:underline;color:red;" onmouseover="show_read()" onmouseout="hide_read()">READ THIS</span>
    </div>

    <div id="theTips1" class = "tips" style='width:200px;position:absolute;left:700px; top:290px;'>
    e.g. Wood Green. or Camden. <br>
    If outside <?php echo "$N_city"?> enter town and county<br>
    e.g. Harlow, Essex.
    </div>

    <div id="part" class = "tips" style='width:150px;position:absolute;left:505px; top:343px;' >
    Part one and Part two
    </div>

    <div id="theTips2"  class = "tips" style='width:470px;position:absolute;left:20px; top:480px;'>
    <b>Writing your ad.</b> <br>
    Write as much as you can - the more you write the better your advert will look. Your format will be kept;
     so you can use the enter key to make seperate paragraphs to build an attractive advert.<br>
    <br>
    Your first sentences will be displayed in the listing as well as on your main advert so 
    make these first sentences interesting and inviting.
    <br><br>
    <b>What to write ?</b><br>
    <b>Basic information: </b> Year of manufacture, Colour, Registraion number, Milage, MOT, Tax.<br>
    Good to mention all the nice points even if they are standard because your potential buyers want to know
    what you have. Eg electric windows, heated seats, leather trim, big boot - transfer these into benefits how e.g. 
    takes tons of luggage in the roomy boot. Keep nice and warm with the heated seats.<br>
    <b>Extras:</b> Any additions that you are including and put the value e.g. alloy wheeels (cost£400), tow bar installed worth £ 200.
    Sony stereo £ 350. Full Service history. <br><b>Contact</b> - name and phone numbers.
    <br><br>
    <b>Note:</b> <br>
    We do not recommend putting your email address. The yodbod message service is 
    automatically placed on your advert and is free - it protects you from getting any spam. 
    <br>
    </div>

    <form name="main_fm" action ='motors_add.php' method = 'POST'>
    <input type="hidden" name="run_mn" value="yes" >

    <input type='hidden' name='x_city' value= <?php echo "$N_city"?> >
    <input type='hidden' name='section' value= <?php echo "$section"?> >

    <input type='hidden' name='x_email' value= "<?php echo "$N_email"?>" >
    <input type='hidden' name='x_pass' value= "<?php echo "$N_pass"?>" >
    <input type='hidden' name='client_status' value= "<?php echo "$client_status"?>" >

    <!-- START OF LAYER 1  -->
    <div id = 'layer1'>

    <div class = 'data' style='width:300;position:absolute;left:200px; top:220px;' >
    Select area of <?php echo "$N_city"?>
    </div>


    <div style='width:150;position:absolute;left:500px; top:220px;' >
    <select name="x_area_cd">
    <?php
    foreach($area as $field => $value){

         if (
    $N_area_cd == $field){
                 echo 
    "
                 <option value = {$field} selected= \"selected\" >$value </option>"
    ;
                 }
    // endif
         
    else {
                  echo 
    "<option value = {$field}>$value</option>";
                 }
    // end else
    }// end for loop             
    ?>
    </select></center> 
    </div>

    <div style='width:100px;position:absolute;left:685px; top:220px;' >
    <select name="x_ow">
    <?php
    foreach($off_want as $field => $value){

       if (
    $N_ow == $field){
                 echo 
    "
                 <option value = {$field} selected= \"selected\" >$value </option>"
    ;
                 }
    // endif
         
    else {
                  echo 
    "<option value = {$field}>$value</option>";
                 }
    // end else
    }// end for loop             
    ?>
    </select>
    </div>

    <div class = 'data' style='width:300px;position:absolute;left:200px; top:260px;' >
    Enter the town or borough.
    </div>

    <div style='width:300px;position:absolute;left:500px; top:260px;' >
    <input id = "loc" type="TEXT" name="x_loc_sht" value = "<?php echo $N_loc_sht ?>"
      size = '40' maxlength='40' onfocus ="show_tip1('theTips1')" >
    </div>

    <div class = 'data' style='width:200px;position:absolute;left:200px; top:320px;' >
    Full Post Code:<br>
    <span style="font-weight:normal;">(to activate the map software)</span>
    </div>

    <div style='width:200px;position:absolute;left:500px; top:320px;' >
    <input type='TEXT' name='x_post_cd1' value = "<?php echo $N_post_cd1 ?>"
      size = '5' maxlength='4' onfocus ="show_part('part')" >
    <input type='TEXT' name='x_post_cd2' value = "<?php echo $N_post_cd2 ?>"
      size = '5' maxlength='3'  onfocus ="show_part('part')" >
    </div>

    <div class = 'data' style='width:300px;position:absolute;left:200px; top:370px;' >
    Select category.
    </div>

    <div style='width:200px;position:absolute;left:500px; top:370px;' >
    <select name="x_cat_cd">
    <?php
    foreach($cat as $field => $value){

         if (
    $N_cat_cd == $field){
                 echo 
    "
                 <option value = {$field} selected= \"selected\" >$value </option>"
    ;
                 }
    // endif
         
    else {
                  echo 
    "<option value = {$field}>$value</option>";
                 }
    // end else
    }// end for loop             
    ?>
    </select>
    </div>

    <div class = 'data' style='width:300px;position:absolute;left:200px; top:410px;' >
    Make and Model
    </div>

    <div style='width:300px;position:absolute;left:500px; top:410px;' >
    <input type="TEXT" name="x_model" value = "<?php echo $N_model ?>"
     size = '40' maxlength='40'></td>
    </tr><tr><td class = 'add_col4' >
    </div>


    <div class = 'data' style='width:400px;position:absolute;left:200px; top:460px;' >
    Main description. 
    </div>

    <div style='width:300px;position:absolute;left:500px; top:460px;' >
    <textarea  rows = 16 cols = 50 name='x_desc_lng' onfocus ="show_tip2('theTips2')" >
    <?php echo $N_desc_lng ?></textarea><br>
    <input class = 'form_box'  type='TEXT' name='opt_lg_count' size = '25' >
    </div>

    <div style='width:400px;position:absolute;left:850px; top:740px;' >
    <button type="button" value="" onclick = "show_layer2('layer2')" >Continue</button> 
    </div>
    </div> 

    <!-- END OF LAYER 1  -->

    <!-- START OF LAYER 2  -->
    <div id = 'layer2' style="font-weight:bold">

    <div class = 'data' style='width:200px;position:absolute;left:150px; top:240px;' >
    Price:
    </div>

    <div class = 'data' style='width:300px;position:absolute;left:387px; top:240px;' >
    £ <input type='TEXT' name='x_priceNUM' value = "<?php echo $N_priceNUM ?>"
     size = '10' maxlength='10'>
    </div>

    <div class = 'data' style='width:300px;position:absolute;left:150px; top:280px;' >
    Or near offer ?
    </div>

    <div style='width:300px;position:absolute;left:400px; top:280px;' >
    <select  name="x_price_cd">
    <?php
    foreach($Dprice_cd as $field => $value){

         if (
    $N_price_cd == $field){
                 echo 
    "
                 <option value = {$field} selected= \"selected\" >$value </option>"
    ;
                 }
    // endif
         
    else {
                  echo 
    "<option value = {$field}>$value</option>";
                 }
    // end else
    }// end for loop             
    ?>
    </select></div>

    <div class = 'data' style='width:240px;position:absolute;left:150px; top:320px;' >
    Company name: <br>
    <span class="det1">If you are an estate agency or other company, please 
    enter your Company name. If not please leave as 'Private'.
    </span>
    </div>

    <div style='width:200px;position:absolute;left:400px; top:320px;' >
    <input type='TEXT' name='x_comp' Value = "<?php echo $N_comp ?>"
      size = '30' maxlength='40'>
    </div>

    <div class = 'data' style='width:240px;position:absolute;left:150px; top:410px;' >
    Add pictures ?<br>
    <span class="det1">Photos taken by digital camara or mobile phone can easily be uploaded from your computer.
    It helps make the sale and its free !</span>
    </div>

    <div class = 'data' style='width:350px;position:absolute;left:400px; top:410px;' >
    Yes <input type="radio"  name="rad_pict" value = "y" CHECKED > 
    No <input type="radio"  name="rad_pict" value = "n" >
    </div>

    <div id="hor_bar" style="width:600px; position:absolute;left:50px; top:495px;" ></div>
    <div id="hor_text" style="width:600px; position:absolute;left:50px; top:500px;" >
    <span class = 'data' >Entries below this line are not shown in your advert.</span>
    </div>

    <?php 
    if($master_key == "y"){ 
      echo 
    "
        <div class = 'data' style='position:absolute;left:20px; top:230px;' >
        Feature code:<br>
        <span class='det1'>This ensures that your advert is displayed before the free ones. 
        They are ordered a-z.</span>
        </div>

        <div style='width:200px;position:absolute;left:10px; top:280px;' >
        <input type='TEXT' name='x_opt_feat' Value = '$N_opt_feat'
      size = '5' maxlength='1'>
        </div>"
    ;
      }
    // end if
    else{
      echo 
    "
      <input type='hidden' name='x_opt_feat' value= '' >"
    ;
      } 
    // end else
    ?>

    <?php 
    if($client_status != 'c'){  //  i.e NOT a CONFIRMED on client table
    echo "

    <div class = 'data' style='width:240;font-size:12px;position:absolute;left:150px; top:550px; font-size:14px;' >
    Email Address:<br>
    <span class='det1'>For your security, we will send you an email for you to 
    <b>confirm</b> that you have posted this advert.</span>
    </div>

    <div style='width:300;font-size:12px;position:absolute;left:400px; top:545px;' >
      <input type='TEXT' name='x_email' value = '$N_email'
     size = '25' maxlength='60'>
    </div>

    <div class = 'data' style='width:240px;position:absolute;left:600px; top:550px;' >
    Password:<BR>
    <span class='det1'>You will need this to edit, re-new or delete your advert. 
    Please <b>choose a password</b> for yourself. </span>
    </div>

    <div style='width:350px;position:absolute;left:740px; top:545px;' >
    <input type='password'  name = 'x_pass' size = '20' maxsize ='20'>
    </div>

    <div class = 'data' style='width:240px;position:absolute;left:150px; top:650px;' >
    Your name:<BR>
    <span class='det1'>This must be the name of the person responsible for this advertisment. 
    This will appear in your own
    'My Advertisment Manager' module.</span>
    </div>

    <div style='width:350px;position:absolute;left:400px; top:650px;' >
    <input type='TEXT'  name = 'x_contact' value = '$N_contact' size = '20' maxsize ='20'>
    </div>

    <div class = 'data' style='width:200px;position:absolute;left:500px; top:700px;' >
    <center><input type = 'submit' value='Submit my Advertisment'><br>
    Click Once only.</center>
    </div>"
    ;

      } 
    // endif 
    else {            //  i.e. This is an existing client 
    echo "
    <div class = 'data' style='width:240;font-size:12px;position:absolute;left:150px; top:550px; font-size:14px;' >
    Email Address:<br>
    <span class='det1'>For your security, we will send you an email so that you 
    can confirm that you have posted this advertisement.</span>
    </div>

    <div class = 'data' style='width:300;font-size:12px;position:absolute;left:400px; top:550px;' >
    $N_email
    </div>

    <div class = 'data' style='width:240px;position:absolute;left:600px; top:550px;' >
    Password: <BR>
    <span class='det1'>You are using the password!</span>
    </div>

    <div class = 'data' style='width:240px;position:absolute;left:150px; top:650px;' >
    Your name: <BR>
    <span class='det1'>This must be the name of the person responsible for this advertisment. 
    Used by admin. in case we need to contact you and in your own
    'My Advertisment Manager' module.</span>
    </div>

    <div style='width:350px;position:absolute;left:400px; top:650px;' >
    <input type='TEXT'  name = 'x_contact' value = '$N_contact' size = '20' maxsize ='20'>
    </div>

    <div class = 'data' style='width:200px;position:absolute;left:500px; top:700px;' >
    <input type = 'hidden' name = 'x_email' value = '$N_email'>
    <input type = 'hidden' name = 'x_pass'  value = '$N_pass'>
    <input type = 'hidden' name = 'x_agent' value = '$N_agent'>
    <center><input type = 'submit' value='Submit my Advertisment'><br>
    Click Once only.</center>
    </div>"
    ;
    // end else
    ?>

    <div style='width:200px;position:absolute;left:800px; top:700px;' >
    <button type="button" value='' onclick ="start();">Back to First Screen</button>
    </div>

    </div> <!-- END OF LAYER 2 -->

    <!-- START OF AGENTS LAYER -->

    <div id= 'layer3' style='width:300px; height:220px; text-align:center; background-color: #ffff00;position:absolute;left:680px; top:260px;' >
    <b>For Agents Use.</b><br>
    <span class='det2' style="text-align:center;text-decoration:underline;" onmouseover="show_agent()" onmouseout="hide_agent()">What's this about ?</span>

    <div class = 'data' style='width:240px;position:relative;left:10px; top:20px;' >
    <?php 
    if($client_status != 'c'){  //  i.e NOT a CONFIRMED on client table
    echo "
    Agency name: <input type='TEXT' name='x_agent' value = '$N_agent'
      size = '15' maxlength='40'><br>
    <span class='det1' style='width:250px;' >
    If you are placing this advert for someone, then you are acting as an agent.
    Please enter your name or agency name. If not, leave as 'Non agent'.</span>"
    ;
    }
    else {
    echo 
    "
    Agency name:  $N_agent<br>
    <span class='det1' style='width:250px;' >
    This agency name is linked to your email address.</span>"
    ;
    }
    ?>
    </div>

    <div style='font-weight:normal; width:240px;position:relative;left:10px; top:30px;' > 
    This ad reference: <input type="TEXT" name="x_opt_yr_ref" value = "<?php echo $N_opt_yr_ref ?>"
      size = '15' maxlength='20'>

    <br>
    <span class="det1">If you have several adverts running 
    you may want to use reference numbers. You can use numbers or letters. (optional)</span>
    </div> 
    </div>   <!-- END OF AGENTS LAYER -->

    <?php 
    require_once("a_agent1.php");
    require_once(
    "a_read_me.php");
    ?>


    </form>

    </body>
    </html>
    If you want to attract and keep more clients, then offer great customer support.

    Support-Focus.com. automates the process and gives you a trust seal to place on your website.
    I recommend that you at least take the 30 day free trial.

  • #4
    Senior Coder
    Join Date
    May 2006
    Posts
    1,683
    Thanks
    28
    Thanked 4 Times in 4 Posts
    I have just run all these pages through the validator ...
    ... and they all come out with the green VALIDATED banner

    - so they should all behave the same ... but they don't

    Can anyone help me sort this out ?

    Many thanks.
    If you want to attract and keep more clients, then offer great customer support.

    Support-Focus.com. automates the process and gives you a trust seal to place on your website.
    I recommend that you at least take the 30 day free trial.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •