Also, why not add this so that if the user blurs focus without having typed
something it will reset the form field.

Add this to your text fields: onblur="doReset(this)"
And add this to your script block:
function doReset(theText)
{
    if (theText.value == "")
        theText.value = theText.defaultValue
 }


On Wed, Sep 30, 2009 at 7:46 PM, Michael Grant <[email protected]> wrote:

> The thing I notice is that one the second page your "name" text field has a
> blank default value.
> As an aside I seem to remember something about form fields being named
> stuff like "name" or "value" not working well as they're reserved attribute
> words.
>
>   On Wed, Sep 30, 2009 at 7:24 PM, Matthew Smith <[email protected]>wrote:
>
>>
>> >Could you post a link or the full code?
>> >The bit you posted seems like it should work fine.
>> >
>> >On Tue, Sep 29, 2009 at 9:08 PM, Matthew Smith <[email protected]
>> >wrote:
>> >
>> >>
>> Here's the page that doesn't work:
>> --------------------------------------------------------------------------
>> <?xml version="1.0" encoding="utf-8"?>
>>        <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "
>> http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>
>>        <html xmlns="http://www.w3.org/1999/xhtml"; xml:lang="en"
>> lang="en">
>>        <head>
>>
>>                <base href="http://monstertrophywhitetails_com/";>
>>
>>        <title>monstertrophywhitetails.com</title>
>>        <link
>> href="includes/www_monstertrophywhitetails_com/layoutfiles/style.cfm"
>> rel="stylesheet" type="text/css" />
>>        <link
>> href="includes/www_monstertrophywhitetails_com/layoutfiles/layout.cfm"
>> rel="stylesheet" type="text/css" />
>>        <script
>> src="includes/www_monstertrophywhitetails_com/layoutfiles/rollover.js"
>> type="text/javascript"></script>
>>        <script
>> src="includes/www_monstertrophywhitetails_com/layoutfiles/maxheight.js"
>> type="text/javascript"></script>
>>
>> <script language="Javascript">
>> <!--
>>  function doClear(theText) {
>>     if (theText.value == theText.defaultValue) {
>>         theText.value = ""
>>     }
>>  }
>> //-->
>>  </script>
>> <script type="text/javascript">
>> <!--
>> function MM_CheckFlashVersion(reqVerStr,msg){
>>  with(navigator){
>>    var isIE  = (appVersion.indexOf("MSIE") != -1 &&
>> userAgent.indexOf("Opera") == -1);
>>    var isWin = (appVersion.toLowerCase().indexOf("win") != -1);
>>    if (!isIE || !isWin){
>>      var flashVer = -1;
>>      if (plugins && plugins.length > 0){
>>        var desc = plugins["Shockwave Flash"] ? plugins["Shockwave
>> Flash"].description : "";
>>        desc = plugins["Shockwave Flash 2.0"] ? plugins["Shockwave Flash
>> 2.0"].description : desc;
>>        if (desc == "") flashVer = -1;
>>        else{
>>          var descArr = desc.split(" ");
>>          var tempArrMajor = descArr[2].split(".");
>>          var verMajor = tempArrMajor[0];
>>          var tempArrMinor = (descArr[3] != "") ? descArr[3].split("r") :
>> descArr[4].split("r");
>>          var verMinor = (tempArrMinor[1] > 0) ? tempArrMinor[1] : 0;
>>          flashVer =  parseFloat(verMajor + "." + verMinor);
>>        }
>>      }
>>      // WebTV has Flash Player 4 or lower -- too low for video
>>      else if (userAgent.toLowerCase().indexOf("webtv") != -1) flashVer =
>> 4.0;
>>
>>      var verArr = reqVerStr.split(",");
>>      var reqVer = parseFloat(verArr[0] + "." + verArr[2]);
>>
>>      if (flashVer < reqVer){
>>        if (confirm(msg))
>>          window.location = "
>> http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash
>> ";
>>      }
>>    }
>>  }
>> }
>> //-->
>> </script>
>> <script src="../../../Scripts/AC_RunActiveContent.js"
>> type="text/javascript"></script><!-- 110 ms total execution time --></head>
>>
>>        <body id="contest" onload="MM_CheckFlashVersion('8,0,0,0','Content
>> on this page requires a newer version of Adobe Flash Player. Do you want to
>> download it now?');new ElementMaxHeight();
>> MM_preloadImages('/includes/www_monstertrophywhitetails_com/images/m1m.jpg','/includes/www_monstertrophywhitetails_com/images/m2m.jpg','/includes/www_monstertrophywhitetails_com/images/m3m.jpg','/includes/www_monstertrophywhitetails_com/images/m4m.jpg','/includes/www_monstertrophywhitetails_com/images/m5m.jpg');">
>>
>>        <div id="site_center">
>>                <div class="min_width">
>>                        <div class="main">
>>                                <!-- header  -->
>>                                <div class="menu">
>>                                        <div
>> class="indent_left">&nbsp;</div>
>>                                        <div class="col_1"><a
>> href="/index.cfm/index.cfm/fuseaction/main.home/index.cfm">Welcome</a></div>
>>                                        <div class="col_2 separate"><a
>> href="/index.cfm/fuseaction/main.whitetailmagic/index.cfm">Whitetail
>> Magic</a></div>
>>                                        <div class="col_3 separate"><a
>> href="/index.cfm/fuseaction/main.drsteger/index.cfm">Dr. Steger</a></div>
>>                                        <div class="col_4 separate"><a
>> href="/index.cfm/fuseaction/main.pictures/index.cfm">Pics</a></div>
>>
>>                                        <div class="col_6 separate"><a
>> href="/index.cfm/fuseaction/main.contact/index.cfm">Contact Us</a></div>
>>                                        <div
>> class="indent_right">&nbsp;</div>
>>                                        <div class="clear"></div>
>>                                </div>
>>                                <div class="logo"> <a
>> href="index.html"><img
>> src="/includes/www_monstertrophywhitetails_com/images/logo.jpg" alt=""
>> /></a> </div>
>>                                <!-- content -->
>>                                <div id="content">
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>        <div class="row_top">
>>                <div class="indent_box">
>>                        <div class="indent_left"> </div>
>>                        <div class="col_1 maxheight"> <img
>> src="/includes/www_monstertrophywhitetails_com/images/1title1.gif"
>> class="title" alt="" />
>>                                <div
>> class="indent_text">
>>                                        <script type="text/javascript">
>> AC_FL_RunContent( 'codebase','
>> http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0
>> ','width','343','height','286','id','FLVPlayer','src','FLVPlayer_Progressive','flashvars','&MM_ComponentVersion=1&skinName=Halo_Skin_3&streamName=/includes/www_monstertrophywhitetails_com/video/MTW1&autoPlay=true&autoRewind=true','quality','high','scale','noscale','name','FLVPlayer','salign','lt','pluginspage','
>> http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','movie','FLVPlayer_Progressive'
>> ); //end AC code
>> </script>
>>                                        <noscript>
>>                                        <object
>> classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="
>> http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0";
>> width="343" height="286" id="FLVPlayer">
>>                                                <param name="movie"
>> value="FLVPlayer_Progressive.swf" />
>>                                                <param name="salign"
>> value="lt" />
>>                                                <param name="quality"
>> value="high" />
>>                                                <param name="scale"
>> value="noscale" />
>>                                                <param name="FlashVars"
>> value="&MM_ComponentVersion=1&skinName=Halo_Skin_3&streamName=/includes/www_monstertrophywhitetails_com/video/MTW1&autoPlay=true&autoRewind=true"
>> />
>>                                                <embed
>> src="FLVPlayer_Progressive.swf"
>> flashvars="&MM_ComponentVersion=1&skinName=Halo_Skin_3&streamName=/includes/www_monstertrophywhitetails_com/video/MTW1&autoPlay=true&autoRewind=true"
>> quality="high" scale="noscale" width="343" height="286" name="FLVPlayer"
>> salign="LT" type="application/x-shockwave-flash" pluginspage="
>> http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash";
>> />
>>                                        </object>
>>                                        </noscript>
>>                                </div>
>>                        </div>
>>                        <div class="separate_box
>> maxheight"> </div>
>>                        <div class="col_2 maxheight"> <img
>> src="/includes/www_monstertrophywhitetails_com/images/1title2.gif"
>> class="title" alt="" />
>>                                <div class="col_box text_w"> <strong>Watch
>> this weeks video, score that buck, and enter to win!</strong><br />
>>                                        <br />
>>                                        <br />
>>
>>
>>                                                        <table
>> align="center" border="0" cellpadding="0" cellspacing="0" width="200">
>>
>>
>>  <tr>
>>
>>      <td class="link"><br>
>>
>>              Please enter your name.<br />
>>
>>              <br /></td>
>>
>>  </tr>
>>
>>
>>
>>                                                        </table>
>>
>>                                                <br />
>>                                                <form name="form" id="form"
>> action="/index.cfm" enctype="multipart/form-data" method="post">
>>                                                        <input
>> type="hidden" name="fuseaction" value="contest.home" />
>>                                                        <div
>> class="col_box" style="width:471px; padding:0 0 0 50px;">
>>                                                                <div
>> class="col_box_1">
>>
>>  <div class="h_f">
>>
>>      <input name="name" type="text" value="" onFocus="doClear(this)" />
>>
>>  </div>
>>
>>  <div class="h_f">
>>
>>      <input name="phone" type="text" value=" Phone:" onFocus="doClear(this)"
>> />
>>
>>  </div>
>>
>>  <input name="email" type="text" value=" E-mail:" onFocus="doClear(this)" />
>>                                                                </div>
>>                                                                <div
>> class="col_box_2">
>>                                                                        <br
>> />
>>                                                                        <br
>> />
>>
>>  <table border="0" cellpadding="5" cellspacing="5">
>>
>>      <tr>
>>
>>              <td>Buck's Age:</td>
>>
>>              <td align="right"><select name="age">
>>
>>
>>                                      <option value="1">1</option>
>>
>>
>>                                      <option value="2">2</option>
>>
>>
>>                                      <option value="3">3</option>
>>
>>
>>                                      <option value="4">4</option>
>>
>>
>>                                      <option value="5">5</option>
>>
>>
>>                                      <option value="6">6</option>
>>
>>
>>                                      <option value="7">7</option>
>>
>>
>>                                      <option value="8">8</option>
>>
>>
>>                      </select></td>
>>
>>      </tr>
>>
>>      <tr>
>>
>>              <td>Buck's Score:</td>
>>
>>              <td align="right"><select name="score">
>>
>>
>>                                      <option value="140">140</option>
>>
>>
>>                                      <option value="141">141</option>
>>
>>
>>                                      <option value="142">142</option>
>>
>>
>>                                      <option value="143">143</option>
>>
>>
>>                                      <option value="144">144</option>
>>
>>
>>                                      <option value="145">145</option>
>>
>>
>>                                      <option value="146">146</option>
>>
>>
>>                                      <option value="147">147</option>
>>
>>
>>                                      <option value="148">148</option>
>>
>>
>>                                      <option value="149">149</option>
>>
>>
>>                                      <option value="150">150</option>
>>
>>
>>                      </select></td>
>>
>>      </tr>
>>
>>  </table>
>>
>>  <div style="margin:10px 0 0 106px;">
>>
>>      <div class="column" style="margin:0 0 0 22px;">
>>
>>              <div class="link_wrx" style="margin:22px 0 0 0;"><span><a
>> onclick="document.getElementById('form').submit()">enter</a></span></div>
>>
>>      </div>
>>
>>      <div class="clear"></div>
>>
>>  </div>
>>                                                                </div>
>>                                                                <div
>> class="clear"></div>
>>                                                        </div>
>>                                                </form>
>>
>>                                        <div class="clear"></div>
>>                                </div>
>>                        </div>
>>                        <div class="indent_right"> </div>
>>                        <div class="clear"></div>
>>                </div>
>>        </div>
>>
>>
>>
>>
>>                                        <br class="clear"  />
>>                                        <div class="clear"></div>
>>                                </div>
>>                        </div>
>>                        <!-- footer -->
>>                        <div id="footer">
>>                                <div class="indent_left">&nbsp;</div>
>>                                <div
>> class="col_1">MonsterTrophyWhitetails.com &copy; 2009
>>
>>                                </div>
>>                                <div class="indent_right">&nbsp;</div>
>>                                <div class="clear"></div>
>>                        </div>
>>                </div>
>>        </div>
>>        </div>
>>        </body>
>>        </html>
>>
>> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-community/message.cfm/messageid:304845
Subscription: http://www.houseoffusion.com/groups/cf-community/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.5

Reply via email to