Solved

Submit Button Error

Posted on 2013-05-11
19
465 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 10
  • 4
  • 4
  • +1
19 Comments
 
LVL 58

Expert Comment

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

Author Comment

by:Isaac
ID: 39158896
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 83

Expert Comment

by:Dave Baldwin
ID: 39158972
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
Office 365 Training for IT Pros

Learn how to provision tenants, synchronize on-premise Active Directory, implement Single Sign-On, customize Office deployment, and protect your organization with eDiscovery and DLP policies.  Only from Platform Scholar.

 
LVL 5

Author Comment

by:Isaac
ID: 39158977
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
ID: 39158982
I added the form tag and still got the same error.
0
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 39159014
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
ID: 39159051
That did not work.  I did not get an error but nothing happened either.
0
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 39159160
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
ID: 39159447
You are also alerting txtDeliverableName before it is declared.
0
 
LVL 5

Author Comment

by:Isaac
ID: 39159461
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
ID: 39159468
If it's not defined you will get an error, simple as that - it cannot work.
0
 
LVL 5

Author Comment

by:Isaac
ID: 39159568
What do you mean "defined"?
0
 
LVL 5

Author Comment

by:Isaac
ID: 39159574
oh,  i see what you mean GaryC123....
0
 
LVL 5

Author Comment

by:Isaac
ID: 39159620
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
ID: 39159652
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 83

Assisted Solution

by:Dave Baldwin
Dave Baldwin earned 150 total points
ID: 39159813
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
ID: 39160529
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
ID: 39161213
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
ID: 39161279
<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

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I thought I'd write this up for anyone who has a request to create an anonymous whistle-blower-type submission form created using SharePoint 2010 (this would probably work the same for 2013). It's not 100% fool-proof but it's as close as you can get…
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
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)
The viewer will learn the basics of jQuery including how to code hide show and toggles. 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…
Suggested Courses

635 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