Solved

Submit Button Error

Posted on 2013-05-11
19
450 Views
Last Modified: 2013-05-13
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
Comment
Question by:Isaac
  • 10
  • 4
  • 4
  • +1
19 Comments
 
LVL 58

Expert Comment

by:Gary
Comment Utility
$("#drpFY").val() - doesn't exist in your code
0
 
LVL 5

Author Comment

by:Isaac
Comment Utility
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
 
LVL 82

Expert Comment

by:Dave Baldwin
Comment Utility
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
 
LVL 5

Author Comment

by:Isaac
Comment Utility
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
 
LVL 5

Author Comment

by:Isaac
Comment Utility
I added the form tag and still got the same error.
0
 
LVL 82

Expert Comment

by:Dave Baldwin
Comment Utility
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
 
LVL 5

Author Comment

by:Isaac
Comment Utility
That did not work.  I did not get an error but nothing happened either.
0
 
LVL 82

Expert Comment

by:Dave Baldwin
Comment Utility
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
 
LVL 58

Expert Comment

by:Gary
Comment Utility
You are also alerting txtDeliverableName before it is declared.
0
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

 
LVL 5

Author Comment

by:Isaac
Comment Utility
I will give that a try but we have another page with a form with the same setup I have that works.  Thx!
0
 
LVL 58

Expert Comment

by:Gary
Comment Utility
If it's not defined you will get an error, simple as that - it cannot work.
0
 
LVL 5

Author Comment

by:Isaac
Comment Utility
What do you mean "defined"?
0
 
LVL 5

Author Comment

by:Isaac
Comment Utility
oh,  i see what you mean GaryC123....
0
 
LVL 5

Author Comment

by:Isaac
Comment Utility
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
 
LVL 58

Accepted Solution

by:
Gary earned 350 total points
Comment Utility
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
 
LVL 82

Assisted Solution

by:Dave Baldwin
Dave Baldwin earned 150 total points
Comment Utility
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
 
LVL 5

Expert Comment

by:manojce
Comment Utility
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
 
LVL 5

Author Comment

by:Isaac
Comment Utility
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
 
LVL 5

Author Closing Comment

by:Isaac
Comment Utility
<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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Suggested Solutions

This article discusses how to create an extensible mechanism for linked drop downs.
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now