Solved

Submit Button Error

Posted on 2013-05-11
19
462 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
Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

 
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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
JQuery DataTable Functionality 8 51
sort Multi-dimensional array 6 43
Javascript: Mouseup doesn't follow mousedown 13 60
Toggle a div with a button and timer with jQuery 4 25
I found this questions asking how to do this in many different forums, so I will describe here how to implement a solution using PHP and AJAX. The logical flow for the problem should be: Write an event handler for the first drop down box to get …
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
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)

737 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