• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 468
  • Last Modified:

Submit Button Error

Anybody know why when I click submit, I get a js error saying "Object expected".  The error points to my submit button.

<table style="width: 100%">
				<tr>
								<td colspan="2">New Deliverable</td>
				</tr>
				<tr>
								<td style="width: 313px">Deliverable Name</td>
								<td><input name="DeliverableName" type="text" id="txtDeliverableName" /></td>
				</tr>
				<tr>
								<td style="width: 313px">FY</td>
								<td>
								  <select name="Select1" id="drpdFY">
									<option></option>
								  </select>
								</td>
				</tr>
				<tr>
								<td style="width: 313px">Activity</td>
								<td>
								  <select name="Select2" id="drpdActivity">
									<option></option>
								  </select>
						        </td>
				</tr>
				<tr>
								<td style="width: 313px">Function</td>
								<td>
									<select name="Select3" id="drpdFunction">
									  <option></option>
									</select>
								</td>
				</tr>
				<tr>
								<td style="width: 313px; height: 29px;">Project</td>
								<td style="height: 29px"><input name="Text2" type="text" id="txtProject" /></td>
				</tr>
				<tr>
								<td style="width: 313px">Government Lead</td>
								<td>
									<select id="drpdGovtLead">
									  <option></option>
									</select>
								</td>
				</tr>
				<tr>
								<td style="width: 313px">Product</td>
								<td><input type="text" id="txtProduct" /></td>
				</tr>
				<tr>
								<td style="width: 313px">Performer</td>
								<td>
									<select name="Select5" id="drpdPerformer">
									  <option></option>
									</select>
								</td>
				</tr>
				<tr>
								<td style="width: 313px">Performer POCs</td>
								<td>
									<select name="Select6" id="drpdPerformerPoc">
									  <option></option>
									</select>
								</td>
				</tr>
				<tr>
								<td style="width: 313px">Description</td>
								<td><textarea name="TextArea1" cols="20" rows="2" id="textADescription"></textarea></td>
				</tr>
				<tr>
								<td style="width: 313px">Start Date</td>
								<td>&nbsp;</td>
				</tr>
				<tr>
								<td style="width: 313px">End Date</td>
								<td>&nbsp;</td>
				</tr>
				<tr>
								<td style="width: 313px">Status</td>
								<td>
									<select name="Select7" id="drpdStatus">
									   <option></option>
									</select>
								</td>
				</tr>
				<tr>
								<td style="width: 313px">Completion Date</td>
								<td>&nbsp;</td>
				</tr>
				<tr>
								<td style="width: 313px">AOT Designator</td>
								<td>
									<select name="Select8" id="drpdAotDesignator">
										<option></option>
									</select>
								</td>
				</tr>
				<tr>
								<td style="width: 313px">Realm</td>
								<td>
												<select name="Select9" id="drpdRealm">
												<option></option>
												</select></td>
				</tr>
				<tr>
								<td style="width: 313px">Planned</td>
								<td>

												<input name="Text4" type="text" id="txtPlanned" /></td>
				</tr>
				<tr>
								<td style="width: 313px">Staff Months</td>
								<td>

												<input name="Text6" type="text" id="txtStaffMonths" /></td>
				</tr>
				<tr>
								<td style="width: 313px; height: 29px;">Planned Funding</td>
								<td style="height: 29px">

												<input name="Text5" type="text" id="txtPlannedFunding" /></td>
				</tr>
				<tr>
								<td style="width: 313px">Contract</td>
								<td>
												<select name="Select10" id="drpdContract">
												<option></option>
												</select></td>
				</tr>
				<tr>
								<td colspan="2">
								<input type="button" id="SubmitButton" value="Submit" onclick="SubmitButtonClick(this)" />
								&nbsp;</td>
				</tr>
</table>


<!-- Begin Javascript and JQuery -->
<script type="text/javascript" src="../jquery-1.8.2.min.js" language="javascript"></script>
<script type="text/javascript" src="../jquery.SPServices-0.7.2.min.js" language="javascript"></script>
<script type="text/javascript" src="../jquery-ui-LatestVersion.js" language="javascript"></script>
<script type="text/javascript">





$(document).ready(function() {
alert("Hello World: "+drpdContract);
alert($().SPServices.SPGetCurrentSite());

function SubmitButtonClick(element)
{
alert("Deliverable name is: "+txtDeliverableName);
	var txtDeliverableName = $("#txtDeliverableName").val();
	var drpFY = $("#drpFY").val();
	var drpdActivity = $("#drpdActivity").val();
	var drpdFunction = $("#drpdFunction").val();
	var txtProject = $("#txtProject").val();
	var drpdGovtLead = $("#drpdGovtLead").val();
	var txtProduct = $("#txtProduct").val();
	var drpdPerformer = $("#drpdPerformer").val();
	var drpdPerformerPoc = $("#drpdPerformerPoc").val();
	var textADescription = $("#textADescription").val();
	var drpdStatus = $("#drpdStatus").val();
	var drpdAotDesignator = $("#drpdAotDesignator").val();
	var drpdRealm = $("#drpdRealm").val();
	var txtPlanned = $("#txtPlanned").val();
	var txtStaffMonths = $("#txtStaffMonths").val();
	var txtPlannedFunding = $("#txtPlannedFunding").val();
	var drpdContract = $("#drpdContract").val();
	
	
}



})



</script>

Open in new window

0
Isaac
Asked:
Isaac
  • 10
  • 4
  • 4
  • +1
2 Solutions
 
GaryCommented:
$("#drpFY").val() - doesn't exist in your code
0
 
IsaacSharePoint Client Side DeveloperAuthor Commented:
I still get the same error.
I commented out everything in the function and added alert("HELLO") but i still get the same function.
0
 
Dave BaldwinFixer of ProblemsCommented:
Javascript for a form is normally put in the <form> tag in 'onsubmit'.  That associates it with the 'form' object.  Putting it in the submit button does not associate it with the <input> elements.  I don't see <form> tags in that code that would define it as a form that could be submitted.  Without the <form> tags, it's just a random collection of elements.

http://www.w3schools.com/html/html_forms.asp
0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
IsaacSharePoint Client Side DeveloperAuthor Commented:
I'm using it in sharepoint, so it should not matter.
When I got on this project, there was another form out there with not <form> tag and it works.
0
 
IsaacSharePoint Client Side DeveloperAuthor Commented:
I added the form tag and still got the same error.
0
 
Dave BaldwinFixer of ProblemsCommented:
As far as I know, Sharepoint doesn't rewrite the rules of HTML.  Try putting it in the 'onsubmit' in the <form> tag so it will be associated with the form object.
<form name="frm1" action="submit.htm" onsubmit="SubmitButtonClick(this)">

Open in new window

http://www.w3schools.com/jsref/event_form_onsubmit.asp
0
 
IsaacSharePoint Client Side DeveloperAuthor Commented:
That did not work.  I did not get an error but nothing happened either.
0
 
Dave BaldwinFixer of ProblemsCommented:
Here is a very simplified but working version.  The 'button' actually needs to be a type="submit" or an type="image" (which is defined as a submit).  type="button" doesn't work for this.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
 "http://www.w3.org/TR/html4/loose.dtd">

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" >
<title>Form Alert</title>
<!-- FormAlert.html -->
<script type="text/javascript">

function SubmitButtonClick() {
	var txtDeliverableName = document.getElementById("txtDeliverableName").value;
	alert("Deliverable name is: "+txtDeliverableName);
	return false;
	}

</script>
</head>
<body>
<h1>Form Alert</h1>
<form name="frm1" action="#" method="get" onsubmit="SubmitButtonClick();">
<table style="width: 100%">
	<tr><td colspan="2"><b>New Deliverable</b></td></tr>
	<tr>
		<td style="width: 313px">Deliverable Name</td>
		<td><input name="DeliverableName" type="text" id="txtDeliverableName" value="DeliverableName" /></td>
	</tr>

	<tr>
		<td colspan="2">
		<input type="submit" id="SubmitButton" value="Submit" />
		</td>
	</tr>
</table>
</form>

</body>
</html>

Open in new window

0
 
GaryCommented:
You are also alerting txtDeliverableName before it is declared.
0
 
IsaacSharePoint Client Side DeveloperAuthor Commented:
I will give that a try but we have another page with a form with the same setup I have that works.  Thx!
0
 
GaryCommented:
If it's not defined you will get an error, simple as that - it cannot work.
0
 
IsaacSharePoint Client Side DeveloperAuthor Commented:
What do you mean "defined"?
0
 
IsaacSharePoint Client Side DeveloperAuthor Commented:
oh,  i see what you mean GaryC123....
0
 
IsaacSharePoint Client Side DeveloperAuthor Commented:
DaveBaldwin, when I changed to type="Submit", I don't get an error anymore but the contents of my SubmitButtonClick() does not fire either.


GaryC123, when I change the code to the following below, I still get an error:

function SubmitButtonClick(element)
{
alert("HELLO");
//alert("Deliverable name is: "+txtDeliverableName);
	//var txtDeliverableName = $("#txtDeliverableName").val();
	/*var drpFY = $("#drpdFYi").val();
	var drpdActivity = $("#drpdActivity").val();
	var drpdFunction = $("#drpdFunction").val();
	var txtProject = $("#txtProject").val();
	var drpdGovtLead = $("#drpdGovtLead").val();
	var txtProduct = $("#txtProduct").val();
	var drpdPerformer = $("#drpdPerformer").val();
	var drpdPerformerPoc = $("#drpdPerformerPoc").val();
	var textADescription = $("#textADescription").val();
	var drpdStatus = $("#drpdStatus").val();
	var drpdAotDesignator = $("#drpdAotDesignator").val();
	var drpdRealm = $("#drpdRealm").val();
	var txtPlanned = $("#txtPlanned").val();
	var txtStaffMonths = $("#txtStaffMonths").val();
	var txtPlannedFunding = $("#txtPlannedFunding").val();
	var drpdContract = $("#drpdContract").val();*/
	
	
}

Open in new window


Anymore suggestions?
0
 
GaryCommented:
Take your function out of the document ready function
As you are using jquery it would be easier to just attach the function to the onclick event.

p.s. don't use tables for layout.
0
 
Dave BaldwinFixer of ProblemsCommented:
The simple example I posted above works.  But it is free of the errors in your code.  And Gary123 is right, the alert for the form should not be in the '$(document).ready(function()' section.

I suggest you take my version above, add things to it one item at a time, and test them to make sure they work before you add the next item.  That's basically the way I do things and it always works out for me.
0
 
manojceCommented:
Hi,

Please try below code.

 <table style="width: 100%">
        <tr>
            <td colspan="2">New Deliverable</td>
        </tr>
        <tr>
            <td style="width: 313px">Deliverable Name</td>
            <td>
                <input name="DeliverableName" type="text" id="txtDeliverableName" /></td>
        </tr>
        <tr>
            <td style="width: 313px">FY</td>
            <td>
                <select name="Select1" id="drpdFY">
                    <option></option>
                </select>
            </td>
        </tr>
        <tr>
            <td style="width: 313px">Activity</td>
            <td>
                <select name="Select2" id="drpdActivity">
                    <option></option>
                </select>
            </td>
        </tr>
        <tr>
            <td style="width: 313px">Function</td>
            <td>
                <select name="Select3" id="drpdFunction">
                    <option></option>
                </select>
            </td>
        </tr>
        <tr>
            <td style="width: 313px; height: 29px;">Project</td>
            <td style="height: 29px">
                <input name="Text2" type="text" id="txtProject" /></td>
        </tr>
        <tr>
            <td style="width: 313px">Government Lead</td>
            <td>
                <select id="drpdGovtLead">
                    <option></option>
                </select>
            </td>
        </tr>
        <tr>
            <td style="width: 313px">Product</td>
            <td>
                <input type="text" id="txtProduct" /></td>
        </tr>
        <tr>
            <td style="width: 313px">Performer</td>
            <td>
                <select name="Select5" id="drpdPerformer">
                    <option></option>
                </select>
            </td>
        </tr>
        <tr>
            <td style="width: 313px">Performer POCs</td>
            <td>
                <select name="Select6" id="drpdPerformerPoc">
                    <option></option>
                </select>
            </td>
        </tr>
        <tr>
            <td style="width: 313px">Description</td>
            <td>
                <textarea name="TextArea1" cols="20" rows="2" id="textADescription"></textarea></td>
        </tr>
        <tr>
            <td style="width: 313px">Start Date</td>
            <td>&nbsp;</td>
        </tr>
        <tr>
            <td style="width: 313px">End Date</td>
            <td>&nbsp;</td>
        </tr>
        <tr>
            <td style="width: 313px">Status</td>
            <td>
                <select name="Select7" id="drpdStatus">
                    <option></option>
                </select>
            </td>
        </tr>
        <tr>
            <td style="width: 313px">Completion Date</td>
            <td>&nbsp;</td>
        </tr>
        <tr>
            <td style="width: 313px">AOT Designator</td>
            <td>
                <select name="Select8" id="drpdAotDesignator">
                    <option></option>
                </select>
            </td>
        </tr>
        <tr>
            <td style="width: 313px">Realm</td>
            <td>
                <select name="Select9" id="drpdRealm">
                    <option></option>
                </select></td>
        </tr>
        <tr>
            <td style="width: 313px">Planned</td>
            <td>

                <input name="Text4" type="text" id="txtPlanned" /></td>
        </tr>
        <tr>
            <td style="width: 313px">Staff Months</td>
            <td>

                <input name="Text6" type="text" id="txtStaffMonths" /></td>
        </tr>
        <tr>
            <td style="width: 313px; height: 29px;">Planned Funding</td>
            <td style="height: 29px">

                <input name="Text5" type="text" id="txtPlannedFunding" /></td>
        </tr>
        <tr>
            <td style="width: 313px">Contract</td>
            <td>
                <select name="Select10" id="drpdContract">
                    <option></option>
                </select></td>
        </tr>
        <tr>
            <td colspan="2">
                <input type="button" id="SubmitButton" value="Submit" />
                &nbsp;</td>
        </tr>
    </table>


    <!-- Begin Javascript and JQuery -->
    <script type="text/javascript" src="../jquery-1.8.2.min.js" language="javascript"></script>
    <script type="text/javascript" src="../jquery.SPServices-0.7.2.min.js" language="javascript"></script>
    <script type="text/javascript" src="../jquery-ui-LatestVersion.js" language="javascript"></script>
    <script type="text/javascript">

        $(document).ready(function () {
            alert("Hello World: " + $("#drpdContract").val());
            alert($().SPServices.SPGetCurrentSite());

            $("#SubmitButton").click(function () {
                alert("Deliverable name is: " + $("#txtDeliverableName").val());
                var txtDeliverableName = $("#txtDeliverableName").val();
                var drpFY = $("#drpFY").val();
                var drpdActivity = $("#drpdActivity").val();
                var drpdFunction = $("#drpdFunction").val();
                var txtProject = $("#txtProject").val();
                var drpdGovtLead = $("#drpdGovtLead").val();
                var txtProduct = $("#txtProduct").val();
                var drpdPerformer = $("#drpdPerformer").val();
                var drpdPerformerPoc = $("#drpdPerformerPoc").val();
                var textADescription = $("#textADescription").val();
                var drpdStatus = $("#drpdStatus").val();
                var drpdAotDesignator = $("#drpdAotDesignator").val();
                var drpdRealm = $("#drpdRealm").val();
                var txtPlanned = $("#txtPlanned").val();
                var txtStaffMonths = $("#txtStaffMonths").val();
                var txtPlannedFunding = $("#txtPlannedFunding").val();
                var drpdContract = $("#drpdContract").val();


            });



        })

    </script>

Open in new window


Let me know if you have any issue.

Thanks,
0
 
IsaacSharePoint Client Side DeveloperAuthor Commented:
So, I got it working.  I did not need the <Form> tags.  GaryC123 was right with his comments.
THanks!

<table style="width: 100%">
				<tr>
								<td colspan="2">New Deliverable</td>
				</tr>
				<tr>
								<td style="width: 313px">Deliverable Name</td>
								<td><input name="DeliverableName" type="text" id="txtDeliverableName" /></td>
				</tr>
				<tr>
								<td style="width: 313px">FY</td>
								<td>
								  <select name="Select1" id="drpdFY">
									<option></option>
								  </select>
								</td>
				</tr>
				<tr>
								<td style="width: 313px">Activity</td>
								<td>
								  <select name="Select2" id="drpdActivity">
									<option></option>
								  </select>
						        </td>
				</tr>
				<tr>
								<td style="width: 313px">Function</td>
								<td>
									<select name="Select3" id="drpdFunction">
									  <option></option>
									</select>
								</td>
				</tr>
				<tr>
								<td style="width: 313px; height: 29px;">Project</td>
								<td style="height: 29px"><input name="Text2" type="text" id="txtProject" /></td>
				</tr>
				<tr>
								<td style="width: 313px">Government Lead</td>
								<td>
									<select id="drpdGovtLead">
									  <option></option>
									</select>
								</td>
				</tr>
				<tr>
								<td style="width: 313px">Product</td>
								<td><input type="text" id="txtProduct" /></td>
				</tr>
				<tr>
								<td style="width: 313px">Performer</td>
								<td>
									<select name="Select5" id="drpdPerformer">
									  <option></option>
									</select>
								</td>
				</tr>
				<tr>
								<td style="width: 313px">Performer POCs</td>
								<td>
									<select name="Select6" id="drpdPerformerPoc">
									  <option></option>
									</select>
								</td>
				</tr>
				<tr>
								<td style="width: 313px">Description</td>
								<td><textarea name="TextArea1" cols="20" rows="2" id="textADescription"></textarea></td>
				</tr>
				<tr>
								<td style="width: 313px">Start Date</td>
								<td>&nbsp;</td>
				</tr>
				<tr>
								<td style="width: 313px">End Date</td>
								<td>&nbsp;</td>
				</tr>
				<tr>
								<td style="width: 313px">Status</td>
								<td>
									<select name="Select7" id="drpdStatus">
									   <option></option>
									</select>
								</td>
				</tr>
				<tr>
								<td style="width: 313px">Completion Date</td>
								<td>&nbsp;</td>
				</tr>
				<tr>
								<td style="width: 313px">AOT Designator</td>
								<td>
									<select name="Select8" id="drpdAotDesignator">
										<option></option>
									</select>
								</td>
				</tr>
				<tr>
								<td style="width: 313px">Realm</td>
								<td>
												<select name="Select9" id="drpdRealm">
												<option></option>
												</select></td>
				</tr>
				<tr>
								<td style="width: 313px">Planned</td>
								<td>

												<input name="Text4" type="text" id="txtPlanned" /></td>
				</tr>
				<tr>
								<td style="width: 313px">Staff Months</td>
								<td>

												<input name="Text6" type="text" id="txtStaffMonths" /></td>
				</tr>
				<tr>
								<td style="width: 313px; height: 29px;">Planned Funding</td>
								<td style="height: 29px">

												<input name="Text5" type="text" id="txtPlannedFunding" /></td>
				</tr>
				<tr>
								<td style="width: 313px">Contract</td>
								<td>
												<select name="Select10" id="drpdContract">
												<option></option>
												</select></td>
				</tr>
				<tr>
								<td colspan="2">
								<input type="button" id="SubmitButton" value="Submit" onclick="SubmitButtonClick(this)" />
								&nbsp;</td>
				</tr>
</table>


<!-- Begin Javascript and JQuery -->
<script type="text/javascript" src="../jquery-1.8.2.min.js" language="javascript"></script>
<script type="text/javascript" src="../jquery.SPServices-0.7.2.min.js" language="javascript"></script>
<script type="text/javascript" src="../jquery-ui-LatestVersion.js" language="javascript"></script>
<script type="text/javascript">





$(document).ready(function() {
alert($().SPServices.SPGetCurrentSite());

function SubmitButtonClick(element)
{
alert("Deliverable name is: "+txtDeliverableName); //<-- Can't do this
	var txtDeliverableName = $("#txtDeliverableName").val();
	var drpFY = $("#drpFY").val();
	var drpdActivity = $("#drpdActivity").val();
	var drpdFunction = $("#drpdFunction").val();
	var txtProject = $("#txtProject").val();
	var drpdGovtLead = $("#drpdGovtLead").val();
	var txtProduct = $("#txtProduct").val();
	var drpdPerformer = $("#drpdPerformer").val();
	var drpdPerformerPoc = $("#drpdPerformerPoc").val();
	var textADescription = $("#textADescription").val();
	var drpdStatus = $("#drpdStatus").val();
	var drpdAotDesignator = $("#drpdAotDesignator").val();
	var drpdRealm = $("#drpdRealm").val();
	var txtPlanned = $("#txtPlanned").val();
	var txtStaffMonths = $("#txtStaffMonths").val();
	var txtPlannedFunding = $("#txtPlannedFunding").val();
	var drpdContract = $("#drpdContract").val();
	
	
}



})



</script>

Open in new window

0
 
IsaacSharePoint Client Side DeveloperAuthor Commented:
<table style="width: 100%">
                        <tr>
                                                <td colspan="2">New Deliverable</td>
                        </tr>
                        <tr>
                                                <td style="width: 313px">Deliverable Name</td>
                                                <td><input name="DeliverableName" type="text" id="txtDeliverableName" /></td>
                        </tr>
                        <tr>
                                                <td style="width: 313px">FY</td>
                                                <td>
                                                  <select name="Select1" id="drpdFY">
                                                      <option></option>
                                                  </select>
                                                </td>
                        </tr>
                        <tr>
                                                <td style="width: 313px">Activity</td>
                                                <td>
                                                  <select name="Select2" id="drpdActivity">
                                                      <option></option>
                                                  </select>
                                            </td>
                        </tr>
                        <tr>
                                                <td style="width: 313px">Function</td>
                                                <td>
                                                      <select name="Select3" id="drpdFunction">
                                                        <option></option>
                                                      </select>
                                                </td>
                        </tr>
                        <tr>
                                                <td style="width: 313px; height: 29px;">Project</td>
                                                <td style="height: 29px"><input name="Text2" type="text" id="txtProject" /></td>
                        </tr>
                        <tr>
                                                <td style="width: 313px">Government Lead</td>
                                                <td>
                                                      <select id="drpdGovtLead">
                                                        <option></option>
                                                      </select>
                                                </td>
                        </tr>
                        <tr>
                                                <td style="width: 313px">Product</td>
                                                <td><input type="text" id="txtProduct" /></td>
                        </tr>
                        <tr>
                                                <td style="width: 313px">Performer</td>
                                                <td>
                                                      <select name="Select5" id="drpdPerformer">
                                                        <option></option>
                                                      </select>
                                                </td>
                        </tr>
                        <tr>
                                                <td style="width: 313px">Performer POCs</td>
                                                <td>
                                                      <select name="Select6" id="drpdPerformerPoc">
                                                        <option></option>
                                                      </select>
                                                </td>
                        </tr>
                        <tr>
                                                <td style="width: 313px">Description</td>
                                                <td><textarea name="TextArea1" cols="20" rows="2" id="textADescription"></textarea></td>
                        </tr>
                        <tr>
                                                <td style="width: 313px">Start Date</td>
                                                <td>&nbsp;</td>
                        </tr>
                        <tr>
                                                <td style="width: 313px">End Date</td>
                                                <td>&nbsp;</td>
                        </tr>
                        <tr>
                                                <td style="width: 313px">Status</td>
                                                <td>
                                                      <select name="Select7" id="drpdStatus">
                                                         <option></option>
                                                      </select>
                                                </td>
                        </tr>
                        <tr>
                                                <td style="width: 313px">Completion Date</td>
                                                <td>&nbsp;</td>
                        </tr>
                        <tr>
                                                <td style="width: 313px">AOT Designator</td>
                                                <td>
                                                      <select name="Select8" id="drpdAotDesignator">
                                                            <option></option>
                                                      </select>
                                                </td>
                        </tr>
                        <tr>
                                                <td style="width: 313px">Realm</td>
                                                <td>
                                                                        <select name="Select9" id="drpdRealm">
                                                                        <option></option>
                                                                        </select></td>
                        </tr>
                        <tr>
                                                <td style="width: 313px">Planned</td>
                                                <td>

                                                                        <input name="Text4" type="text" id="txtPlanned" /></td>
                        </tr>
                        <tr>
                                                <td style="width: 313px">Staff Months</td>
                                                <td>

                                                                        <input name="Text6" type="text" id="txtStaffMonths" /></td>
                        </tr>
                        <tr>
                                                <td style="width: 313px; height: 29px;">Planned Funding</td>
                                                <td style="height: 29px">

                                                                        <input name="Text5" type="text" id="txtPlannedFunding" /></td>
                        </tr>
                        <tr>
                                                <td style="width: 313px">Contract</td>
                                                <td>
                                                                        <select name="Select10" id="drpdContract">
                                                                        <option></option>
                                                                        </select></td>
                        </tr>
                        <tr>
                                                <td colspan="2">
                                                <input type="button" id="SubmitButton" value="Submit" onclick="SubmitButtonClick(this)" />
                                                &nbsp;</td>
                        </tr>
</table>


<!-- Begin Javascript and JQuery -->
<script type="text/javascript" src="../jquery-1.8.2.min.js" language="javascript"></script>
<script type="text/javascript" src="../jquery.SPServices-0.7.2.min.js" language="javascript"></script>
<script type="text/javascript" src="../jquery-ui-LatestVersion.js" language="javascript"></script>
<script type="text/javascript">





$(document).ready(function() {
alert($().SPServices.SPGetCurrentSite());


})

function SubmitButtonClick(element)
{

      var txtDeliverableName = $("#txtDeliverableName").val();
      var drpFY = $("#drpFY").val();
      var drpdActivity = $("#drpdActivity").val();
      var drpdFunction = $("#drpdFunction").val();
      var txtProject = $("#txtProject").val();
      var drpdGovtLead = $("#drpdGovtLead").val();
      var txtProduct = $("#txtProduct").val();
      var drpdPerformer = $("#drpdPerformer").val();
      var drpdPerformerPoc = $("#drpdPerformerPoc").val();
      var textADescription = $("#textADescription").val();
      var drpdStatus = $("#drpdStatus").val();
      var drpdAotDesignator = $("#drpdAotDesignator").val();
      var drpdRealm = $("#drpdRealm").val();
      var txtPlanned = $("#txtPlanned").val();
      var txtStaffMonths = $("#txtStaffMonths").val();
      var txtPlannedFunding = $("#txtPlannedFunding").val();
      var drpdContract = $("#drpdContract").val();
      
      
}


</script>
0

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

  • 10
  • 4
  • 4
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now