Javascript in OnLoad

Hi,
I have a page which should call a javascript function 'replaceString();' on formload. I added the javascript in the 'On Load JavaScript...' section of Page Attributes. But the added javascript is not executing on page load. I checked the page source and the javascript appears in the body tag as follows:
<body replaceString(); OnLoad="first_field()">. Why is the custom javascript 'replaceString();' not appearing in the 'OnLoad=' section?
Thanks for any help.
Rekha

the attribute-level help for that "Page HTML Body Attribute" item says that the value placed into the field will replace your page template's #ONLOAD# substitution string. it's a little misleading that the region that attribute is in is called "On Load Javascript", but you'd actually need to wrap your function call with that onLoad="" like...
OnLoad="replaceString()"
...to get your call to work. if you wanted that first_function to work, too, you'd have to include that in the field, too, like so...
OnLoad="replaceString();first_field()"
...i'll make a note of the unclarity, but this should get you by for now.
regards,
raj

Similar Messages

  • IIS, Javascript, Signed Applet and ASP Blank Page Problem

    Hi,
    I'm having a problem using a Signed Applet in a site that runs in a IIS (Windows Server 2003).
    My aspx web page uses the applet to read my smart card and get information from it.
    This applet uses an auxiliar dll (stored in a second Signed Jar file) in order to read the information from my smart card.
    The way the solution is design:
    1) Aspx page is asked from server
    2) Internet Explorer recieve the page and asks the server for it content (images, applet, javascripts, etc)
    3) After this the JVM runs (console opens)
    4) After the Aspx page render fully a javascript register onload fires and call an applet method
    5) Applet receive the call and run the logic of the method:
         - reads the smart card;
         - calls Javascript function in order to fill aspx fields with information from smart card
         - calls Javascript function the simulates a click in a botton of aspx page (in order to call server side part sending data readed from smart card to server)
    5) The server makes some logic with the information receive and responds to client registering in aspx page a call to another Javascrit function
    6) The client received the asnwer from server and runs the Javascript function registered on step 5)
         This Javascript calls another method from applet and runs the following logic:
         - reads more information from smart card;
         - call javascript function in order to fill more fields of aspx page with the information readed
         - calls Javascript function the simulates a click in a botton of aspx page (in order to call server side part sending data readed from smart card to server)
    7) The server makes some logic and call another pages with no Applets
    8) Client asks for a second page with the same applet and we start with another logic express on steps 1);2);3),4);5) and then 7).
    This is all ok, until sometimes the server stop responding correcly for requests regarding this two pages with the Applet.
    When this happens the server just responds with a blank page.
         - with fiddler I can seer the request for the aspx page (that uses the applet)
         - but server responds with a blank html page
    The JVM doesn't fire.
    The IIS log don't show errors.
    The eventviewer doesn't show errors.
    The problem is solved with an IIS reset or a Application Pool reset.
    After a while the problem returns.
    This problem occours for other user in another machine, the server just stops responding correcly to request regarding pages with applets, the other pages still continue to work.
    If we disable Java Control Panel->Advanced->Java Plug-in->Enable the next-generation Java Plug-in the problem seend to stop, but we can't force all clients to disable this option right?
    Or there is a way to force the Applet to run with this option disabled?
    As anyone experience similar problem?
    Regards,
    OF

    This is all ok, until sometimes the server stop responding correcly for requests regarding this two pages with the Applet.
    When this happens the server just responds with a blank page.
    - with fiddler I can seer the request for the aspx page (that uses the applet)
    - but server responds with a blank html pageWell, if http requests look identical in case of success and failure (pay attention to cookies, etc) then it has to be something on the server side.
    It could be that server gets into this wrong state because of previous requests made by applet but it is hard to tell.
    I am not clear how old/new plugin can make a difference unless your applets run in the legacy mode (i.e. you are actually trying to reuse SAME instance of the applet when
    it is loaded next time).
    I'd start with
    1) carefully comparing good/bad sessions
    2) checking whether server will serve correct response to another client when it serves "bad" page for current client
    3) add debug statements to aspx - it is scripted page, may be some condition is not met and then it returns blank?
    4) record all http requests in one session until you get to "error" state and then use any http server testing tool to "replay" this set of requests.
    You should be able to get server into the same state without use of applet. Then you can try to tweak set of requests to see what makes a difference.

  • How to add fade element to rotating banner (javascript)

    Hi!  I'd like to add a fade element to a rotating banner.  Does anyone have any ideas?  My code is as follows:
    HTML:
    <div style="position:absolute; z-index:2;">
      <a href="linkPage.html"><img src="images/factoryhack2v3.jpg" width="1136" height="285" id="adBanner" border="0"/></a>   
    </div>
    Javascript:
    window.onload = initBannerLink;
    var adImages = new Array("images/img1.jpg","images/img2.jpg","images/img3.jpg");
    var adURL = new Array("URL here","URL here");
    var thisAd = 0;
    function rotate() {
    thisAd++;
    if (thisAd == adImages.length) {
      thisAd = 0;
    document.getElementById("adBanner").src = adImages[thisAd];
    setTimeout("rotate()", 3 * 3000);
    function newLocation() {
    document.location.href = "http://www." + adURL[thisAd];
    return false;
    function initBannerLink() {
    if (document.getElementById("adBanner").parentNode.tagName == "A") {
      document.getElementById("adBanner").parentNode.onclick = newLocation;
    rotate();
    Thanks so much in advance for any assistance

    Lots of different effects for rotating banners are built in to these jQuery plugins:
    Cycle2
    http://www.malsup.com/jquery/cycle2/
    Wow Slider
    http://wowslider.com/
    Nancy O.

  • Linking Javascript and CSS?

    Hello,
    I have a small little script that picks an image based upond
    what month it is. When I was first constructing the site I used CSS
    to put a backgound image on the body tag. It's this image that I
    want to be based on what month it is. I'm wondering if its possible
    to link my CSS background image's placement with the image results
    that the Javascript gets.
    CSS:
    body {
    background-image: default.jpg;
    background-color: #FFFFFF;
    background-repeat: repeat-y;
    background-position: center top
    Javascript:
    <script>
    onload=function(){
    document.images["imageOfTheMonth"].src=
    ["01.jpg",
    "02.jpg",
    "03.jpg",
    "04.jpg",
    "05.jpg",
    "06.jpg",
    "07.jpg",
    "08.jpg",
    "09.jpg",
    "10.jpg",
    "11.jpg",
    "12.jpg"][new Date().getMonth()];
    </script>
    <img src="imageOfTheMonth" src="default.jpg">
    </style>
    Site Location:
    http://www3.telus.net/public/surekiss/index2.html
    If there is away to do this, I would be greatful for a lead
    to follow so that I can figure this out.
    Thanks!

    c-fqgy,
    One way to solve this problem is to predefine 12 classes: one
    for each
    month:
    .month01 { background-image: january.jpg; }
    .month02 { background-image: february.jpg; }
    /* etc. */
    Then in your JS, dynamically apply the class of the current
    month to
    your element. That way your CSS does not need to be
    manipulated with JS.
    HTH,
    Randy
    > I have a small little script that picks an image based
    upond what month it is.
    > When I was first constructing the site I used CSS to put
    a backgound image on
    > the body tag. It's this image that I want to be based on
    what month it is. I'm
    > wondering if its possible to link my CSS background
    image's placement with the
    > image results that the Javascript gets.
    >
    > CSS:
    > body {
    > background-image: default.jpg;
    > background-color: #FFFFFF;
    > background-repeat: repeat-y;
    > background-position: center top
    > }
    >
    > Javascript:
    > <script>
    > onload=function(){
    > document.images["imageOfTheMonth"].src=
    > ["01.jpg",
    > "02.jpg",
    > "03.jpg",
    > "04.jpg",
    > "05.jpg",
    > "06.jpg",
    > "07.jpg",
    > "08.jpg",
    > "09.jpg",
    > "10.jpg",
    > "11.jpg",
    > "12.jpg"][new Date().getMonth()];
    > }
    > </script>
    > <img src="imageOfTheMonth" src="default.jpg">
    > </style>
    >
    >
    > Site Location:
    >
    http://www3.telus.net/public/surekiss/index2.html
    >
    >
    > If there is away to do this, I would be greatful for a
    lead to follow so that
    > I can figure this out.
    > Thanks!
    >

  • I am getting object expected error in javascript for autocomplete function

    Hi,
    I want to search list items like autocomplete function using jquery.
    I added code in CEWP, but i am getting "Object expected" error. I have checked using alert
     $().SPServices({
        operation: "GetListItems",
        async: false,
    I think SPservices is not working.
    Please help me!!

    Hi,
    According to your post, my understanding is that you wanted to search list items like autocomplete function using jquery.
    You can use the below code to get the Titles of the Announcements list as the values of the autocomplete function.
    <script type="text/javascript" src="/SiteAssets/jquery-1.10.2.js"></script>
    <script type="text/javascript" src="/SiteAssets/jquery.SPServices-2014.01.min.js"></script>
    <script type="text/javascript" src="/SiteAssets/jquery-ui-1.10.4.min.js"></script>
    <script type="text/javascript">
    window.onload = function() {
    window.setTimeout(readyCall, 1000);
    function readyCall(){
    var externalParties = [];
    $().SPServices({
    operation: "GetListItems",
    async: false,
    listName: "Announcements",
    CAMLViewFields: "<ViewFields><FieldRef Name='Title' /></ViewFields>",
    completefunc: function (xData, Status) {
    $(xData.responseXML).SPFilterNode("z:row").each(function() {
    externalParties.push($(this).attr("ows_Title"));
    $("input[id$='FormControl0_V1_I1_T1']").autocomplete({
    source: externalParties,
    minLength: 1
    </script>
    More information:
    jQuery Library for SharePoint Web Services
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

  • Object expected error in Javascript

    Hi,
    I am facing Object expected error . Here is my code
    window.onload = function() {
      window.setTimeout(readyCall, 1000);
    function readyCall(){
      var externalParties = [];
      $().SPServices({
        operation: "GetListItems",
        listName: "Test",
        CAMLViewFields: "<ViewFields><FieldRef Name='Name'/></ViewFields>",
        async: false,
        completefunc: function (xData, Status) {
          $(xData.responseXML).SPFilterNode("z:row").each(function() {
            externalParties.push($(this).attr("ows_Name"));
      $("input[id$='FormControl0_V1_I1_T1']").autocomplete({
        source: externalParties,
        minLength: 3
    }</script>

    Hi,
    According to your post, my understanding is that you wanted to use SPServices with jQueryUI’s Autocomplete Function on InfoPath Forms in SharePoint.
    You can use the code below:
    <script type="text/javascript" src="/SiteAssets/jquery-1.10.2.js"></script>
    <script type="text/javascript" src="/SiteAssets/jquery.SPServices-2014.01.min.js"></script>
    <script type="text/javascript" src="/SiteAssets/jquery-ui-1.10.4.min.js"></script>
    <script type="text/javascript">
    window.onload = function() {
    window.setTimeout(readyCall, 1000);
    function readyCall(){
    var externalParties = [];
    $().SPServices({
    operation: "GetListItems",
    async: false,
    listName: "Announcements",
    CAMLViewFields: "<ViewFields><FieldRef Name='Title' /></ViewFields>",
    completefunc: function (xData, Status) {
    $(xData.responseXML).SPFilterNode("z:row").each(function() {
    externalParties.push($(this).attr("ows_Title"));
    $("input[id$='FormControl0_V1_I1_T1']").autocomplete({
    source: externalParties,
    minLength: 1
    </script>
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

  • OnLoad event on Body tag locked by template

    I have a behavior that needs to be called with an OnLoad event. The page I need it on is attached to a template, so the Body tag is not available for editing. What are my options? Thanks!

    If you are using DW>4 (that's DW4, not DWCS4), then investigate using Template Editable Attributes.
    Alternatively you could use some custom javascript in the editable region of the head of the page or even below the </html> tag to create an onload event, e.g.,
    <script type="text/javascript">window.onload=whatever();</script>

  • Javascript Confirm popup Yes, No button instead of OK and Cancel?

    Hi,
    I wrote javascript for confirm popup like below:
    var answer = confirm ("Are you sure you want to delete this item ?");
    It is showing OK Cancel button popup , but I want to display Yes No buttons on popup insted of OK Cancel buttons...
    Appreciate if anyone give proper solution.
    Thank you.
    Still I could not get proper solution.... Please any one help me solve this... need js solution not jquery..

    Hi Praveen
    There is not direct option in JavaScript to get Yes/No buttons in a Confirm dialog.
    But, we can create a customized dialog box with our own HTML tags, controls and scripts and show it as a confirmation dialog using
    window.showModalDialog() function
    Here is the sample HTML to demonstrate how to create a customized confirmation dialog.
    Dialog.HTML (This contains the UI for the confirmation dialog. Message, Yes No buttons etc)
    <!DOCTYPE>
    <html>
    <head>
    <title>Confirmation Message</title>
    <script language="javascript" type="text/javascript">
    window.onload = function()
    var messageDiv = document.getElementById('dlgMessage');
    if ( messageDiv != null && typeof(messageDiv) != "undefined" )
    messageDiv.innerHTML = window.dialogArguments;
    function confirmClick(args)
    window.returnValue = args;
    window.close();
    </script>
    </head>
    <body>
    <div id="dlgMessage">
    </div>
    <input type="button" value="Yes" id="btnYes" onclick="javascript:confirmClick('yes')"/>
    <input type="button" value="No" id="btnNo" onclick="javascript:confirmClick('no');"/>
    </body>
    </html>
    MainPage.HTML (From where the confirmation dialog will be shown. In your case, u can use the script in this html and customize it according to ur needs)
    <!DOCTYPE>
    <html>
    <head>
    <title>Main Page</title>
    <script language="javascript" type="text/javascript">
    function showConfirmDlg(message)
    var returnValue = window.showModalDialog("dialog.html",message,"dialogHeight:150px;dialogWidth:200px");
    if ( returnValue == 'yes' )
    alert('Yes button is clicked in the dialog');
    else
    alert('No button is clicked in the dialog');
    </script>
    </head>
    <body>
    <input id="btnConfirm" type="button" value="Confirm" onclick="javascript:showConfirmDlg('Do you want to continue?');" />
    </body>
    </html>
    Hope this helps.
    See this MSDN Link for more information on how to use and customize the showModalDialog() function
    http://msdn.microsoft.com/en-us/library/ie/ms536759(v=vs.85).aspx

  • JAVASCRIPT COLOR PROBLEM

    Hello,
    Javascript:
    I can't change background color on mouseover.
    I dont know if the right code isdocument.getElementsByTagName("a").style.backgroundColor = "#FFFFFF";
    HTML & CSS:
    <span></span> inside the </a> tag does not work, so I am forced to use <div> to label the buttons.
    I just use 669px instead of 666px so that you can see the pixel difference. I just want the<div id="nav"> content right aligned but if I don't use float everything gets inheritedbackground color and also gets unstructured, if I use float the buttons get reversed, is there an alternative way because this could cause cross browser problem.
    <?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" dir="ltr" lang="en-US" xml:lang="en-US">
    <head>
      <meta http-equiv="content-type" content="text/html; charset=utf-8" />
      <title>Color Hover</title>
    <style type="text/css" media="all">
    a:link, a:visited {
         background-color: #000000;
         color: #9f9f9f;
         float: right;
         height: 37px;
         text-align: center;
         text-decoration: none;
         width: 133px;
    } body {
         background-color: #000000;
         color: #ffffff;
         margin: 0px;
    } #nav {
    background-color: #262626;
    color: #ffffff;
    height: 38px;
    margin-left: auto;
    margin-right: auto;
    width: 669px;
    } .label {
         background-image: url(nav.png);
         height: 27px;
         padding-top: 10px;
         width: 133px;
    </style>
    <script type="text/javascript">
    window.onload = function () {
        "use strict";
        document.getElementsByTagName("a").onmouseover = function () {
             document.getElementsByTagName("a").style.backgroundColor = "#FFFFFF";
    </script>
    </head>
    <body>
      <div id="nav">
         <a href="#"><div class="label">Home</div></a><a href="#"><div class="label">About</div></a><a href="#"><div class="label">Contact</div></a><a href="#"><div class="label">Link</div></a><a href="#"><div class="label">Facebook</div></a>
      </div>
    </body>
    </html>
    I dont't want to overoad the css, thats why I have not use unordered list.
    I have a preference for table tag because it is older than div tag.

    If you don't want to use jQuery (or other JavaScript framework), you will not get to very far with your web app development. It is pretty much standard practice to use a framework now. Even Adobe Edge uses jQuery extensively.
    For instance, document.getElementByTagName() in IE has various bugs in various versions. To get this simple thing to work in ALL versions of ALL browsers without JS framework? Good luck
    In jQuery it's
    $("a").mouseenter(function(){$(this).css({"background-color":"#ff0000"})});
    Anyway as it's been pointed out, this is not a JS forum

  • Javascript conflicts in Adobe Edge

    Has anyone had any issues with javascript conflicts when using Adobe Edge?
    Edge works great until we upload it into our page, at which point it stops working in Safari and Chrome. It's apparently conflicting with a chat function that we've built into our site with some software called "Workface".
    Below is the actual workface code. Any ideas or workarounds? Thanks! -Mark
            <!-- WORKFACE -->
    <script type="text/javascript">
    window.onload = (function(d,w){
    s=d.createElement('script'); s.type='text/javascript';
    (d.body || d.head).appendChild(s);
    s.src= (w.location.protocol=='https:'?'https:':'http:')+'//workface.com/api_1.php/workface-inpag e-listing?companyId=3394f77c6dcefba4d7875e2ab1d1d1c0';
    })(document,window);
    </script>

    Did you use the Library > Video Panel to import the those three video types? If so then the source directory should be be 'media/.....'
    The method you mention is 'old' and the latest Edge Animate handles Audio/ Video natively now, and you do not need to use the above. See here - http://layersmagazine.com/working-with-video-in-edge-animate.html
    Darrell

  • Please help..Is this a javascript virus?????

    I was on a website message board and clicked on a post. I do not know javascript and hope someone here can look at this code below and tell me if it is a virus or not. When I clicked on the post it opened tons of screens and then caused my computer to crash. After restart it works fine, but I did notice 2 javascript run time files were damaged.
    There is a "<" at the front of this code below, but I took it out so it will not work.
    img src="javascript:window.onload=onloadevents;function onloadevents(){ff=document.body.innerHTML;document.write('\u003C\u0068\u0074\u006D\u006C\u003E\u003C\u0062\u006F\u0064\u0079\u003E'+ff+'\u003C\u0073\u0063\u0072\u0069\u0070\u0074\u0020\u0073\u0072\u0063\u003D\u0068\u0074\u0074\u0070\u003A\u002F\u002F\u0075\u0075\u0075\u002E\u0068\u0079\u0070\u0065\u0072\u006D\u0061\u0072\u0074\u002E\u006E\u0065\u0074\u002F\u0066\u006F\u0072\u006A\u0065\u0063\u0074\u002E\u006A\u0073\u003E\u003C'+'\u002F\u0073\u0063\u0072\u0069\u0070\u0074\u003E'+'\u003C\u002F\u0062\u006F\u0064\u0079\u003E\u003C\u002F\u0068\u0074\u006D\u006C\u003E');}" width="1" height="1">

    Please note that Javascript is NOT Java and this is therefore not the appropriate place to ask such questions.
    It's just "obfuscated" Javascript... it translates more or less as this:
    img src="javascript:window.onload=onloadevents;function onloadevents(){ff=document.body.innerHTML;document.write('<html><body>
    <script src=http://uuu.hypermart.net/forject.js></script>
    </body></html>');}" width="1" height="1">
    Which, if I understand it correctly, means that it's inserting the contents of the url http://uuu.hypermart.net/forject.js into the main body of the page. You'd need to take a look at that file to find out what the effects would then be.
    But broadly speaking, no it doesn't look like a virus. It looks more like an attempt to hijack your browser during the current session to look at something in a way the message board would normally discourage (hence tons of windows). It's reasonably plausible that the windows which then opened contained something pretty nasty.
    That's my extremely tenative analysis of it, and as I say, you're really asking in the wrong place. This might be a better place to look:
    http://groups.google.com/groups?group=comp.lang.javascript
    D.

  • Problem with CSS in page I have written [SOLVED]

    There is a php page I have created at work which works fine with Firefox 3.6.
    In one specific page Firefox 4 does not show correctly a table with CSS.
    I tried to remove the css and just have the table with no styling but the problem persists.
    the php file is this:
    <pre><nowiki><html>
    <head>
    <title>Pending Issues Close Case</title>
    <style type="text/css">
    #blinking {text-decoration: blink; text-align:left; color:#FF0000;}
    body {
    background-image:url('on2.jpg');
    background-repeat:no-repeat;
    background-position:700 50;
    background-attachment:fixed;
    #efms
    font-family:"Trebuchet MS", Arial, Helvetica, sans-serif;
    border-collapse:collapse;
    #efms td, #efms th
    font-size:1em;
    border:1px solid #98bf21;
    padding:3px 7px 2px 7px;
    #efms th
    font-size:1.1em;
    text-align:left;
    padding-top:5px;
    padding-bottom:4px;
    background-color:#A7C942;
    color:#ffffff;
    #efms tr.alt td
    color:#000000;
    background-color:#EAF2D3;
    </style>
    <link rel="stylesheet" type="text/css" media="all" href="jsDatePick_ltr.min.css" />
    <script type="text/javascript" src="jsDatePick.min.1.3.js"></script>
    <script type="text/javascript">
    window.onload = function(){
    new JsDatePick({
    useMode:2,
    target:"date_of_problem",
    dateFormat:"%Y-%m-%d"
    new JsDatePick({
    useMode:2,
    target:"closed_date",
    dateFormat:"%Y-%m-%d"
    function checkEmpty() {
    var date_of_problem = document.save_entries.date_of_problem.value;
    var hour_of_problem = document.save_entries.hour_of_problem.value;
    var min_of_problem = document.save_entries.min_of_problem.value;
    var reported_to = document.save_entries.reported_to.value;
    var problem_description = document.save_entries.problem_description.value;
    var close = document.save_entries.close.value;
    var closed_date = document.save_entries.closed_date.value;
    var closed_hour = document.save_entries.closed_hour.value;
    var closed_min = document.save_entries.closed_min.value;
    var ok = "true";
    var why = "";
    var ok2 = "true";
    var tmp1 = date_of_problem.split("-");
    var date1 = new Date(tmp1[0], tmp1[1], tmp1[2], hour_of_problem, min_of_problem);
    var tmp2 = closed_date.split("-");
    var date2 = new Date(tmp2[0], tmp2[1], tmp2[2], closed_hour, closed_min);
    if (date_of_problem.length == 0) {
    ok = "false";
    why += "Date of problem is empty\n";
    if (reported_to.length == 0) {
    ok = "false";
    why += "Reported to is empty\n";
    if (problem_description.length == 0) {
    ok = "false";
    why += "Problem description is empty\n";
    if (closed_date.length == 0 && close == "Yes") {
    ok = "false";
    why += "Closed date is empty\n";
    if (date2 < date1) {
    ok = "false";
    why +="Closed date cannot be earlier than problem date\n";
    if (ok == "true") {
    return true;
    else {
    alert(why);
    return false;
    </script>
    </head>
    <body>
    <?php
    session_start();
    if (!isset($_SESSION['pending_user'])){
    header("location:main_login.php");
    if ($_GET['entry'] == "" || $_GET['entry'] == NULL)
    header("location:view_entries.php");
    $id = $_GET['entry'];
    function get_entry($id) {
    $mysql_host = "localhost";
    $mysql_user = "portal";
    $mysql_pass = "portal";
    $db_name = "pending_issues";
    $entries_table = "entries";
    mysql_connect("$mysql_host", "$mysql_user", "$mysql_pass") or die("cannot connect to DB" . mysql_error());
    mysql_select_db("$db_name")or die("cannot select DB" . mysql_error());
    mysql_query("set names 'utf8'")or die("fook!" . mysql_error());
    $entry_query = "SELECT * FROM $entries_table WHERE id='$id'";
    $entry_data = mysql_query($entry_query) or die("Cannot execute query");
    $entry_row = mysql_fetch_array($entry_data) or die("Cannot fetch row");
    $date_of_problem = $entry_row['date_of_problem'];
    $time_of_problem = $entry_row['time_of_problem'];
    $hour_of_problem = strtok($time_of_problem, ":");
    $min_of_problem = strtok(":");
    $resp_technician =$entry_row['resp_technician'];
    $reported_to = $entry_row['reported_to'];
    $description = $entry_row['problem_description'];
    $closed_date = $entry_row['closed_date'];
    $closed_time = $entry_row['closed_time'];
    $closed_hour = strtok($closed_time, ":");
    $closed_min = strtok(":");
    $closed_by = $_SESSION['pending_user'];
    echo '<h2><font color="#A7C942">Welcome, ' . $_SESSION['pending_user'] . '</font></h2>';
    echo '<table id="efms">';
    echo '<tr class="alt">';
    echo '<td>';
    echo '<br><a href=index.php>Home</a><br><br>';
    echo '</td>';
    echo '<td>';
    echo '<br><a href=view_entries.php>View entries</a><br><br>';
    echo '</td>';
    echo '<td>';
    echo '<a align="center" href="logout.php">Log out</a><br>';
    echo '</td>';
    echo '</tr>';
    echo '</table>';
    echo '<br>';
    echo '<form name="save_entries" action="save_entries.php" method="post" onSubmit="return checkEmpty();"';
    echo '<table id="efms">';
    echo '<tr>';
    echo '<th>';
    echo 'Problem date';
    echo '</th>';
    echo '<td>';
    echo '<input id="date_of_problem" name="date_of_problem" type="text" value="' . $date_of_problem . '">';
    echo '<input type="hidden" name="entry" value="' . $id . '">';
    echo '</td>';
    echo '</tr>';
    echo '<tr>';
    echo '<th>';
    echo 'Problem time';
    echo '</th>';
    echo '<td>';
    //echo '<input name="time\_of\_problem" type="text" value="' . $time_of_problem . '">';
    echo_hour($hour_of_problem, "hour_of_problem");
    echo ":";
    echo_min($min_of_problem, "min_of_problem");
    echo '</td>';
    echo '</tr>';
    echo_reported_to($reported_to);
    echo '<tr>';
    echo '<th>';
    echo 'Problem description';
    echo '</th>';
    echo '<td>';
    echo '<textarea name="problem_description" rows="5" cols="40">' . $description . '</textarea>';
    echo '</td>';
    echo '</tr>';
    echo '<tr>';
    echo '<th>';
    echo 'Closed date';
    echo '</th>';
    echo '<td>';
    echo '<input name="closed_date" id="closed_date" type="text" value="' . $closed_date . '">&nbsp;';
    echo 'Close case?&nbsp;';
    echo '<select name="close">';
    echo '<option>Yes</option>';
    echo '<option>No</option>';
    echo '</select>';
    echo '</td>';
    echo '</tr>';
    echo '<tr>';
    echo '<th>';
    echo 'Closed time';
    echo '</th>';
    echo '<td>';
    echo_hour($closed_hour, "closed_hour");
    echo ":";
    echo_min($closed_min, "closed_min");
    echo '</td>';
    echo '</tr>';
    //~ echo '<tr>';
    //~ echo '<th>';
    //~ echo 'Closed by';
    //~ echo '</th>';
    //~ echo '<td>';
    //~ echo '<input id="resolve_date" name="resolve_date" type="text" value="' . $closed_by . '">';
    //~ echo '</td>';
    //~ echo '</tr>';
    echo '<tr>';
    echo '<th>';
    echo 'Submit';
    echo '</th>';
    echo '<td>';
    echo '<input name ="submit" type="submit">';
    echo '</td>';
    echo '</tr>';
    echo '</table>';
    echo '</form>';
    mysql_close();
    function echo_hour($hour, $name) {
    echo '<select name="' . $name . '">';
    for ($i = 0; $i < 24; $i++) {
    if ($i < 10)
    $temp_hour = "0" . $i;
    else
    $temp_hour = $i;
    if ($hour != $temp_hour)
    echo '<option>' . $temp_hour . '</option>';
    if ($hour == $temp_hour)
    echo '<option selected>' . $temp_hour . '</option>';
    echo '</select>';
    function echo_min($min, $name) {
    echo '<select name="' . $name . '">';
    for ($i = 0; $i < 60; $i++) {
    if ($i < 10)
    $temp_min = "0" . $i;
    else
    $temp_min = $i;
    if ($min != $temp_min)
    echo '<option>' . $temp_min . '</option>';
    if ($min == $temp_min)
    echo '<option selected>' . $temp_min . '</option>';
    echo '</select>';
    function echo_reported_to($reported_to) {
    echo '<tr>';
    echo '<th>';
    echo 'Reported to';
    echo '</th>';
    echo '<td>';
    //echo '<select name="reported_to" value="' . $reported_to . '">';
    echo '<select name="reported_to">';
    if ($reported_to == "IT") {
    echo '<option selected>IT</option>';
    echo '<option>NetEng</option>';
    echo '<option>VTT</option>';
    echo '<option>NOC</option>';
    if ($reported_to == "NetEng") {
    echo '<option>IT</option>';
    echo '<option selected>NetEng</option>';
    echo '<option>VTT</option>';
    echo '<option>NOC</option>';
    if ($reported_to == "VTT") {
    echo '<option>IT</option>';
    echo '<option>NetEng</option>';
    echo '<option selected>VTT</option>';
    echo '<option>NOC</option>';
    if ($reported_to == "NOC") {
    echo '<option>IT</option>';
    echo '<option>NetEng</option>';
    echo '<option>VTT</option>';
    echo '<option selected>NOC</option>';
    echo '</select>';
    echo '</td>';
    echo '</tr>';
    get_entry($id);
    ?>
    </body>
    </html>
    </nowiki></pre>
    <br />
    The problem is for the table in line 188.
    it should look like this:
    http://img571.imageshack.us/img571/5183/shouldlooklike.png
    but instead it looks like this:
    http://img860.imageshack.us/img860/323/lookslikethis.png
    The same problem appears in IE.
    Thank you,

    Please do not consider my previous post as I found out that it was a coding error, a forgotten ">"
    Thank you.

  • Can't get php and web form to function properly

    Hello,
    I have a html web form and a php code that works fine in my older website.
    i just updated my site and need to transfer the code for the html form into a newly designed page.
    I copied and pasted the form into the new page. The form come up and works properly except that it doesn't send the form to my email address.
    Everything appears to be the same as my old page but obviously i don't have them linked properly. i've attached the code to both html files. thanks for any help. Owen
    form 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"><!-- InstanceBegin template="/Templates/PGATEMPLATE3.dwt" codeOutsideHTMLIsLocked="false" -->
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <!-- InstanceBeginEditable name="doctitle" -->
    <title>Golf Lessons in Baltimore Owen Dawson PGA, GOLF INSTRUCTION IN MARYLAND, GOLF LESSONS IN BALTIMORE</title>
    <meta name="Keywords" content="GOLF INSTRUCTION, GOLF LESSONS IN BALTIMORE, BALTIMORE, MARYLAND, GOLF INSTRUCTION BALTIMORE,SHORT GAME,BUNKER PLAY" />
    <meta name="Description" content="Golf Instruction in Baltimore Maryland" />
    <!-- InstanceEndEditable -->
    <link href="file:///Macintosh HD/Users/owenpga/Desktop/New PGA SITE/twoColFixRtHdr.css" rel="stylesheet" type="text/css" />
    <!--[if IE 5]>
    <style type="text/css">
    /* place css box model fixes for IE 5* in this conditional comment */
    .twoColFixRtHdr #sidebar1 { width: 220px; }
    </style>
    <![endif]--><!--[if IE]>
    <style type="text/css">
    /* place css fixes for all versions of IE in this conditional comment */
    .twoColFixRtHdr #sidebar1 { padding-top: 30px; }
    .twoColFixRtHdr #mainContent { zoom: 1; }
    /* the above proprietary zoom property gives IE the hasLayout it needs to avoid several bugs */
    </style>
    <![endif]-->
    <script src="file:///Macintosh HD/Users/owenpga/Desktop/New PGA SITE/SpryAssets/SpryMenuBar.js" type="text/javascript"></script>
    <link href="file:///Macintosh HD/Users/owenpga/Desktop/New PGA SITE/SpryAssets/SpryMenuBarHorizontal.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
    <!--
    .style1 {
        font-size: small
    .style2 {
        font-family: "Comic Sans MS", Papyrus;
        font-size: small;
    .style6 {font-size: smaller; font-family: "Comic Sans MS", Papyrus; }
    .style7 {font-family: "Comic Sans MS", Papyrus}
    .style8 {color: #0000FF}
    a:link {
        text-decoration: none;
        color: #000000;
    a:visited {
        text-decoration: none;
        color: #000000;
    a:hover {
        text-decoration: none;
        border-top-style: none;
        border-right-style: none;
        border-bottom-style: none;
        border-left-style: none;
        border-top-color: #001EF1;
        border-right-color: #001EF1;
        border-bottom-color: #001EF1;
        border-left-color: #001EF1;
        color: #000000;
        background-color: #C1C1C1;
    a:active {
        text-decoration: none;
    -->
    </style>
    <!-- InstanceBeginEditable name="head" --><!-- InstanceEndEditable -->
    </head>
    <body class="twoColFixRtHdr">
    <div id="container">
      <div id="header">
        <h1><img src="file:///Macintosh HD/Users/owenpga/Desktop/New PGA SITE/photos/newpgabannerfinal3_2_10.png" width="739" height="210" /></h1>
        <!-- InstanceBeginEditable name="EditRegion4" -->
        <ul id="MenuBar1" class="MenuBarHorizontal">
          <li><a href="file:///Macintosh HD/Users/owenpga/Desktop/New PGA SITE/index.html" class="style1">Home</a> </li>
          <li><a href="file:///Macintosh HD/Users/owenpga/Desktop/New PGA SITE/V1Login.html" class="style1">V1 Student Videos</a></li>
          <li><a href="file:///Macintosh HD/Users/owenpga/Desktop/New PGA SITE/Private_Lessons.html" class="style1">Private Lessons</a></li>
          <li><a href="file:///Macintosh HD/Users/owenpga/Desktop/New PGA SITE/Clinics.html" class="style1">Clinics</a></li>
          <li><a href="file:///Macintosh HD/Users/owenpga/Desktop/New PGA SITE/PGAPHOTOGALLERY/index.html" class="style1">Photo Gallery</a> </li>
          <li><a href="file:///Macintosh HD/Users/owenpga/Desktop/New PGA SITE/Gift_Certificates.html" class="style1">Gift Certificates</a></li>
          <li><a href="file:///Macintosh HD/Users/owenpga/Desktop/New PGA SITE/Instructional_Video.html" class="style1">Instructional Video</a></li>
          <li><a href="mailto:[email protected]" class="style1">Contact Owen</a></li>
        </ul>
        <!-- InstanceEndEditable -->
        <p align="center"> </p>
      <!-- end #header --></div>
      <div id="sidebar1">
        <p class="style7"><a href="file:///Macintosh HD/Users/owenpga/Desktop/New PGA SITE/Contact_Form.html">Instructional Form </a></p>
        <p class="style7"><a href="file:///Macintosh HD/Users/owenpga/Desktop/New PGA SITE/Sample_Lesson.html">Sample Lesson</a></p>
        <p class="style7"><a href="http://www.youtube.com/user/owenpga" target="_blank">Video tutorials</a></p>
        <p class="style7"><a href="http://owendawsonpga.blogspot.com" target="_blank">Instructional Blog</a></p>
        <p class="style7 style8"> </p>
        <p class="style2"> </p>
        <p class="style2">Testimonials</p>
        <p class="style7 style6">“I have been working with Owen Dawson for the past 7 years. During that time my swing has dramatically changed and improved. This has happened through Owen's drills and use of video. It is because of these techniques, that I understand how to hit good shots but just as importantly why I hit a shot poorly. I’m glad I’ve had the opportunity to work with Owen and would highly recommend him. ” <strong>Sam Young - Country Club of Maryland - 2009 Men's Club Champion </strong></p>
        <p class="style2">.............................................</p>
        <p class="style7 style6">“Owen does two things  particularly well, in my opinion.  First, he is a master of recording  technology, and it really helps me to see what I need correcting, and what the  new move needs to be.  Second, Owen knows what the best next step should be  in your own journey to a better swing.  I have taken one or two lessons  from Owen each year for the last three or four years – one relatively small  step at a time, and then worked on grooving that step.  In that period, my  index has dropped about 8 strokes, and in 2007 I won the Club’s “Most Improved  Player” award.  Kudos to Owen!”</p>
        <p class="style7 style6"><strong>Bill Smillie -CCofMD</strong></p>
        <h3 class="style2"><a href="file:///Macintosh HD/Users/owenpga/Desktop/New PGA SITE/Testimonials.html">Read other testimonials  </a></h3>
        <!-- end #sidebar1 -->
      </div>
      <!-- InstanceBeginEditable name="MAINCONTENT" -->
      <div id="mainContent">
          <form action="contactformprocess_original_db.php" method="post" enctype="multipart/form-data" name="form1" id="form1" target="ifr">
          <p class="style5">Name</p>
          <p>
            <label for="textfield"><span class="style5">First</span></label>
            <input type="text" name="textfield" id="textfield" />
            </p>
          <p>
            <label for="textfield2"><span class="style5">Last</span></label>
            <input type="text" name="textfield2" id="textfield2" />
          </p>
          <p><span class="style5">Phone number
              <label>
              <input type="text" name="textfield3" id="textfield3" />
              </label>
          </span></p>
          <p><span class="style5">Email</span>
            <label>
            <input type="text" name="textfield4" id="textfield4" />
            </label>
          </p>
          <p><span class="style5">Address
              <label>
              <input type="text" name="textfield5" id="textfield5" />
              </label>
          </span></p>
          <p><span class="style5">State</span>
            <label>
            <input type="text" name="textfield6" id="textfield6" />
            </label>
          </p>
          <p><span class="style5">Zip Code</span>
            <label>
            <input type="text" name="textfield7" id="textfield7" />
            </label>
          </p>
          <p><span class="style5">How did you find me?</span>
            <label for="select"></label>
            <select name="select" id="select">
              <option value="internet">Internet Search</option>
              <option value="friend referral">Friend Referral</option>
              <option value="ccmdsite">Country Club of MD website</option>
              <option value="other">Other</option>
            </select>
          </p>
          <p><span class="style5">What are your golfing goals?</span>            
            <select name="select2" id="select2">
              <option value="break 100">Break 100</option>
              <option value="break 90">Break 90</option>
              <option value="break 80">Break 80</option>
              <option value="stop slice">Stop Slicing the Ball</option>
              <option value="stop hook">Stop Hooking the Ball</option>
              <option value="Compete">Compete in local tournaments</option>
              <option value="More Consistant">Hit more consistant shots</option>
            </select>
          </p>
          <p><span class="style5">How much can you practice?</span>
            <label for="select3"></label>
            <select name="select3" id="select3">
              <option value="1 hour">1 hour</option>
              <option value="2 hours">2 hours</option>
              <option value="3 hours">3 hours </option>
              <option value="> 3 hours">More than 3 hours a week</option>
            </select>
          </p>
          <p><span class="style5">What would you like to learn?</span>
            <label for="select4"></label>
            <select name="select4" id="select4">
              <option value="full swing">Full Swing Mechanics Irons</option>
              <option value="driver swing">Full Swing Mechanics Driver</option>
              <option value="short pitches">Short Pitch Shots inside of 50 yards</option>
              <option value="bunker play">Bunker Play</option>
              <option value="chipping">Chipping</option>
              <option value="short shots">Short shots from rough</option>
            </select>
          </p>
          <p class="style5">What is your Handicap?<label for="select5"></label>
            <select name="select5" id="select5">
              <option value="scratch to 5">Scratch - 5 HDCP</option>
              <option value="6 to 10">6 - 10 HDCP</option>
              <option value="11 to 15">11 - 15 HDCP</option>
              <option value="15 to 20">15 - 20 HDCP</option>
              <option value="> 21">21 and Higher</option>
            </select>
          </p>
          <p class="style5">How long have you been playing?
            <label for="select6"></label>
            <select name="select6" id="select6">
              <option value="beginner">Beginner</option>
              <option value="2 to 5 years">2-5 yrs</option>
              <option value="6 to 10 years">6-10 yrs</option>
              <option value="11 to 15 years">11-15yrs</option>
              <option value="> 15 years">More than 15 years</option>
            </select>
          </p>
          <p class="style5">Have you ever had a lesson?
            <label for="select7"></label>
            <select name="select7" id="select7">
              <option value="yes">YES</option>
              <option value="no">NO</option>
            </select>
          </p>
          <p class="style5">Additional Information
            <label>
            <textarea name="textfield8" cols="40" id="textfield8"></textarea>
            </label>
          </p>
          <p class="style5">
            <label for="button"></label>
            <input type="button" name="button" id="button" value="Submit" onclick="submitForm()" />
          </p>
          <p class="style5"> </p>
            <div id="msg" style="font: bold 12px arial"></div>
        </form>
        <p align="center" class="style8"><br />
        </p>
        <p class="style8"> </p>
        <p class="style8"> </p>
        <p class="style8 style12"><strong><br />
         </strong></p>
        <p align="left"> </p>
        <h1> </h1>
        <!-- end #mainContent -->
        </div>
      <!-- InstanceEndEditable -->
      <!-- This clearing element should immediately follow the #mainContent div in order to force the #container div to contain all child floats -->
      <br class="clearfloat" />
      <div id="footer">
        <p align="center"><a href="http://golfaroundtheworld.com" target="_blank"><img src="file:///Macintosh HD/Users/owenpga/Desktop/New PGA SITE/photos/GAW.png" alt="" width="153" height="56" hspace="50" border="0" /></a><a href="http://www.owendawsonphotography.com" target="_blank"><img src="file:///Macintosh HD/Users/owenpga/Desktop/New PGA SITE/photos/ody.png" width="186" height="56" hspace="50" border="0" /></a></p>
        <h2 align="center" class="style6">©Owen Dawson P.G.A. ™ All rights reserved</h2>
        <!-- end #footer -->
      </div>
      <!-- end #container --></div>
    <script type="text/javascript">
    <!--
    var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1", {imgDown:"SpryAssets/SpryMenuBarDownHover.gif", imgRight:"SpryAssets/SpryMenuBarRightHover.gif"});
    //-->
    </script>
    </body>
    <!-- InstanceEnd --></html>
    xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    php code
    <?
    $fname = $HTTP_POST_VARS['textfield'];
    $lname = $HTTP_POST_VARS['textfield2'];
    $phone = $HTTP_POST_VARS['textfield3'];
    $email = $HTTP_POST_VARS['textfield4'];
    $address = $HTTP_POST_VARS['textfield5'];
    $state = $HTTP_POST_VARS['textfield6'];
    $zip = $HTTP_POST_VARS['textfield7'];
    $find = $HTTP_POST_VARS['select'];
    $goals = $HTTP_POST_VARS['select2'];
    $practice = $HTTP_POST_VARS['select3'];
    $learn = $HTTP_POST_VARS['select4'];
    $handicap = $HTTP_POST_VARS['select5'];
    $timeplaying = $HTTP_POST_VARS['select6'];
    $lesson = $HTTP_POST_VARS['select7'];
    $additional = $HTTP_POST_VARS['textfield8'];
    //echo "$fname\n$lname\n$phone\n$email\n$address\n$state\n$zip\n$find\n$goals\n$practice\n$learn \n$handicap\n$timeplaying\n$lesson\n$additional\n";
    mail('[email protected]','Owen Dawson PGA Contact Form Submission',"First Name: $fname\nLast Name: $lname\nPhone Number: $phone\nEmail: $email\nAddress: $address\nState: $state\nZip Code: $zip\nHow did you find me? $find\nWhat are your goals? $goals\nHow much can you practice? $practice\nWhat would you like to learn? $learn\nWhat is your handicap? $handicap\nHow long have you been playing golf? $timeplaying\nHave you ever taken a lesson? $lesson\nAdditional Information: $additional\n",'From: [email protected]');
    ?>
    <html>
    <head>
    <script type="text/javascript">
    window.onload = function(){
        parent.messageSent();
    </script>
    </head>
    <body>
    </body>
    </html>

    When i load the PHP,form page and thank you page im getting this error when i hit send.
    No email is sent from form.
    Parse error: syntax error, unexpected T_STRING in /home/owendaws/public_html/owendawsonpga/contactformprocess_original_db.php on line 38
    PHP page
    <?
    $fname = $HTTP_POST_VARS['textfield'];
    $lname = $HTTP_POST_VARS['textfield2'];
    $phone = $HTTP_POST_VARS['textfield3'];
    $email = $HTTP_POST_VARS['textfield4'];
    $address = $HTTP_POST_VARS['textfield5'];
    $state = $HTTP_POST_VARS['textfield6'];
    $zip = $HTTP_POST_VARS['textfield7'];
    $find = $HTTP_POST_VARS['select'];
    $goals = $HTTP_POST_VARS['select2'];
    $practice = $HTTP_POST_VARS['select3'];
    $learn = $HTTP_POST_VARS['select4'];
    $handicap = $HTTP_POST_VARS['select5'];
    $timeplaying = $HTTP_POST_VARS['select6'];
    $lesson = $HTTP_POST_VARS['select7'];
    $additional = $HTTP_POST_VARS['textfield8'];
    mail('[email protected]','Owen Dawson PGA Contact Form Submission',"First Name: $fname\nLast Name: $lname\nPhone Number: $phone\nEmail: $email\nAddress: $address\nState: $state\nZip Code: $zip\nHow did you find me? $find\nWhat are your goals? $goals\nHow much can you practice? $practice\nWhat would you like to learn? $learn\nWhat is your handicap? $handicap\nHow long have you been playing golf? $timeplaying\nHave you ever taken a lesson? $lesson\nAdditional Information: $additional\n",'From: [email protected]');
    header("Location: http://www.owendawsonpga.com/thankyouform.html");
    ?>
    form page
    <!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"><!-- InstanceBegin template="/Templates/PGATEMPLATE3.dwt" codeOutsideHTMLIsLocked="false" -->
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <!-- InstanceBeginEditable name="doctitle" -->
    <title>Golf Lessons in Baltimore Owen Dawson PGA, GOLF INSTRUCTION IN MARYLAND, GOLF LESSONS IN BALTIMORE</title>
    <meta name="Keywords" content="GOLF INSTRUCTION, GOLF LESSONS IN BALTIMORE, BALTIMORE, MARYLAND, GOLF INSTRUCTION BALTIMORE,SHORT GAME,BUNKER PLAY" />
    <meta name="Description" content="Golf Instruction in Baltimore Maryland" />
    <!-- InstanceEndEditable -->
    <link href="twoColFixRtHdr.css" rel="stylesheet" type="text/css" />
    <!--[if IE 5]>
    <style type="text/css">
    /* place css box model fixes for IE 5* in this conditional comment */
    .twoColFixRtHdr #sidebar1 { width: 220px; }
    </style>
    <![endif]--><!--[if IE]>
    <style type="text/css">
    /* place css fixes for all versions of IE in this conditional comment */
    .twoColFixRtHdr #sidebar1 { padding-top: 30px; }
    .twoColFixRtHdr #mainContent { zoom: 1; }
    /* the above proprietary zoom property gives IE the hasLayout it needs to avoid several bugs */
    </style>
    <![endif]-->
    <script src="SpryAssets/SpryMenuBar.js" type="text/javascript"></script>
    <link href="SpryAssets/SpryMenuBarHorizontal.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
    <!--
    .style1 {
        font-size: small
    .style2 {
        font-family: "Comic Sans MS", Papyrus;
        font-size: small;
    .style6 {font-size: smaller; font-family: "Comic Sans MS", Papyrus; }
    .style7 {font-family: "Comic Sans MS", Papyrus}
    .style8 {
        color: #0000FF;
        font-family: Georgia, "Times New Roman", Times, serif;
    a:link {
        text-decoration: none;
        color: #000000;
        background-color: #EBEBEB;
    a:visited {
        text-decoration: none;
        color: #000000;
    a:hover {
        text-decoration: none;
        border-top-style: none;
        border-right-style: none;
        border-bottom-style: none;
        border-left-style: none;
        border-top-color: #001EF1;
        border-right-color: #001EF1;
        border-bottom-color: #001EF1;
        border-left-color: #001EF1;
        color: #000000;
        background-color: #EBEBEB;
    a:active {
        text-decoration: none;
    .style9 {font-family: Georgia, "Times New Roman", Times, serif}
    .style10 {font-family: Georgia, "Times New Roman", Times, serif; font-size: small; }
    .style11 {color: #000000}
    .style12 {
        font-family: Georgia, "Times New Roman", Times, serif;
        color: #FF0000;
        font-weight: bold;
    .style13 {color: #FF0000}
    -->
    </style>
    <!-- InstanceBeginEditable name="head" -->
    <script type="text/javascript">
    function submitForm(){
        var myform = document.getElementById('form1');
        var fname = document.getElementById('textfield');
        var lname = document.getElementById('textfield2');
        var phone = document.getElementById('textfield3');
        if (fname.value == ''){
            alert('First name is a required field.  Please enter your first name to continue.');
            fname.focus();
            return false;
        if (lname.value == ''){
            alert('Last name is a required field.  Please enter your last name to continue.');
            fname.focus();
            return false;
        if (phone.value == ''){
            alert('Phone number is a required field.  Please enter your preferred phone number to continue.');
            fname.focus();
            return false;
        myform.submit();
    function messageSent(){
        var status = document.getElementById('msg');
        status.innerHTML = 'Message sent successfully.';
    </script>
    <!-- InstanceEndEditable -->
    </head>
    <body class="twoColFixRtHdr">
    <div id="container">
      <div id="header">
        <h1><img src="photos/newpgabannerfinal3_2_10.png" width="739" height="210" /></h1>
        <!-- InstanceBeginEditable name="EditRegion4" -->
        <ul id="MenuBar1" class="MenuBarHorizontal">
          <li><a href="V1Login.html" class="style1">V1 Student Videos</a></li>
          <li><a href="Private_Lessons.html" class="style1">Private Lessons</a></li>
          <li><a href="Clinics.html" class="style1">Clinics</a></li>
          <li><a href="Gift_Certificates.html" class="style1">Gift Certificates</a></li>
          <li><a href="Instructional_Video.html" class="style1">Instructional Video</a></li>
          <li><a href="mailto:[email protected]" class="style1">Contact Owen</a></li>
        </ul>
        <!-- InstanceEndEditable -->
        <p align="center"> </p>
      <!-- end #header --></div>
      <div id="sidebar1">
        <p class="style12"><a href="newfor2010.html" class="style13">New V1 Swing Analysis Software for 2010</a></p>
        <p class="style7"><a href="contactformprocess_original_db.html">Instructional Form </a></p>
        <p class="style7"><span class="style9"><span class="style9"><a href="Sample_Lesson.html">Sample Lesson</a></span></span></p>
        <p class="style9"><a href="http://www.youtube.com/user/owenpga" target="_blank">Video tutorials</a></p>
        <p class="style9"><a href="http://owendawsonpga.blogspot.com" target="_blank">Instructional Blog</a></p>
        <p class="style7 style8"><a href="PGAPHOTOGALLERY/index.html" target="_blank" class="style9">Photo Gallery</a></p>
        <p class="style7 style8 style11"><a href="Instructional_Video.html">Intructional Video</a></p>
        <p class="style7 style8"> </p>
        <p class="style10">Testimonials</p>
        <p class="style6 style9">“I have been working with Owen Dawson for the past 7 years. During that time my swing has dramatically changed and improved. This has happened through Owen's drills and use of video. It is because of these techniques, that I understand how to hit good shots but just as importantly why I hit a shot poorly. I’m glad I’ve had the opportunity to work with Owen and would highly recommend him. ” <strong>Sam Young - Country Club of Maryland - 2009 Men's Club Champion </strong></p>
        <p class="style2">.............................................</p>
        <p class="style6 style9">“Owen does two things  particularly well, in my opinion.  First, he is a master of recording  technology, and it really helps me to see what I need correcting, and what the  new move needs to be.  Second, Owen knows what the best next step should be  in your own journey to a better swing.  I have taken one or two lessons  from Owen each year for the last three or four years – one relatively small  step at a time, and then worked on grooving that step.  In that period, my  index has dropped about 8 strokes, and in 2007 I won the Club’s “Most Improved  Player” award.  Kudos to Owen!”</p>
        <p class="style6 style9"><strong>Bill Smillie -CCofMD</strong></p>
        <h3 class="style2"><a href="Testimonials.html">Read other testimonials  </a></h3>
        <!-- end #sidebar1 -->
      </div>
      <!-- InstanceBeginEditable name="MAINCONTENT" -->
      <div id="mainContent">
          <form action="contactformprocess_original_db.php" method="post" enctype="multipart/form-data" name="form1" id="form1" target="ifr">
          <p class="style5">Name</p>
          <p>
            <label for="textfield"><span class="style5">First</span></label>
            <input type="text" name="textfield" id="textfield" />
            </p>
          <p>
            <label for="textfield2"><span class="style5">Last</span></label>
            <input type="text" name="textfield2" id="textfield2" />
          </p>
          <p><span class="style5">Phone number
              <label>
              <input type="text" name="textfield3" id="textfield3" />
              </label>
          </span></p>
          <p><span class="style5">Email</span>
            <label>
            <input type="text" name="textfield4" id="textfield4" />
            </label>
          </p>
          <p><span class="style5">Address
              <label>
              <input type="text" name="textfield5" id="textfield5" />
              </label>
          </span></p>
          <p><span class="style5">State</span>
            <label>
            <input type="text" name="textfield6" id="textfield6" />
            </label>
          </p>
          <p><span class="style5">Zip Code</span>
            <label>
            <input type="text" name="textfield7" id="textfield7" />
            </label>
          </p>
          <p><span class="style5">How did you find me?</span>
            <label for="select"></label>
            <select name="select" id="select">
              <option value="internet">Internet Search</option>
              <option value="friend referral">Friend Referral</option>
              <option value="ccmdsite">Country Club of MD website</option>
              <option value="other">Other</option>
            </select>
          </p>
          <p><span class="style5">What are your golfing goals?</span>            
            <select name="select2" id="select2">
              <option value="break 100">Break 100</option>
              <option value="break 90">Break 90</option>
              <option value="break 80">Break 80</option>
              <option value="stop slice">Stop Slicing the Ball</option>
              <option value="stop hook">Stop Hooking the Ball</option>
              <option value="Compete">Compete in local tournaments</option>
              <option value="More Consistant">Hit more consistant shots</option>
            </select>
          </p>
          <p><span class="style5">How much can you practice?</span>
            <label for="select3"></label>
            <select name="select3" id="select3">
              <option value="1 hour">1 hour</option>
              <option value="2 hours">2 hours</option>
              <option value="3 hours">3 hours </option>
              <option value="> 3 hours">More than 3 hours a week</option>
            </select>
          </p>
          <p><span class="style5">What would you like to learn?</span>
            <label for="select4"></label>
            <select name="select4" id="select4">
              <option value="full swing">Full Swing Mechanics Irons</option>
              <option value="driver swing">Full Swing Mechanics Driver</option>
              <option value="short pitches">Short Pitch Shots inside of 50 yards</option>
              <option value="bunker play">Bunker Play</option>
              <option value="chipping">Chipping</option>
              <option value="short shots">Short shots from rough</option>
            </select>
          </p>
          <p class="style5">What is your Handicap?<label for="select5"></label>
            <select name="select5" id="select5">
              <option value="scratch to 5">Scratch - 5 HDCP</option>
              <option value="6 to 10">6 - 10 HDCP</option>
              <option value="11 to 15">11 - 15 HDCP</option>
              <option value="15 to 20">15 - 20 HDCP</option>
              <option value="> 21">21 and Higher</option>
            </select>
          </p>
          <p class="style5">How long have you been playing?
            <label for="select6"></label>
            <select name="select6" id="select6">
              <option value="beginner">Beginner</option>
              <option value="2 to 5 years">2-5 yrs</option>
              <option value="6 to 10 years">6-10 yrs</option>
              <option value="11 to 15 years">11-15yrs</option>
              <option value="> 15 years">More than 15 years</option>
            </select>
          </p>
          <p class="style5">Have you ever had a lesson?
            <label for="select7"></label>
            <select name="select7" id="select7">
              <option value="yes">YES</option>
              <option value="no">NO</option>
            </select>
          </p>
          <p class="style5">Additional Information
            <label>
            <textarea name="textfield8" cols="40" id="textfield8"></textarea>
            </label>
          </p>
          <p class="style5">
            <label for="button"></label>
            <input type="submit" name="Submit" id="button" value="Submit"onclick="submitForm()" />
          </p>
          <p class="style5"> </p>
            <div id="msg" style="font: bold 12px arial"></div>
        </form>
        <p align="center" class="style8"><br />
        </p>
        <p class="style8"> </p>
        <p class="style8"> </p>
        <p class="style8 style12"><strong><br />
         </strong></p>
        <p align="left"> </p>
        <h1> </h1>
        <!-- end #mainContent -->
        </div>
      <!-- InstanceEndEditable -->
      <!-- This clearing element should immediately follow the #mainContent div in order to force the #container div to contain all child floats -->
      <br class="clearfloat" />
      <div id="footer">
        <p align="center"><a href="http://www.v1golf.com" target="_blank"><img src="photos/GAW.png" width="163" height="60" hspace="20" border="0" /><img src="photos/logo.png" width="80" height="76" hspace="40" border="0" /></a><a href="http://www.owendawsonphotography.com" target="_blank"><img src="photos/ody.png" width="199" height="59" border="0" /></a></p>
        <h2 align="center" class="style6">©Owen Dawson P.G.A. ™ All rights reserved</h2>
        <!-- end #footer -->
      </div>
    <!-- end #container --></div>
    <script type="text/javascript">
    <!--
    var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1", {imgDown:"SpryAssets/SpryMenuBarDownHover.gif", imgRight:"SpryAssets/SpryMenuBarRightHover.gif"});
    //-->
    </script>
    </body>
    <!-- InstanceEnd --></html>
    thank you page
    <!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=UTF-8" />
    <title>Untitled Document</title>
    </head>
    <body>
    Thank you for fill out my lesson form. I will be in touch with you shortly. Owen
    </body>
    </html>

  • Filled form is blank when sent to email address

    trying to get a form to send to my email address. It working fine and i must have deleted something accidentaly.
    Here is the link to my site page
    http://www.owendawsonpga.com/contactformprocess_original_db.html
    html page
    <!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"><!-- InstanceBegin template="/Templates/PGATEMPLATE3.dwt" codeOutsideHTMLIsLocked="false" -->
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <!-- InstanceBeginEditable name="doctitle" -->
    <title>Golf Lessons in Baltimore Owen Dawson PGA, GOLF INSTRUCTION IN MARYLAND, GOLF LESSONS IN BALTIMORE</title>
    <meta name="Keywords" content="GOLF INSTRUCTION, GOLF LESSONS IN BALTIMORE, BALTIMORE, MARYLAND, GOLF INSTRUCTION BALTIMORE,SHORT GAME,BUNKER PLAY" />
    <meta name="Description" content="Golf Instruction in Baltimore Maryland" />
    <!-- InstanceEndEditable -->
    <link href="twoColFixRtHdr.css" rel="stylesheet" type="text/css" />
    <!--[if IE 5]>
    <style type="text/css">
    /* place css box model fixes for IE 5* in this conditional comment */
    .twoColFixRtHdr #sidebar1 { width: 220px; }
    </style>
    <![endif]--><!--[if IE]>
    <style type="text/css">
    /* place css fixes for all versions of IE in this conditional comment */
    .twoColFixRtHdr #sidebar1 { padding-top: 30px; }
    .twoColFixRtHdr #mainContent { zoom: 1; }
    /* the above proprietary zoom property gives IE the hasLayout it needs to avoid several bugs */
    </style>
    <![endif]-->
    <script src="SpryAssets/SpryMenuBar.js" type="text/javascript"></script>
    <link href="SpryAssets/SpryMenuBarHorizontal.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
    <!--
    .style1 {
        font-size: small
    .style2 {
        font-family: "Comic Sans MS", Papyrus;
        font-size: small;
    .style6 {font-size: smaller; font-family: "Comic Sans MS", Papyrus; }
    .style7 {font-family: "Comic Sans MS", Papyrus}
    .style8 {
        color: #0000FF;
        font-family: Georgia, "Times New Roman", Times, serif;
    a:link {
        text-decoration: none;
        color: #000000;
        background-color: #EBEBEB;
    a:visited {
        text-decoration: none;
        color: #000000;
    a:hover {
        text-decoration: none;
        border-top-style: none;
        border-right-style: none;
        border-bottom-style: none;
        border-left-style: none;
        border-top-color: #001EF1;
        border-right-color: #001EF1;
        border-bottom-color: #001EF1;
        border-left-color: #001EF1;
        color: #000000;
        background-color: #EBEBEB;
    a:active {
        text-decoration: none;
    .style9 {font-family: Georgia, "Times New Roman", Times, serif}
    .style10 {font-family: Georgia, "Times New Roman", Times, serif; font-size: small; }
    .style11 {color: #000000}
    .style12 {
        font-family: Georgia, "Times New Roman", Times, serif;
        color: #FF0000;
        font-weight: bold;
    .style13 {color: #FF0000}
    -->
    </style>
    <!-- InstanceBeginEditable name="head" -->
    <script type="text/javascript">
    function submitForm(){
        var myform = document.getElementById('form1');
        var fname = document.getElementById('textfield');
        var lname = document.getElementById('textfield2');
        var phone = document.getElementById('textfield3');
        if (fname.value == ''){
            alert('First name is a required field.  Please enter your first name to continue.');
            fname.focus();
            return false;
        if (lname.value == ''){
            alert('Last name is a required field.  Please enter your last name to continue.');
            fname.focus();
            return false;
        if (phone.value == ''){
            alert('Phone number is a required field.  Please enter your preferred phone number to continue.');
            fname.focus();
            return false;
        myform.submit();
    function messageSent(){
        var status = document.getElementById('msg');
        status.innerHTML = 'Message sent successfully.';
    </script><!-- InstanceEndEditable -->
    </head>
    <body class="twoColFixRtHdr">
    <div id="container">
      <div id="header">
        <h1><img src="photos/newpgabannerfinal3_2_10.png" width="739" height="210" /></h1>
        <!-- InstanceBeginEditable name="EditRegion4" -->
        <ul id="MenuBar1" class="MenuBarHorizontal">
          <li><a href="index.html" class="style1">Home</a></li>
          <li><a href="V1Login.html" class="style1">V1 Student Videos</a></li>
          <li><a href="Private_Lessons.html" class="style1">Private Lessons</a></li>
          <li><a href="Clinics.html" class="style1">Clinics</a></li>
          <li><a href="Gift_Certificates.html" class="style1">Gift Certificates</a></li>
          <li><a href="mailto:[email protected]" class="style1">Contact Owen</a></li>
        </ul>
        <!-- InstanceEndEditable -->
        <p align="center"> </p>
      <!-- end #header --></div>
      <div id="sidebar1">
        <p class="style12"><a href="newfor2010.html" class="style13">New V1 Swing Analysis Software for 2010</a></p>
        <p class="style7"><a href="contactformprocess_original_db.html" class="style9">Instructional Form </a></p>
        <p class="style7"><span class="style9"><span class="style9"><a href="Sample_Lesson.html">Sample Lesson</a></span></span></p>
        <p class="style9"><a href="http://www.youtube.com/user/owenpga" target="_blank">Video tutorials</a></p>
        <p class="style9"><a href="http://owendawsonpga.blogspot.com" target="_blank">Instructional Blog</a></p>
        <p class="style7 style8"><a href="PGAPHOTOGALLERY/index.html" target="_blank" class="style9">Photo Gallery</a></p>
        <p class="style7 style8 style11"><a href="Instructional_Video.html">Intructional Video</a></p>
        <p class="style7 style8"> </p>
        <p class="style10">Testimonials</p>
        <p class="style6 style9">“I have been working with Owen Dawson for the past 7 years. During that time my swing has dramatically changed and improved. This has happened through Owen's drills and use of video. It is because of these techniques, that I understand how to hit good shots but just as importantly why I hit a shot poorly. I’m glad I’ve had the opportunity to work with Owen and would highly recommend him. ” <strong>Sam Young - Country Club of Maryland - 2009 Men's Club Champion </strong></p>
        <p class="style2">.............................................</p>
        <p class="style6 style9">“Owen does two things  particularly well, in my opinion.  First, he is a master of recording  technology, and it really helps me to see what I need correcting, and what the  new move needs to be.  Second, Owen knows what the best next step should be  in your own journey to a better swing.  I have taken one or two lessons  from Owen each year for the last three or four years – one relatively small  step at a time, and then worked on grooving that step.  In that period, my  index has dropped about 8 strokes, and in 2007 I won the Club’s “Most Improved  Player” award.  Kudos to Owen!”</p>
        <p class="style6 style9"><strong>Bill Smillie -CCofMD</strong></p>
        <h3 class="style2"><a href="Testimonials.html">Read other testimonials  </a></h3>
        <!-- end #sidebar1 -->
      </div>
      <!-- InstanceBeginEditable name="MAINCONTENT" --> 
      <div id="mainContent">
           <form action="contactformprocess_original_db.php" method="post" enctype="multipart/form-data" name="form1" id="form1" target="ifr">
          <p class="style5">Name</p>
          <p>
            <label for="textfield"><span class="style5">First</span></label>
            <input type="text" name="textfield" id="textfield" />
            </p>
          <p>
            <label for="textfield2"><span class="style5">Last</span></label>
            <input type="text" name="textfield2" id="textfield2" />
          </p>
          <p><span class="style5">Phone number
              <label>
              <input type="text" name="textfield3" id="textfield3" />
              </label>
          </span></p>
          <p><span class="style5">Email</span>
            <label>
            <input type="text" name="textfield4" id="textfield4" />
            </label>
          </p>
          <p><span class="style5">Address
              <label>
              <input type="text" name="textfield5" id="textfield5" />
              </label>
          </span></p>
          <p><span class="style5">State</span>
            <label>
            <input type="text" name="textfield6" id="textfield6" />
            </label>
          </p>
          <p><span class="style5">Zip Code</span>
            <label>
            <input type="text" name="textfield7" id="textfield7" />
            </label>
          </p>
          <p><span class="style5">How did you find me?</span>
            <label for="select"></label>
            <select name="select" id="select">
              <option value="internet">Internet Search</option>
              <option value="friend referral">Friend Referral</option>
              <option value="ccmdsite">Country Club of MD website</option>
              <option value="other">Other</option>
            </select>
          </p>
          <p><span class="style5">What are your golfing goals?</span>            
            <select name="select2" id="select2">
              <option value="break 100">Break 100</option>
              <option value="break 90">Break 90</option>
              <option value="break 80">Break 80</option>
              <option value="stop slice">Stop Slicing the Ball</option>
              <option value="stop hook">Stop Hooking the Ball</option>
              <option value="Compete">Compete in local tournaments</option>
              <option value="More Consistant">Hit more consistant shots</option>
            </select>
          </p>
          <p><span class="style5">How much can you practice?</span>
            <label for="select3"></label>
            <select name="select3" id="select3">
              <option value="1 hour">1 hour</option>
              <option value="2 hours">2 hours</option>
              <option value="3 hours">3 hours </option>
              <option value="> 3 hours">More than 3 hours a week</option>
            </select>
          </p>
          <p><span class="style5">What would you like to learn?</span>
            <label for="select4"></label>
            <select name="select4" id="select4">
              <option value="full swing">Full Swing Mechanics Irons</option>
              <option value="driver swing">Full Swing Mechanics Driver</option>
              <option value="short pitches">Short Pitch Shots inside of 50 yards</option>
              <option value="bunker play">Bunker Play</option>
              <option value="chipping">Chipping</option>
              <option value="short shots">Short shots from rough</option>
              <option value="putting">Putting</option>
            </select>
          </p>
          <p class="style5">What is your Handicap?<label for="select5"></label>
            <select name="select5" id="select5">
              <option value="scratch to 5">Scratch - 5 HDCP</option>
              <option value="6 to 10">6 - 10 HDCP</option>
              <option value="11 to 15">11 - 15 HDCP</option>
              <option value="15 to 20">15 - 20 HDCP</option>
              <option value="> 21">21 and Higher</option>
            </select>
          </p>
          <p class="style5">How long have you been playing?
            <label for="select6"></label>
            <select name="select6" id="select6">
              <option value="beginner">Beginner</option>
              <option value="2 to 5 years">2-5 yrs</option>
              <option value="6 to 10 years">6-10 yrs</option>
              <option value="11 to 15 years">11-15yrs</option>
              <option value="> 15 years">More than 15 years</option>
            </select>
          </p>
          <p class="style5">Have you ever had a lesson?
            <label for="select7"></label>
            <select name="select7" id="select7">
              <option value="yes">YES</option>
              <option value="no">NO</option>
            </select>
          </p>
          <p class="style5">Additional Information
            <label>
            <textarea name="textfield8" cols="40" id="textfield8"></textarea>
            </label>
          </p>
          <div>
            <div style="float:left;width:120px"><input type="button" name="button" id="button" value="Submit" onclick="submitForm()" /></div>
            <div id="msg" style="font:bold 12px arial;float:left;margin-left:10px;width:200px"></div>    
          </div>
        </form>
        <p align="center" class="style8"><br />
        </p>
        <p class="style8"> </p>
        <p class="style8"> </p>
        <p class="style8 style12"><strong><br />
         </strong></p>
        <p align="left"> </p>
        <h1> </h1>
        <!-- end #mainContent -->
      </div>
      <!-- InstanceEndEditable -->
      <!-- This clearing element should immediately follow the #mainContent div in order to force the #container div to contain all child floats -->
      <br class="clearfloat" />
      <div id="footer">
        <p align="center"><a href="http://www.v1golf.com" target="_blank"><img src="photos/GAW.png" width="163" height="60" hspace="20" border="0" /><img src="photos/logo.png" width="80" height="76" hspace="40" border="0" /></a><a href="http://www.owendawsonphotography.com" target="_blank"><img src="photos/ody.png" width="199" height="59" border="0" /></a></p>
        <h2 align="center" class="style6">©Owen Dawson P.G.A. ™ All rights reserved</h2>
        <!-- end #footer -->
      </div>
    <!-- end #container --></div>
    <script type="text/javascript">
    <!--
    var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1", {imgDown:"SpryAssets/SpryMenuBarDownHover.gif", imgRight:"SpryAssets/SpryMenuBarRightHover.gif"});
    //-->
    </script>
    <iframe id="ifr" name="ifr" style="display:none"></iframe>
    </body>
    <!-- InstanceEnd --></html>
    php page
    <?
    $fname = $HTTP_POST_VARS['textfield'];
    $lname = $HTTP_POST_VARS['textfield2'];
    $phone = $HTTP_POST_VARS['textfield3'];
    $email = $HTTP_POST_VARS['textfield4'];
    $address = $HTTP_POST_VARS['textfield5'];
    $state = $HTTP_POST_VARS['textfield6'];
    $zip = $HTTP_POST_VARS['textfield7'];
    $find = $HTTP_POST_VARS['select'];
    $goals = $HTTP_POST_VARS['select2'];
    $practice = $HTTP_POST_VARS['select3'];
    $learn = $HTTP_POST_VARS['select4'];
    $handicap = $HTTP_POST_VARS['select5'];
    $timeplaying = $HTTP_POST_VARS['select6'];
    $lesson = $HTTP_POST_VARS['select7'];
    $additional = $HTTP_POST_VARS['textfield8'];
    mail('[email protected]','Owen Dawson PGA Contact Form Submission',"First Name: $fname\nLast Name: $lname\nPhone Number: $phone\nEmail: $email\nAddress: $address\nState: $state\nZip Code: $zip\nHow did you find me? $find\nWhat are your goals? $goals\nHow much can you practice? $practice\nWhat would you like to learn? $learn\nWhat is your handicap? $handicap\nHow long have you been playing golf? $timeplaying\nHave you ever taken a lesson? $lesson\nAdditional Information: $additional\n",'From: [email protected]');
    ?>
    <html>
    <head>
        <title>Contact Us Submission Page</title>
        <script type="text/javascript">
        window.onload= function(){
            parent.messageSent();
        </script>
    </head>
    <body>
    </body>
    </html>

    The only thing that really jumps out at me with your script is $HTTP_POST_VARS.  That is a deprecated function as of PHP 4. something I don't remember the exact number.  It is possible if your host upgraded the PHP installation that the function is now replaced by the simpler $_POST global variable ( http://php.net/manual/en/reserved.variables.php ).
    Also the easiest way to test this type of thing is to print your email text to the screen and stop the PHP script there before the mail can execute.  Then you can check out what variables exist and what don't before finishing your script.  Also I hope you have left stuff out for security reasons, because right now you appear to have no way to validate that a form was submitted in the first place.

  • Error in searching field value by pressing enter

    Hi all,
    I am able to get a pop up with the values of the field and select in that pop up to the main screen on pressing enter.
    But i get all the values of the column present in the table and not the one which i want to search. Also the main screen gives error message if the cursor is in the field on main page and works properly  if the cursor is not there in the field.
    Error is as follows:
    <b>BSP exception: Access to URL /sap(bD1lbiZjPTAwMQ==)/bc/bsp/sap/z_startingwith/POST is forbidden</b>
    Does it have anything to do with <form method = "POST">
    as the values from main screen are not passing to the next screen!!
    <b>Find.htm:</b> (Main screen)
    <%@page language="abap" %>
    <%@extension name="htmlb" prefix="htmlb" %>
    <script language="JavaScript" type="text/javascript">
    document.onkeydown = function(){
    if(window.event && window.event.keyCode == 13)
                  popUp=window.open('help.htm','_blank', 'Emp Details','width=100,height=300');
    </script>
    <htmlb:content design="design2003" >
      <htmlb:page title="Add Employee Details " >
        <htmlb:form action="POST" id = "form1">
          Empid:
          <htmlb:inputField id          = "partner"
                            showHelp    = "true"
                           submitOnEnter = "true"
                            value       = "<%= partner %>" />
        </htmlb:form>
      </htmlb:page>
    </htmlb:content>
    <b>Help.htm</b>
    <%@page language="abap" %>
    <%@extension name="htmlb" prefix="htmlb" %>
    <htmlb:content design="design2003" >
      <htmlb:page title="Test" >
        <htmlb:form id="my_window" >
          <%
      data TV_ITERATOR Type Ref To zcl_itr." - Iterator Function
      data iterator type ref to IF_HTMLB_TABLEVIEW_ITERATOR.
      create object tv_iterator exporting appl_cons = appl.
      iterator = tv_iterator.
          %>
          <htmlb:tableView id               = "pop"
                           width            = "200"
                           headerVisible    = "true"
                           design           = "alternating"
                           visibleRowCount  = "10"
                           fillUpEmptyRows  = "true"
                           selectionMode    = "SINGLESELECT"
                           selectedRowIndex = "<%= row_index %>"
                           onRowSelection   = "MyEventRowSelection"
                           showNoMatchText  = "true"
                           filter           = "server"
                           sort             = "server"
                           onHeaderClick    = "MyEventHeaderClick"
                           table            = "<%= details %>"
                           iterator         = "<%= iterator %>" >
          </htmlb:tableView>
          <%
      if partner is not initial.
          %>
          <htmlb:inputField id      = "checked"
                            visible = "True"
                            value   = "<%= partner %>" />
                <script for="checked" language="javascript" event="onLoad()">
                       opener.document.form1.partner.value = <%= partner %>;
                       window.self.close();
          </script>
          <%
      endif.
          %>
        </htmlb:form>
      </htmlb:page>
    </htmlb:content>
    <b>Oncreate:</b>
    select partner from zcrmm_buag into corresponding fields of table details.
    <b>OnInputProcessing:</b>
    DATA: IND TYPE I.
      DATA: TV TYPE REF TO CL_HTMLB_TABLEVIEW.
      DATA: EVENT1 TYPE REF TO CL_HTMLB_EVENT.
      EVENT1 = CL_HTMLB_MANAGER=>GET_EVENT( RUNTIME->SERVER->REQUEST ).
      TV ?= CL_HTMLB_MANAGER=>GET_DATA(
      REQUEST = RUNTIME->SERVER->REQUEST
      NAME = 'tableView'
      ID = 'pop' ).
      IF TV IS NOT INITIAL.
        DATA: TV_DATA TYPE REF TO CL_HTMLB_EVENT_TABLEVIEW.
        TV_DATA = TV->DATA.
        IF TV_DATA->SELECTEDROWINDEX IS NOT INITIAL.
          FIELD-SYMBOLS: <row> LIKE LINE OF details.
        READ TABLE details INDEX tv_data->selectedrowindex ASSIGNING <row>.
    if <row> is assigned.
    partner = <row>-partner.
    endif.
        ENDIF.
      ENDIF.
    Any help is welcome.
    Regards,
    Rohit Khetarpal

    <i>actually when the pop up comes,the page on the back(i.e. Find.htm) shows error message as mentioned below..
    BSP exception: Access to URL /sap(bD1lbiZjPTAwMQ==)/bc/bsp/sap/z_startingwith/POST is forbidden</i>
    -->Remove "method="post" in FORM tag. I tested.
    <b>To pass the value from Find.htm to Help.htm</b> - see the below code
    <script language="JavaScript" type="text/javascript">
    document.onkeydown = function(){
    if(window.event && window.event.keyCode == 13)
    var val;
    val = document.getElementById("partner").value;
    * Here the VAL will have the value of query value(what user entered as Filter value) from Find.htm
    popUp=window.open('help.htm?partner'+val,'_blank', 'Emp Details','width=100,height=300');
    </script>
    <b>And also make the "Patner" in help.htm as "AUTO parameter.</b>
    Hope this will solve your peoblme.
    Raja T
    Message was edited by:
            Raja Thangamani

Maybe you are looking for