Page 2 of 2 First 12
  • Jump to page:
    #16
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2003
    Posts
    22
    Rep Power
    0
    Originally Posted by Kravvitz
    It looks about the same in Firefox and IE to me.

    You test in neither Safari nor Google Chrome? (They use the same engine -- Webkit -- but the latter starts up quicker in WinXP.)
    I haven't tested in those because my website is primarily for my extended family and close friends an no one uses those to my knowledge. Most of the rank and file use IE, most of the rest use Firefox. I use Netscape 9 because Firefox is always crashing on me. I like the look, feel, and speed of Firefox. But to my mind I am just using the least worst of all the browsers out there.
  2. #17
  3. CSS & JS/DOM Adept
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jul 2004
    Location
    USA (verifiably)
    Posts
    20,135
    Rep Power
    4305
    Originally Posted by p3aul
    Most of the rank and file use IE, most of the rest use Firefox. I use Netscape 9 because Firefox is always crashing on me. I like the look, feel, and speed of Firefox. But to my mind I am just using the least worst of all the browsers out there.
    Yes, Firefox is the 2nd most used browser. However, that doesn't mean you should ignore other browsers. However, if you know you have very few visitors who use a certain browser, I can definitely understand your reluctance to test in it.

    Firefox crashes on you a lot? Which version(s) do that? And what OS are you using? WinXP? Vista?
    Spreading knowledge, one newbie at a time.

    Check out my blog. | Learn CSS. | PHP includes | X/HTML Validator | CSS validator | Common CSS Mistakes | Common JS Mistakes

    Remember people spend most of their time on other people's sites (so don't violate web design conventions).
  4. #18
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2003
    Posts
    22
    Rep Power
    0
    Originally Posted by bals28mjk
    Not Kravvitz!

    It matches positive numbers with a decimal place too. The regex tool you were using before looked fine to me - it doesn't ask for delimiters.
    I got it right now, I think. The next problem will be to make sure that the dry bulb is greater than the wet bulb. Sounds simple but I haven't much luck with it.

    Using the regex y'all gave me I plugged it into the PHP script I gave the link to earlier and uploaded it. Please give it a try to see if you can bambozzle it. If you put a wet bulb value larger than the dry bulb you'll get a RH greater than 100%!
  6. #19
  7. Person
    Devshed Beginner (1000 - 1499 posts)

    Join Date
    Jan 2007
    Location
    Moon
    Posts
    1,158
    Rep Power
    551
    Paul, your script keeps bambozzling me. It's returning "invalid entry" for every value.

    Originally Posted by p3aul
    The next problem will be to make sure that the dry bulb is greater than the wet bulb. Sounds simple but I haven't much luck with it.
    Very.
    Code:
    if(dryBulb>wetBulb){//do code} 
    else{//do something else}
    By the way, we can't see your php code with a view source so you'll have to post it here if you want us to view it.
    Give Opera some love. Use it and you'll see why.

    Oh, those monkeys.::What's wrong with the world today?::The lion king in 5 seconds.

    My body is so sexy.
  8. #20
  9. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2003
    Posts
    22
    Rep Power
    0
    Originally Posted by bals28mjk
    Paul, your script keeps bambozzling me. It's returning "invalid entry" for every value.

    Very.
    Code:
    if(dryBulb>wetBulb){//do code} 
    else{//do something else}
    By the way, we can't see your php code with a view source so you'll have to post it here if you want us to view it.
    Ok, I have no trouble getting it to work on Firefox, Netscape and IE. Will download safari and try that out. I have one relative with a mac.
    Here is the PHP:

    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>Test PHP</title>
    <style type="text/css">
    <!--
    body {
    	background-color: #AAFF00;
    }
    #Layer1 {
    	position:absolute;
    	left:326px;
    	top:40px;
    	width:329px;
    	height:479px;
    	z-index:1;
    }
    #Layer2 {
    	position:absolute;
    	left:375px;
    	top:104px;
    	width:282px;
    	height:136px;
    	z-index:2;
    }
    #Layer3 {
    	position:absolute;
    	left:405px;
    	top:413px;
    	width:257px;
    	height:78px;
    	z-index:3;
    }
    -->
    </style></head>
    
    <body>
    
    <div id="Layer1"><img src="Untitled-1.gif" width="375" height="500" /></div>
    <div id="Layer2">
      <form id="form1" name="form1" method="post" action="rh.php">
        <label> <br />&nbsp;
        <input name="db" type="text" size="4" maxlength="6" />
        <span class="style1">Dry Bulb Temp(Celsius)</span></label>
        <p>
          <label>&nbsp;
          <input name="wb" type="text" size="4" maxlength="6" />
          <span class="style3">Wet Bulb Temp(Celsius)</span></label>
        </p>
        <p>
          <label>&nbsp;
          <input  name="pr" type="text" size="4" maxlength="6" />
          <span class="style4">Ambient Pressure(Millibars)</span></label>
        <br>
        <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
       
    	<label>&nbsp;
    
          <input type="submit"  name="Submit" value="Calculate" />
          </label>
        </p>
    </form></div>
    <div id="Layer3"><?php
      
    if (isset($_POST['Submit'])) {  
    $db = $_POST["db"];
    $wb = $_POST["wb"];
    $pr = $_POST["pr"];
    
    
    
    
    //if ( ! preg_match('/^\d+$/', $db) || ! preg_match('/^\d+$/', $wb) || ! preg_match('/^\d+$/', $pr)) { 
    if ( ! preg_match('^-?\d{1,2}(\.\d)?^', $db) || ! preg_match('^-?\d{1,2}(\.\d)?^', $wb) || ! preg_match('^\d{3,4}^', $pr)) { 
    echo "<br>";
    echo "&nbsp";
    echo "&nbsp";
    echo "<input type='text' size='14' name='error' value='Invalid Entry!'>";}
    //if($wb > $db){
    //echo "&nbsp";
    //echo "&nbsp";
    //echo "<input type='text' size='14' name='error2' value='Drybulb must be higher than Wetbulb'>";}
    
    // Calculate Ew, the wetbulb vapor pressure component
    else {
    $F = 6.112 * exp((17.67*$wb)/($wb+243.5));
    //
    //Reassignes $F to the more readable Es 
    $Ew = $F;
    //
    
    // Calculates Es, the dry bulb vapor pressure component
    
    $H = 6.112 * exp((17.67*$db)/($db+243.5));
    //
    // and reassigns it to Es
    $Es = $H;
    //
    // Actual Vapor pressure 
    $I = $Ew - $pr*($db-$wb)*.00066*(1+(.00115*wb));
    //
    //Reassigns it 
    $Vpres = $I;
    //
    // Calculate Relative Humidity
    $J = ($Vpres/$Es)* 100;
    $rh = $J;
    $rh = round($rh,3);
    // Calculate Dewpoint
    
    
    $do = $Vpres/6.112;
    $logs = Log10($do); 
    $Dp = round(((237.7 * $logs)/(7.7-$logs)),3);
    //
    echo "<br>";
    echo "&nbsp";
    echo "&nbsp";
    //if($db == ""){$rh = 0;}
    echo "<input type='text' size='4' name='name' value='$rh'>&nbsp;% Relative Humidity";
    echo "<br>";
    echo "<br>";
    echo "&nbsp";
    
    echo " <input type='text' size='4' name='name' value='$Dp'>&nbsp;Dewpoint";}}
    
    ?>
    </div>
    </div>
    </body>
    </html>
    I've tried various variations of:

    if($dw < $wd) {do this}
  10. #21
  11. No Profile Picture
    Contributing User
    Devshed Beginner (1000 - 1499 posts)

    Join Date
    May 2006
    Location
    I'm sneaking up behind you.
    Posts
    1,490
    Rep Power
    833
    edit...
    sorry, didn't notice that it was old old thread.
    Last edited by srisa; January 29th, 2009 at 06:48 AM.
    Why do we always seek someone, something or some thought? Are we afraid of ourselves?
Page 2 of 2 First 12
  • Jump to page:

IMN logo majestic logo threadwatch logo seochat tools logo