Cannot set attribute of the param element value using javascript in setAttribute

When adding the items param via createFragment the javascript in setAttribute function does not set the "value" attribute It is necessary to set the nodetext to add this attribute to the value of the param element.

Second, when using the method of the generated html code defines the 'value' to the innerHTML. HTML code resulting in the display by "Inspect the system" looks like this.

< parameter id = "myID" > myValue < / param >

Note: [the element close text < / param > is displayed correctly using inspect, but when using file-> SavePageAs the end text is not saved correctly.] I reported this in another question of moz. support FF.]

function setparamAttrs (parmID, parmVal)
{

var gData = document.createDocumentFragment();
 var newNode = document.createElement("param");
 var textStr = document.createTextNode(parmVal);
 newNode.appendChild(textStr);
 newNode.setAttribute("id", parmID);
 //newNode.setAttribute("value", parmVal);  // this does not work
 //newNode.setAttribute("innerHTML", parmVal);  //this does not work
 gData.appendChild(newNode);
 document.body.appendChild(gData);

}

However, I was able to retrieve the "value", once it has been added using:

var val = document.getElementById("parm0").value;)

getAttribute ("value") does not work either.

Finally, I added the param elements to my HTML code like this.
< parameter id = "myID" > myValue < / param >. Then I tried to extract the value using document.getElementById("myID").innerHTML. No text has been returned. When I looked at the HTML document with inspect my HTML param element is displayed as < param id = "myID" > myVal. The closing text of the element has not the same when I use SavePageAs which I mentioned previously.

Yes, this is the correct way to this code and it works for me without any problem.

Tags: Firefox

Similar Questions

  • I am reorganizing the attribute value using javascript. see code below

    Hi all

    I am reorganizing the attribute value using javascript. see code below and suggest me

    EX: id = "to THE:1" reorganize to id = "to THE:2"

    myDoc var = app.activeDocument;

    var myGlueCodePath = app.filePath + "/ Scripts/XML rules/glue code.jsx";

    var myFile = File (myGlueCodePath);

    app.doScript (myFile);

    If (app.documents.length! = 0) {}

    var myRuleSet = new Array)

    new findObjAttribute ("//auq")

    );

    {with (MyDoc)}

    var elements = xmlElements;

    __processRuleSet (Elements.Item (0), myRuleSet);

    }

    }

    else {}

    Alert ("you have no open documents!");

    Exit();

    }

    function findObjAttribute() {}

    myIdName = "findObjAttribute";

    This.XPath = ("[/ / auq[@id]");

    This.Apply = function (myElement, myRuleProcessor)

    {

    elmName = myElement var .markupTag .name;

    {with (MyElement)}

    try {}

    var myAttName = myElement .xmlAttributes .itemByName ("id") .value;

    SS var = myAttName.replace(/[A-Z]+\:/,""); "

    var SSS = ss - 1;

    myAttName = myAttName.replace(/[0-9]/,sss)

    $.writeln (myAttName);

    } catch (e) {};

    }

    }

    }

    Your code re - order the value correctly, but you don't have the update attribute in the element.

    Try this,

    myAttName = myAttName.replace(/[0-9]/,sss);

    myElement.xmlAttributes.itemByName("id").value = myAttName;

  • The text element values value when the user clicks a report line.

    The text element values value when the user clicks a report line.

    I have a report based on the EMP table and two elements P911_EMPNO, P911_DEPTNO. When I click on one of the lines the EMPNO and DEPTNO is copied to the text elements.
    It works fine if I leave the EMPNO and DEPTNO as SHOW report, but if I then these clear values are not retrieved the report form (my javascript is very limited).

    I need a method to retrieve the data hidden in the report and display in the text without the reposting of the page elements.

    Also, would be nice if the line was highlighted until another line is clicked but especially is my priority.

    Elements
    P911_EMPNO, P911_DEPTNO (field of disabled text, saves the State)

    Report
    Select * from emp using the model of report below.

    Custom model.
    standard_report_cust_P330-a copy of the standard report with a change model.
    BEFORE EACH LINE
    < tr onclick = "selectRow (this);" #HIGHLIGHT_ROW # >


    * Javascript in the Page Header.*
    < script language = "JavaScript1.1" type = "text/javascript" >
    function selectRow (p_tr)
    {
    var l_deptno = p_tr.childNodes [8] .innerHTML;
    var l_empno = p_tr.childNodes [1] .innerHTML;
    html_GetElement ('P911_DEPTNO'). Value = l_deptno;
    html_GetElement ('P911_EMPNO'). Value = l_empno;
    }
    < /script >

    If anyone has any ideas. Thanks, Pete

    Hello

    When you use this type of report model, you actually control on where the column values are used - and they can be used several times.

    For example, a setting of 'Model line 1' for one such model could be:

    <tr>
    <td class="c1">#1#</td>
    <td class="c2">#2#</td>
    <td class="c2">#3#</td>
    <td class="c2">#4#</td>
    <td class="c3">#5#</td>
    </tr>
    

    #1 # fact refers to the data in the first column, #2 # for the second and so on. So you can do:

    <tr onclick="javascript:dosomething('#1#','#2#');">
    <td class="c1">#1#</td>
    <td class="c2">#2#</td>
    <td class="c2">#3#</td>
    <td class="c3">#5#</td>
    </tr>
    

    For example, by clicking on the line would trigger the dosomething() function and pass in that the values of the first and second columns. Also note that the 4 # does not appear now - this column is 'hidden' (but note that you must check the box to show the column)

    Andy

  • You cannot set declaratively developing the slider if you specify an ONLOAD.

    Hello

    In my application, I have two javascript functions in the Html header area... and by calling the onload in the Body Html attribute... This sceneriao he launched an exception as shown below...



    1 error has occurred
    You cannot set declaratively developing the slider if you specify an ONLOAD in this attribute. You can set update of the slider programmatically by using the following syntax:
    OnLoad = "mystuff (); first_field(); »


    can u suggest me how to overcome this problem...


    Thank you
    David...

    Hi David,

    On your page, go to your page attributes and you will see that it is to set the focus on the first field when the page loads. You need to remove what you can have only a single onload function call. If you need to set the focus, your onload function is adjustable to do this.

    Andy

  • The operation cannot be performed because the "Firefox" element is in use.

    Whenever I try to download the latest version of Firefox on my mac, I get the following error:

    "The operation cannot be performed because the"Firefox"element is in use."

    I close Firefox and still get this error. I tried this guy 100 times and may not know how to solve this problem. Help!

    I have Mac OS X 10.6.8 v.

    Download the full Firefox installation program and save the file to the desktop
    https://www.Mozilla.org/en-us/Firefox/all.html

    If he has problems with the update or with the permissions then best is to download the full version and trash the version currently installed to do a fresh install of the new version.

    Download a new copy of the Firefox application and save the file to disk on the desktop image

    Your personal data are stored in the Firefox profile folder, so you will not lose your bookmarks and other data to personal when you uninstall and (re) install Firefox.

  • Setting value using javascript on the form of tables created by APEX_ITEM

    I can assign the value using javascript on normal form of table as below:

    var vRow = pThis.id.substr (pThis.id.indexOf ('_') + 1);
    $x_Value ('f05_' + vRow, 'Value');

    However I can't do the same if the tabular presentation is dynamically created by APEX_ITEM.

    Some tips on how to do this?

    Thank you

    If this should not be something like:

    this.id.substring(4, 8)
    

    Denes Kubicek
    -------------------------------------------------------------------
    http://deneskubicek.blogspot.com/
    http://www.Apress.com/9781430235125
    http://Apex.Oracle.com/pls/Apex/f?p=31517:1
    http://www.Amazon.de/Oracle-Apex-XE-Praxis/DP/3826655494
    -------------------------------------------------------------------

  • I am unable to PDF vacuum garbage.  I get a pop up: the operation cannot be completed because the item is in use.  Any suggestions?

    I am unable to PDF vacuum garbage.  I get a pop up: the operation cannot be completed because the item is in use.  Any suggestions?

    Are all the other apps open while you try to do this?

  • How to extract the second sysdate value using the EXTRACT function

    Hello

    I want to extract the second sysdate value using the EXTRACT function.
    When I run the following query I get an error;

    SELECT extract (second OF SYSDATE) FROM dual;

    ORA-30076: field of invalid extract for the source of the extract.

    When I do to extract the month I get the correct result.

    Is there some necessary formatting by specifying the sysdate (or any other date value) in the query. ?


    Thank you.

    You can extract only the year/month / day, day

    SQL> Select extract(year from sysdate) from dual;
    
    EXTRACT(YEARFROMSYSDATE)
    ------------------------
                        2008
    
    SQL> Select extract(day from sysdate) from dual;
    
    EXTRACT(DAYFROMSYSDATE)
    -----------------------
                         20
    
    SQL> Select extract(month from sysdate) from dual;
    
    EXTRACT(MONTHFROMSYSDATE)
    -------------------------
                           11
    
    IF you enter Minute or Seconds
    
    SQL>  Select extract(minute from sysdate) from dual;
     Select extract(minute from sysdate) from dual
                                *
    ERROR at line 1:
    ORA-30076: invalid extract field for extract source
    but with timestamp you can get the seconds
    
    SQL> select EXTRACT(second FROM current_timestamp) from dual;
    
    EXTRACT(SECONDFROMCURRENT_TIMESTAMP)
    ------------------------------------
                                  39.473
    
    SQL> select EXTRACT(second FROM current_timestamp) from dual;
    
    EXTRACT(SECONDFROMCURRENT_TIMESTAMP)
    ------------------------------------
                                  57.474
    
    SQL> /
    
    EXTRACT(SECONDFROMCURRENT_TIMESTAMP)
    ------------------------------------
                                  59.787
    
    SQL> /
    
    EXTRACT(SECONDFROMCURRENT_TIMESTAMP)
    ------------------------------------
                                    .412
    
    SQL> /
    
    EXTRACT(SECONDFROMCURRENT_TIMESTAMP)
    ------------------------------------
                                     .99
    
    SQL> /
    
    EXTRACT(SECONDFROMCURRENT_TIMESTAMP)
    ------------------------------------
                                   1.458
    
    SQL> /
    
    EXTRACT(SECONDFROMCURRENT_TIMESTAMP)
    ------------------------------------
                                   1.896
    
    SQL> /
    
    EXTRACT(SECONDFROMCURRENT_TIMESTAMP)
    ------------------------------------
                                   2.334
    

    Edited by: Viswarayar Maran on November 20, 2008 14:30

  • Table of attributes in the XML element and the element values. Is this possible?

    I use BI Publisher generator model for Word. I'm using Word 2007 and the patch 9821068 generator model.

    I'm trying to create a table using the table Wizard. The values in the column must be based on the attributes of the element and the element values. I have no control over the incoming data.

    Given the following XML:

    <? XML version = "1.0" encoding = "UTF-8"? >
    < valuesOverTime type = "fromServer" >
    < name aValue = "xyz" date = "2010-07-21" time = "" 15: 55:26 ' > 2 < / aValue > "
    < name aValue = 'abc' date = "2010-07-21" time = "" 15: 55:26 ' > 0 < / aValue > "
    < name aValue = "xyz" date = "2010-07-21" time = "" 15: 55:26 "> 42 < / aValue >"
    < name aValue = 'abc' date = "2010-07-21" time = "" 15: 55:26 "> 100 < / aValue >"
    < name aValue = "xyz" date = "2010-07-21" time = "" 15: 55:26 "> 17 < / aValue >"
    < name aValue = 'abc' date = "2010-07-21" time = "" 15: 55:26 ' > 0 < / aValue > "
    < name aValue = "xyz" date = "2010-07-21" time = "" 15: 55:26 "> 1 < / aValue >"
    < / valuesOverTime >

    Table I need should look like this:

    name date time aValue
    XYZ-2010-07-21 15:55:26 2
    ABC-2010-07-21 15:55:26 0
    XYZ-2010-07-21 15:55:26 42

    So far, that I can understand it.

    Any suggestions?

    Thank you
    -Matt
    
      
    
    
  • Need some advice on the form element values?

    Hi all

    I have a problem with the site that I am developing. Its a site of e-commerce for a memorial Masons. For each product/memorial there are several elements, menu drop-down menus and text fields to retrieve the necessary information, there is also a 'total' who, as customers make their choices, the amount of each item is added to this total. My problem is, on the two elements "engraved_designs" and "sandblasted_designs", I need to calculate this amount, but also I need to get the code of the design chosen for back-office reference. I can't use the price and code in the "value" attribute, that you stop the calculation of work function. So, how am I to get the amount to be calculated at the same time as being able to recover the chosen code when you submit the form?

    http://www.milesmemorials.com/product-GH54.html

    It's exactly the same principle.

    $engraved2 = explode (' #', $_POST ['engraved_designs2']);

    And this, in the body of the email:

    $email_body. = "engraved design: $engraved2 [1].» \n » ;

  • Inserting Image mystery using the attribute in the structured element

    I work in FM10 on Windows XP Pro. However, the models at the company where I am currently Contracting have been developed over the years, since the FM 7 or 8, with different authors and developers to refine their. Which makes them difficult to decipher at times.

    Currently, I'm trying to understand how elements of the notes works so I can fix it to work when you bind the FM source files to RoboHelp. When you click on the 'Note' parent element, you can choose from four different attributes (as shown below for ESD): note, tip, caution and warning.

    When you choose one of these attributes, it automatically inserts a graphic symbol (exclamation point, star, pencil, etc.). You then choose the next child element that creates a paragraph directly to the right of the graphic symbol.

    The problem is, I can't understand where this chart comes in the parent element and associated attributes. I thought it must be extracted from the style of paragraph, either as an image of the reference page and or symbols of the numbering of the paragraph Designer section. But I'm not either of those things anywhere. For what it's worth, the graphics look like they come from a police (see screenshot).

    The word "note" comes to the next child element and the associated paragraph style, it is designated in the numbering/AutoNumber Format: box with an associated font. The lines above and below it are similarly advanced/Frame Above / Below the FMP: setting. All this is quite easy; the attribute image... not so much.

    Can anyone tell me please where to hunt for the source of this image attribute insertion?

    ------------------------------------------------------fm_attributes.jpg

    ESD

    Element (container): Note

    General rule: stalks, NoteBody

    List of attributes

    Name: Id ID Unique in option

    Control flags: read-only, hidden

    Name: Type Optional choice

    Choice: Note, tip, warning

    Default: Note

    AutoText

    Insert automatically child: stems

    Element (container): NoteBody

    General rule: Para, (Para |) List) *.

    AutoText

    Insert automatically child: Para

    Element (container): stems

    General rule: < EMPTY >

    Text format rules

    If the context is: * < ParagonGuide

    If the context is: Note [Type = "Note"]

    Use paragraph format: Note.Icon

    Otherwise, if the context is: Note [Type = 'Attention']

    Use paragraph format: Note.Caution.Icon

    Otherwise, if the context is: Note [Type = "Tip"]

    Use paragraph format: Note.Tip.Icon

    On the other

    Use paragraph format: Note

    Rules of prefix

    If the context is: * < ParagonGuide

    If the context is: Note [Type = "Warning"]

    Prefix: Warnings not permitted in documents of Paragon.

    Range of text.

    Font properties

    Color: Red

    On the other...

    Hi Douglas,.

    I think I thought about it, although I can't prove it, but my inability to prove it is maybe the evidence itself. I know this is no logic, so please read on...

    In summary, I think that the images are caused by prefixes text inserted by ESD for the element, using the Zapfdingbats font.

    To review/summarize the structural architecture, your notes are made up of

    ... etc.

    ... Where he is the element which is containing the image and the , etc. items that contain the text of the note.

    My first idea was that when I open your file, I do not see the images; However, instead of one of the pictures missing, I get a message of missing fonts (and I have no Zapfdingbats). Here are the rules of prefix for the element (rough paste):

    Rules of prefix

    If the context is: *.<>

    If the context is: Note [Type = "Warning"]

    Prefix: Warnings not permitted in documents of Paragon.

    Range of text.

    Font properties

    Color: Red

    On the other

    Range of text.

    Otherwise, if the context is: *.< (list="" |="">

    If the context is: Note [Type = "Note"]

    Prefix: \t/

    Range of text.

    Font properties

    Family: Zapfdingbats

    Size: 22.0 pt

    Vertical offset: 28.0%

    Otherwise, if the context is: Note [Type = "Tip"]

    Prefix: \tH

    Range of text.

    Font properties

    Family: Zapfdingbats

    Size: 16.0 pt

    Vertical offset: 22.0%

    Otherwise, if the context is: Note [Type = 'Attention']

    Prefix: \t!

    Range of text.

    Font properties

    Family: TheSansExtraBold-Plain

    Size: 32.0 pt

    Vertical offset: 48.0%

    Otherwise, if the context is: Note [Type = "Warning"]

    Prefix: \t6

    Range of text.

    Font properties

    Family: Zapfdingbats

    Size: 16.0 pt

    Vertical offset: 24.0%

    On the other

    If the context is: Note [Type = "Note"]

    Prefix: /.

    Range of text.

    Font properties

    Family: Zapfdingbats

    Size: 22.0 pt

    Vertical offset: 28.0%

    Otherwise, if the context is: Note [Type = "Tip"]

    Prefix: H

    Range of text.

    Font properties

    Family: Zapfdingbats

    Size: 16.0 pt

    Vertical offset: 22.0%

    Otherwise, if the context is: Note [Type = 'Attention']

    Prefix:!

    Range of text.

    Font properties

    Family: TheSansExtraBold-Plain

    Size: 32.0 pt

    Vertical offset: 48.0%

    Otherwise, if the context is: Note [Type = "Warning"]

    Prefix: 6

    Range of text.

    Font properties

    Family: Zapfdingbats

    Size: 16.0 pt

    Vertical offset: 24.0%

    There are a whole bunch of prefixes text in there, but most use the Zapfdingbats font. This font is just a bunch of small icons as pencil your screenshot shows the image. For example, the line:

    Prefix: \t/

    .. .will be insert a tab, then a slash in Zapfdingbats. I bet that if you apply Zapfdingbats to one of you to the paragraphs, and then type a forward slash, you will get one of those pictures you've been see.

    The evidence would be to change these characters in the prefix rules and see if the images change. Because I have not the police, I can't do it. But because I can't do, it proves to me that the source is indeed the police and the prefix characters. Make sense now?

    Russ

  • POS cannot set start on the work of backup time

    Is there a restriction at a time, you can set a backup job to start, even within the backup window? I got two jobs on a POS. Daily work, I put to 17:00 (maint. window is 06:00 - 17:00) and I am trying to assign to the other (a weekly work) 18:00, but whenever I do that it changes the time on this at 22:00. VERY frustrating... I had the same problem when you try to set the work of 17:00 (the time I REALLY wish), but I thought that was not because he disliked only two jobs at the same time.

    Also, why is there not a way to define a task to accomplish certain days of the week? For example, I don't want my daily work to run Saturday, but with VDP, it's all or nothing with daily, weekly and monthly options. The reason for which I need not perform the daily backup operation on Saturday because I save a virtual machine the SQL DB on Saturday and for some reason any backup SQL VMs seems to take MUCH longer that the normal ones, especially if other backups are run at the same time.

    Which brings me to ANOTHER problem... My backups are simply not have finished in time. It seems usually only be SQL those who run MUCH more slowly, as I said, but sometimes that causes one of the other backups do not complete either. You tell me if a backup cannot be performed in the backup window, then it cannot be performed at all? This is ridiculous. The backup system simply is not available during the maintenance window? This makes it effectively useless 50% of the day (if windows maint. set to 12 hours, which seems as it should do in order to fulfil its tasks).

    I think it is a bug. I had the same problem today with a time of 22:00 at the request, and it drove me crazy.

    What I did everything first to duplicate work from 22:00 to a new job with the new time and she remained thin at 17:00. This is the #1 solution. For another job with the same problem, I just edited the work, follow the wizard through the steps, then changed the time at 17:00 and chose a NEW name for the job, then 17:00 also stayed on.

    Certainly a bug somewhere.

  • How to get the attributes from the list of values

    Hello

    I have two display objects, of 'Customer' and 'CustomerDetails '.
    'Client' view, has the attribute 'CustomerId' I've defined as LOV with view of 'CustomerDetails '.
    Like this:
    <ListBinding
        Name="LOV_CustomerId"
        ListVOName="CustomerDetailsView1"
        ListRangeSize="-1"
        NullValueFlag="start"
        NullValueId="${adfBundle['oracle.javatools.resourcebundle.SystemBundle']['NULL_VALUE_RESID']}"
        MRUCount="0">
        <AttrArray Name="AttrNames">
          <Item Value="CustomerId"/>
        </AttrArray>
        <AttrArray Name="ListAttrNames">
          <Item Value="Id"/>
        </AttrArray>
        <AttrArray Name="ListDisplayAttrNames">
          <Item Value="Name"/>
        </AttrArray>
        <DisplayCriteria/>
      </ListBinding>
    I hung out in the soc on my page
    <af:selectOneChoice value="#{bindings.CustomerId.inputValue}" label="#{bindings.CustomerId.label}"
          required="#{bindings.CustomerId.hints.mandatory}"
           shortDesc="#{bindings.CustomerId.hints.tooltip}" id="soc16" autoSubmit="true">
     <f:selectItems value="#{bindings.CustomerId.items}" id="si16"/>
    </af:selectOneChoice>
    In the 'CustomerDetails' view, there is also "address" attribute.
    I would like to get the address according to the ID.

    How could I get through links?
    or in another way.

    Thank you!!

    Hello

    You want to display the address that is present in VO from customer to customer details?

    If so,.

    Perform the following steps:

    1 - Create a transient with string type attribute customer details VO (always updated).
    2 - I hope you have an attribute customer id here attribute where you created LOV. When LOV created in create list of values jump towards the top in the list of return values assign the value of the address in the transitional attribute.

    If you put this attribute on the user interface you can see the customer address id value correspondent.

    Thank you
    Prateek

  • Select from a drop-down list and the specified element values are displayed in the textfield

    I need for one to be able to select from a list drop-down and specified the item values appear in textfield.

    For example, if I select Amy

    If I select Bob

    If I select Jane

    Amy

    Bob

    Jane (I want to appear as shown in the list)

    I associated a value to each item in the drop-down list so that the choice is easy to compare and determine what initial (default) value to the value in the text field. In my drop down list change event, I have the following:

    var sNewSel = this.boundItem (xfa.event.newText);

    Switch (sNewSel)

    {

    case '1': / / Amy

    TextField1.rawValue = "Amy \n";

    break;

    Switch (sNewSel)

    {

    case '2': / / Bob

    TextField1.rawValue = "Bob \n";

    break;

    Of course that's not work one name shows at a time. Help, please!

    Thank you

    Don't know what the code is supposed to do, but basically, you want to add the name of the drop-down list the addition on the current value of the TextField? Why not use the dropdownlist display value directly? For example on the change event:

    if ( TextField1.rawValue == null )
        TextField1.rawValue = xfa.event.newText;
    else
        TextField1.rawValue += ( "\n" + xfa.event.newText );
    
  • Error in SQL syntax when inserting data to the table in the form of values using insert record

    Hello

    I was hoping that someone could help me.  I am creating a form of registration on a website to insert data into a database table.  When you try to create the form, I get the following error:


    You have an error in your SQL syntax; consult the manual for your version of the MySQL server for the right syntax to use near ' VALUES (name, regno, reason) leave (has ', 1, 'dddd')' at line 1

    I checked the syntax, but you don't know what's wrong.

    I am running Windows 7 with Dw cs6 and wamp server.

    Leave with the names of column (name, regno, reason) is the name of the table.

    Thank you for your help and please help me.

    The code is as below:

    <? php require_once('Connections/connect.php');? >

    <? PHP

    If (! function_exists ("GetSQLValueString")) {}

    function GetSQLValueString ($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")

    {

    If (via PHP_VERSION < 6) {}

    $theValue = get_magic_quotes_gpc()? stripslashes ($TheValue): $theValue;

    }

    $theValue = function_exists ("mysql_real_escape_string")? mysql_real_escape_string ($TheValue): mysql_escape_string ($theValue);

    Switch ($theType) {}

    case 'text ':

    $theValue = ($theValue! = "")? « " ». $theValue. "" "": "NULL";

    break;

    case "long":

    case "int":

    $theValue = ($theValue! = "")? intval ($TheValue): 'NULL ';

    break;

    case "double":

    $theValue = ($theValue! = "")? doubleVal ($TheValue): 'NULL ';

    break;

    case "date":

    $theValue = ($theValue! = "")? « " ». $theValue. "" "": "NULL";

    break;

    case "set":

    $theValue = ($theValue! = "")? $theDefinedValue: $theNotDefinedValue;

    break;

    }

    Return $theValue;

    }

    }

    $editFormAction = $_SERVER ['PHP_SELF'];

    If (isset {}

    $editFormAction. = « ? ». htmlentities($_SERVER['QUERY_STRING']);

    }

    If ((isset($_POST["MM_insert"])) & & ($_POST ["MM_insert"] == "form1")) {}

    $insertSQL = sprintf ("INSERT INTO leave (name, regno, reason) VALUES (%s, %s, %s)',

    GetSQLValueString ($_POST ['name'], "text").

    GetSQLValueString ($_POST ['reg'], "int").

    GetSQLValueString ($_POST ['reason'], "text"));

    @mysql_select_db ($database_connect, $connect);

    $Result1 = mysql_query ($insertSQL, $connect) or die (mysql_error ());

    }

    ? >

    < ! DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict / / IN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" > ""

    " < html xmlns =" http://www.w3.org/1999/xhtml ">

    < head >

    < meta http-equiv = "content-type" content = text/html"; charset = utf-8 "/ >"

    < title > online form let < /title >

    < name meta = "keywords" content = "" / > "

    < name meta = "description" content = "" / > "

    < link href = "styless.css" rel = "stylesheet" type = "text/css" media = "screen" / > "

    < / head >

    < body >

    < div id = 'wrapper' >

    < div id = "header" >

    < div id = 'menu' >

    < ul >

    < class li = "current_page_item" > < a href = "#" > home < /a > < /li >

    < li > < /li >

    < li > < /li >

    < li > < a href = "#" > on < /a > < /li >

    < li > < /li >

    < li > < a href = "#" > Contact < /a > < /li >

    < /ul >

    < / div >

    <!-end #menu->

    < div id = "Search" >

    < / div >

    <!-end #search->

    < / div >

    <!-end #header->

    < div id = "logo" >

    E - SCHOOL of CHRIST < h1 > < / h1 >

    < p > < / p >

    < / div >

    < hr / >

    <!-end #logo->

    <! - end #header - wrapper->

    < div id = "page" >

    < div id = "content" >

    < div class = "post" >

    < h2 class = "title" > leave application online < / h2 >

    < div class = "entry" > < / div >

    < / div >

    < do action = "<?" PHP echo $editFormAction;? ">" method = "POST" name = "form1" id = "form1" >

    < table width = "200" border = "2" cellspacing = "5" cellpadding = "5" >

    < b >

    < scope th 'row' = > name < /th >

    < td > < label for = "name" > < / label >

    < input type = "text" name = "name" id = "name" / > < table >

    < /tr >

    < b >

    < scope = "row" th > Reg No. < /th >

    < td > < label for = "reg" > < / label >

    < input type = "text" name = "reg" id = "reg" / > < table >

    < /tr >

    < b >

    < scope = "row" th > why < /th >

    < td > < label for = "reason" > < / label >

    < name textarea = 'reason' id = cols 'reason' = "45" rows = "5" > < / textarea > < table >

    < /tr >

    < b >

    < scope = "row" th > < /th >

    < td > < input type = "submit" name = "b1" id = "b1" value = "Submit" / > < table >

    < /tr >

    < /table >

    < input type = "hidden" name = "MM_insert" value = "form1" / >

    < / make >

    < / div >

    <!-end #content->

    < div id = "sidebar" >

    < ul >

    < li >

    Notice of < h2 > < / h2 >

    < p > students must present the appropriate documents supporting the reason for leave within 3 working days. < /p >

    < /li >

    < li id = "calendar" >

    Calendar < h2 > < / h2 >

    < div id = "calendar_wrap" >

    < table summary = "Calendar" >

    < caption >

    March 2014

    < / legend >

    < thead >

    < b >

    < th abbr = "Monday" scope = "col" title = "Monday" > M < /th >

    < th abbr = "Tuesday" scope = "col" title = "Tuesday" > T < /th >

    < th abbr = "Wednesday" scope = "col" title = "Wednesday" > W < /th >

    < th abbr = "Thursday" scope = "col" title = 'Thursday' > T < /th >

    < th abbr = "Friday" scope = "col" title = 'Friday' > F < /th >

    < th abbr = "Saturday" scope = "col" title = 'Saturday' > S < /th >

    < th abbr = "Sunday" scope = "col" title = 'Sunday' > S < /th >

    < /tr >

    < / thead >

    < tfoot >

    < b >

    < td abbr = "February" colspan = "3" id = "prev" > < a href = "#" title = "" > & laquo; Feb < /a > < table >

    < class td = "pad" > < table >

    < td abbr = "April" colspan = "3" id = "next" > < a href = "#" title = "" > Apr & raquo; < /a > < table >

    < /tr >

    < / tfoot >

    < tbody >

    < b >

    < td colspan = "5" class = "pad" > < table >

    < td > < table > 1

    < td > < table > 2

    < /tr >

    < b >

    < td > 3 < table >

    < td > < table > 4

    < td > 5 < table >

    < td > < table > 6

    < td > < table > 7

    < td > < table > 8

    < td > < table > 9

    < /tr >

    < b >

    < td > < table > 10

    < td id = 'today' > < table > 11

    < td > < table > 12

    < td > < table > 13

    < td > < table > 14

    < td > < table > 15

    < td > < table > 16

    < /tr >

    < b >

    < td > < table > 17

    < td > < table > 18

    < td > < table > 19

    < td > < table > 20

    < td > < table > 21

    < td > < table > 22

    < td > < table > 23

    < /tr >

    < b >

    < td > < table > 24

    < td > < table > 25

    < td > < table > 26

    < td > < table > 27

    < td > < table > 28

    < td > < table > 29

    < td > < table > 30

    < /tr >

    < b >

    < td > < table > 31

    < class td = "pad" colspan = "6" > < table >

    < /tr >

    < / tbody >

    < /table >

    < / div >

    < /li >

    < li > < /li >

    < /ul >

    < / div >

    <!-end #sidebar->

    < div style = "" clear: both; "> < / div >"

    < / div >

    <!-end #page->

    < div id = "footer" >

    < p > Copyright (c) University of Christ. All rights reserved. < /p >

    < / div >

    <!-end #footer->

    < / div >

    < div align = center > < / div > < / body >

    < / html >

    The LEAVE is a reserved word in MySQL. You can try to quote, but you are better to rename it.

Maybe you are looking for