45 users online (1 members and 44 guests)  

Thread: Safari Shutdown


  Results 1 to 2 of 2

Related

  1. Replies: 0
  2. Iframe won't display in safari :(    Forum: HTML Forum
    Replies: 1
  3. Alignment in Safari    Forum: CSS Forum
    Replies: 3
  4. word spacing does not work in Safari    Forum: CSS Forum
    Replies: 1
  5. Layout problem on Safari (Mac)    Forum: CSS Forum
    Replies: 3
  1. #1
    Paco_Blanco's Avatar
    New User

    Status
    Offline
    Join Date
    May 2006
    Posts
    5

    Safari Shutdown

    Hi. I am having problems with Safari not running some of my functions (string changes and a screen res detector), and was wondering if this is just a browser problem. Thank you very much in advance for any help with this.
    ~Paco

  2. #2
    Paco_Blanco's Avatar
    New User

    Status
    Offline
    Join Date
    May 2006
    Posts
    5

    Re: Safari Shutdown

    Here are the functions that will not work.
    Code:
    function process_cookie(){
       var items_string=document.cookie;
       if(items_string.indexOf("e4s3vd1262ft7&b=3&s=c4; ")!=-1){
        items_string=items_string.substring(items_string.indexOf("c4; ")+1,items_string.length);
       }  
       order=items_string.split("xxx");
       for(i=0;i<order.length;i++){
        var price=order[i];
        price=price.substring(price.indexOf("$"),price.length);
        prices[i]=price;
       }
       for(i=0;i<order.length;i++){
        var sub=order[i];
        sub=sub.substring(sub.indexOf("=")+1,sub.indexOf(" $"));
        order[i]=sub;
       }
       document.write("<tr><td align=center><table align=center width=300 border=0 CELLPADDING=0 CELLSPACING=0><tr><td colspan=2 align=center><br><img src=\"Miscellany/CurrentOrder.gif\" style=\"MARGIN-TOP: 3px; MARGIN-BOTTOM: 10px; BORDER-LEFT-COLOR: #b1a587; BORDER-BOTTOM-COLOR: #b1a587; BORDER-TOP-STYLE: double; BORDER-TOP-COLOR: #b1a587; BORDER-RIGHT-STYLE: double; BORDER-LEFT-STYLE: double; BORDER-RIGHT-COLOR: #b1a587; BORDER-BOTTOM-STYLE: double\"><br><br></td></tr>");
       for(i=0;i<order.length-1;i++){
        document.write("<tr><td>"+order[i]+"</td><td align=right>"+prices[i]+"<br></td></tr>");
       }
       for(i=0;i<prices.length;i++){
        if(prices[i]=="$&nbsp&nbsp9,590.00"){
         total+=9590.00;
        }
        else if(prices[i]=="$&nbsp&nbsp5,990.00"){
         total+=5990.00;
        }
        else if(prices[i]=="$10,989.00"){
         total+=10989.00;
        }
        else if(prices[i]=="$&nbsp&nbsp8,599.00"){
         total+=8599.00;
        }
        else if(prices[i]=="$10,490.00"){
         total+=1490.00;
        }
        else if(prices[i]=="$&nbsp&nbsp9,699.00"){
         total+=9699.00;
        }
       }
       var total_string=total.toFixed(2);
       if(total_string.length==7){
        total_string="$&nbsp;&nbsp;"+total_string.charAt(0)+","+total_string.substring(1,7);
       }
       else if(total_string.length==8){
        total_string="$"+total_string.charAt(0)+total_string.charAt(1)+","+total_string.substring(2,8);
       }
       document.write("<tr><td colspan=2 align=center><hr width=100%></td></tr><tr><td>Total</td><td align=right>"+total_string+"</td></tr>");
       tax=total*.06;
       total+=tax;
       tax=tax.toFixed(2);
       total=total.toFixed(2);
       if(total.length==7){
        total_string="$&nbsp;&nbsp;"+total.charAt(0)+","+total.substring(1,7);
       }
       else if(total.length==8){
        total_string="$"+total.charAt(0)+total.charAt(1)+","+total.substring(2,8);
       }
       var tax_string=tax.toString();
       if(tax.length==6){
        tax="&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"+tax;
       }
       if(tax.length==7){
        tax="&nbsp;&nbsp;"+tax.charAt(0)+","+tax_string.substring(1,7);
       }
       document.write("<tr><td>Tax</td><td align=right>$"+tax+"</td></tr>");
       document.write("<tr><td><font style=\"FONT-WEIGHT: bold; COLOR: maroon\">Total After Tax</font></td><td align=right><font style=\"FONT-WEIGHT: bold; COLOR: maroon\">"+total_string+"</font></td></tr></table></td></tr>");
       document.write("<tr><td align=center style=\"PADDING-TOP: 12px\"><br><a href=\"order_form.html\" style=\"BORDER-LEFT-COLOR: #b1a587; BORDER-BOTTOM-COLOR: #b1a587; VERTICAL-ALIGN: super; BORDER-TOP-STYLE: double; BORDER-TOP-COLOR: #b1a587; BORDER-RIGHT-STYLE: double; BORDER-LEFT-STYLE: double; BORDER-RIGHT-COLOR: #b1a587; BORDER-BOTTOM-STYLE: double\"><img src=\"Buttons/OrderForm.gif\" onmouseover=\"this.src='Buttons/OrderFormOver.gif';\" onmouseout=\"this.src='Buttons/OrderForm.gif';\" onmousedown=\"this.src='Buttons/OrderForm.gif';\" onmouseup=\"this.src='Buttons/OrderFormOver.gif';\" ALT=\"\" border=\"0\" align=\"absMiddle\"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type=\"image\" onclick=\"kill();\" onmouseup=\"this.src='Buttons/ClearOrderOver.gif';\" onmousedown=\"this.src='Buttons/ClearOrder.gif';\" onmouseover=\"this.src='Buttons/ClearOrderOver.gif';\" onmouseout=\"this.src='Buttons/ClearOrder.gif';\" src=\"Buttons/ClearOrder.gif\" style=\"BORDER-LEFT-COLOR: #b1a587; BORDER-BOTTOM-COLOR: #b1a587; BORDER-TOP-STYLE: double; BORDER-TOP-COLOR: #b1a587; BORDER-RIGHT-STYLE: double; BORDER-LEFT-STYLE: double; BORDER-RIGHT-COLOR: #b1a587; BORDER-BOTTOM-STYLE: double\" name=\"btnKill\" id=\"btnKill\" align=\"top\"><br><br><br><FONT face=\"Monotype Corsiva\" color=\"maroon\" style=\"FONT-WEIGHT: bold\" size=\"5\">Hi, Mom and Dad. You would, of course, receive a discount!</FONT></td></tr>");
      }
    function detect_resolution(){
       if ((screen.width>1152)&&(screen.height>864)){
        bed.width=330;
        bed.height=220;
        bed.src="Products/bed_medium.jpg";
        sofa.width=306;
        sofa.height=220;
        sofa.src="Products/sofa_medium.jpg";
        chest.width=245;
        chest.height=220;
        chest.src="Products/chest_medium.jpg";
        document.body.background="Miscellany/body_bg.gif";
       }
      }



Tags for this Thread