<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Using Javascript to Manipulate a List Form Field</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx</link><description>Hi, my name is Rob Howard, and I’m a Program Manager with the SharePoint Designer team. Like several of the other people posting here, I also built many of the Application Templates for Windows SharePoint Services. If you’re familiar with them, you may</description><dc:language>en</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>re: Using Javascript to Manipulate a List Form Field</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#3274175</link><pubDate>Wed, 13 Jun 2007 23:52:13 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:3274175</guid><dc:creator>Boris Gomiunik</dc:creator><description>&lt;p&gt;Great post! Exactly what I need in a lot of my activities.&lt;/p&gt;</description></item><item><title>Javascript um Forumlarfelder zu manipulieren</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#3283469</link><pubDate>Thu, 14 Jun 2007 09:11:03 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:3283469</guid><dc:creator>CustomSoft.Blog</dc:creator><description>&lt;p&gt;Die Leute aus dem SharePoint-Designer-Blog haben einen Artikel ver&amp;#246;ffentlicht, wie Formularfelder mit Hilfe von Javascript manipuliert werden k&amp;#246;nnen. N&amp;#252;tzlich kann dies bswp. bei Vorauswahlen von Lookup-Fields sein ... Original Artikel (Verfasst&lt;/p&gt;
</description></item><item><title>Formularfelder mit Javascript ver&amp;auml;ndern</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#3289446</link><pubDate>Thu, 14 Jun 2007 16:12:09 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:3289446</guid><dc:creator>SharePoint, SharePoint and stuff </dc:creator><description>&lt;p&gt;Das SharePoint Designer Team beschreibt in einem Artikel , wei man mit Hilfe von JavaScript die Inhalte&lt;/p&gt;
</description></item><item><title>re: Using Javascript to Manipulate a List Form Field</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#3299699</link><pubDate>Fri, 15 Jun 2007 02:07:56 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:3299699</guid><dc:creator>Dion</dc:creator><description>&lt;p&gt;Thanks for this. It's great to see how you guys are doing it. We have been doing something similar since the Team Services days but I still gleaned a few good ideas from your code (especially in the genericizing aspects). One thing I have been stuck on is how to set one of the new People fields to the Current User by default. Would love to hear if you guys are doing this or have any ideas.&lt;/p&gt;
&lt;p&gt;Cheers!&lt;/p&gt;</description></item><item><title>re: Using Javascript to Manipulate a List Form Field</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#3353271</link><pubDate>Sun, 17 Jun 2007 09:56:21 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:3353271</guid><dc:creator>Sean</dc:creator><description>&lt;p&gt;This works great! &amp;nbsp;Now I need help with pre-loading a Business Data lookup field. &amp;nbsp;It is a combination of a textarea and some other hidden inputs. &amp;nbsp;HELP!!!!! please :)&lt;/p&gt;</description></item><item><title>re: Using Javascript to Manipulate a List Form Field</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#3425748</link><pubDate>Wed, 20 Jun 2007 17:56:09 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:3425748</guid><dc:creator>Suhaib</dc:creator><description>&lt;p&gt;I'm trying to to do something similar were on the same form one field's data is dependant on another field and both these field are lookup fields, &amp;nbsp;it will be great If you can tell me the names of the application templates using this feature, so that I can take a look how its works.&lt;/p&gt;</description></item><item><title>re: Using Javascript to Manipulate a List Form Field</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#3441313</link><pubDate>Thu, 21 Jun 2007 12:49:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:3441313</guid><dc:creator>Sharepointer</dc:creator><description>&lt;p&gt;Thanks! I used this code, just modified a bit - to meet my needs... works well!&lt;/p&gt;</description></item><item><title>Using Javascript to Manipulate a List Form Field</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#3441519</link><pubDate>Thu, 21 Jun 2007 13:08:30 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:3441519</guid><dc:creator>Microsoft SharePoint Products and Technologies Team Blog</dc:creator><description>&lt;p&gt;The following blog entry is a cross-posting from the SharePoint Designer Team Blog . It has received&lt;/p&gt;
</description></item><item><title>re: Using Javascript to Manipulate a List Form Field</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#3447045</link><pubDate>Thu, 21 Jun 2007 22:17:53 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:3447045</guid><dc:creator>rsriram22</dc:creator><description>&lt;p&gt;Aha ... A post on what I was looking for. &lt;/p&gt;
</description></item><item><title>re: Using Javascript to Manipulate a List Form Field</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#3546384</link><pubDate>Tue, 26 Jun 2007 17:08:14 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:3546384</guid><dc:creator>Chad</dc:creator><description>&lt;p&gt;Yes but how do you get this script onto a wiki creation page?&lt;/p&gt;</description></item><item><title>WSS 3.0 &amp; MOSS: Recopilación de enlaces interesantes (II) </title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#3580585</link><pubDate>Thu, 28 Jun 2007 12:45:33 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:3580585</guid><dc:creator>Blog del CIIN</dc:creator><description>&lt;p&gt;Siguiendo con la recopilaci&amp;#243;n de recursos iniciada en un post previo , en la nueva entrega de recursos&lt;/p&gt;
</description></item><item><title>re: Using Javascript to Manipulate a List Form Field</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#3600559</link><pubDate>Fri, 29 Jun 2007 12:14:25 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:3600559</guid><dc:creator>René Hézser</dc:creator><description>&lt;p&gt;One small sugestion. If you test for &amp;quot;theInput != null&amp;quot; you will not get an exception, if the sscript did not find a control:&lt;/p&gt;
&lt;p&gt;function setLookupFromFieldName(fieldName, value) {&lt;/p&gt;
&lt;p&gt; &amp;nbsp;if (value == undefined) return;&lt;/p&gt;
&lt;p&gt; &amp;nbsp;var theSelect = getTagFromIdentifierAndTitle(&amp;quot;select&amp;quot;,&amp;quot;Lookup&amp;quot;,fieldName);&lt;/p&gt;
&lt;p&gt;// if theSelect is null, it means that the target list has more than&lt;/p&gt;
&lt;p&gt;// 20 items, and the Lookup is being rendered with an input element&lt;/p&gt;
&lt;p&gt; &amp;nbsp;if (theSelect == null) { &lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;var theInput = getTagFromIdentifierAndTitle(&amp;quot;input&amp;quot;,&amp;quot;&amp;quot;,fieldName);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;if (theInput == null)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;return;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;}&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;ShowDropdown(theInput.id); //this function is provided by SharePoint &lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;var opt=document.getElementById(theInput.opt);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;setSelectedOption(opt, value);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;OptLoseFocus(opt); //this function is provided by SharePoint &lt;/p&gt;
&lt;p&gt; &amp;nbsp;} else {&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;setSelectedOption(theSelect, value);&lt;/p&gt;
&lt;p&gt; &amp;nbsp;}&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;Ren&amp;#233;&lt;/p&gt;</description></item><item><title>re: Using Javascript to Manipulate a List Form Field</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#3835085</link><pubDate>Thu, 12 Jul 2007 21:36:20 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:3835085</guid><dc:creator>David</dc:creator><description>&lt;p&gt;Is it possible to get this (or something similar) to work on a Sharepoint 2003 site? It'd be hugely useful for a few projects I'm working on and I can't get the server updated just yet.&lt;/p&gt;</description></item><item><title>re: Using Javascript to Manipulate a List Form Field</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#3835783</link><pubDate>Thu, 12 Jul 2007 22:34:07 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:3835783</guid><dc:creator>Christopher Bermingham</dc:creator><description>&lt;p&gt;This is great-&lt;/p&gt;
&lt;p&gt; &amp;nbsp;A coworker of mine came up with a similar method to locate the input field's ID in V2 and now in V3-&lt;/p&gt;
&lt;p&gt;I have posted much of it here:&lt;/p&gt;
&lt;p&gt;&lt;a rel="nofollow" target="_new" href="http://bermingham.blogspot.com/2007/07/finding-sharepoint-fields-using.html"&gt;http://bermingham.blogspot.com/2007/07/finding-sharepoint-fields-using.html&lt;/a&gt;&lt;/p&gt;</description></item><item><title>re: Using Javascript to Manipulate a List Form Field</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#3944588</link><pubDate>Thu, 19 Jul 2007 01:55:03 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:3944588</guid><dc:creator>Marc (the netherlands)</dc:creator><description>&lt;p&gt;Hi Rob, &lt;/p&gt;
&lt;p&gt;You're script is working like a charm on the lookup fields. I even found the application template where you used it and found out you used a content editor web part on the newform.aspx so you can edit the javascript directly from sharepoint. Beautiful. I'm not very good with java script and i'm trying to set the default values for two text fields (Single line of text). I've been struggling with your example for one week straight, where it probably takes you 1 minute.&lt;/p&gt;
&lt;p&gt;Can you maybe give an example where two fields (Single line of text) are filled by default. Or maybe just explain what i have to specify in your example where you state (// Set HTML element default values here).&lt;/p&gt;
&lt;p&gt;I really hope you can help me out.....&lt;/p&gt;
&lt;p&gt;Thanks, Marc&lt;/p&gt;</description></item><item><title>re: Using Javascript to Manipulate a List Form Field</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#4082674</link><pubDate>Fri, 27 Jul 2007 19:12:26 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:4082674</guid><dc:creator>rsriram22</dc:creator><description>&lt;p&gt;the following values for a people picker field do not seem to work - something am missing perhaps - did anyone encounter this?&lt;/p&gt;
&lt;p&gt;tagName = &amp;quot;textarea&amp;quot;&lt;/p&gt;
&lt;p&gt;identifier=&amp;quot;TextField&amp;quot;&lt;/p&gt;
&lt;p&gt;title=&amp;quot;People Picker&amp;quot; &lt;/p&gt;
&lt;p&gt;(the 'Title' property for this textarea seems to be hard coded to 'People Picker' and not the display name)&lt;/p&gt;
</description></item><item><title>re: Using Javascript to Manipulate a List Form Field</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#4418331</link><pubDate>Thu, 16 Aug 2007 20:27:01 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:4418331</guid><dc:creator>Belchski</dc:creator><description>&lt;p&gt;You could add this function to set the value of a text field:&lt;/p&gt;
&lt;p&gt;function setTextFromFieldName(fieldName, value) {&lt;/p&gt;
&lt;p&gt; &amp;nbsp;if (value == undefined) return;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;var theInput = getTagFromIdentifierAndTitle(&amp;quot;input&amp;quot;,&amp;quot;&amp;quot;,fieldName);&lt;/p&gt;
&lt;p&gt;	theInput.value=value&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;</description></item><item><title>re: Using Javascript to Manipulate a List Form Field</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#4515284</link><pubDate>Wed, 22 Aug 2007 23:18:49 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:4515284</guid><dc:creator>Tom Byrnes</dc:creator><description>&lt;p&gt;2 questions&lt;/p&gt;
&lt;p&gt;Is there a similar command to _spBodyOnLoadFunctionNames.push for onSubmit that can be fired when a user checks a page back in? I need to do some date checking (date C cannot be before date B which cannot be before date A etc...)&lt;/p&gt;
&lt;p&gt;Also, I how can I check for and prevent duplicate titles from being added (with document version control on)? &lt;/p&gt;
&lt;p&gt;I have tried using the ItemUpdating event (see code below). &amp;nbsp;When I get a hit the condition arises&lt;/p&gt;
&lt;p&gt;I get a message of&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;properties.ErrorMessage = &amp;quot;Title already exists in category: &amp;quot; &amp;amp; duplicateCategoryName&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;properties.Cancel = True&lt;/p&gt;
&lt;p&gt;and set the cancel property - &lt;/p&gt;
&lt;p&gt;Control passes back to the screen and prompts the user to Exit without Saving, but the values already saved. &amp;nbsp;&lt;/p&gt;
&lt;p&gt;The user can click Exit w/o saving and we are still getting duplicates in the Title field.&lt;/p&gt;
&lt;p&gt;This looks to be a bug, but I am not sure... we also need check the title at ItemAdding and that hasn't worked either.&lt;/p&gt;
&lt;p&gt;--------------------------------&lt;/p&gt;
&lt;p&gt;CODE SAMPLE&lt;/p&gt;
&lt;p&gt;--------------------------------&lt;/p&gt;
&lt;p&gt; &amp;nbsp;Public Overloads Overrides Sub ItemUpdating(ByVal properties As SPItemEventProperties)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Try&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Dim webCollection As SPWebCollection&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Dim strSiteURL As String = properties.WebUrl&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Dim siteCollection As New SPSite(strSiteURL)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;siteCollection.AllowUnsafeUpdates = True&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Dim site As SPWeb = siteCollection.OpenWeb()&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;site.AllowUnsafeUpdates = True&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;webCollection = site.Webs&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Dim pageTitle As String = &amp;quot;&amp;quot;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Dim pageItem As SPListItem = properties.ListItem&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Dim pageSynopsis As String = &amp;quot;&amp;quot;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;If pageItem.Level = SPFileLevel.Draft Then&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;If Not pageItem(&amp;quot;Title&amp;quot;) Is Nothing Then&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;pageTitle = pageItem(&amp;quot;Title&amp;quot;)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Dim topLevelSite As SPWeb = site&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Do While Not topLevelSite.ParentWeb Is Nothing&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;topLevelSite = topLevelSite.ParentWeb&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Loop&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Dim currentPage As Guid = New Guid(pageItem(&amp;quot;GUID&amp;quot;).ToString())&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;If isTitleDuplicate(topLevelSite, pageTitle, currentPage) Then&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;properties.ErrorMessage = &amp;quot;Title already exists in category: &amp;quot; &amp;amp; duplicateCategoryName&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;properties.Cancel = True&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;End If&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;End If&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;If pageItem.ContentType.Name = &amp;quot;New NCCI Articles&amp;quot; Then&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;If Not pageItem(&amp;quot;ArticleSynopsis&amp;quot;) Is Nothing Then&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;pageSynopsis = pageItem(&amp;quot;ArticleSynopsis&amp;quot;)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;If pageSynopsis.Equals(&amp;quot;&amp;quot;) Then&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;properties.ErrorMessage = &amp;quot;Synopsis is a required field&amp;quot;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;properties.Cancel = True&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;End If&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Else&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;properties.ErrorMessage = &amp;quot;Synopsis is a required field&amp;quot;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;properties.Cancel = True&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;End If&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;End If&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;End If&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Catch ex As Exception&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;properties.ErrorMessage = &amp;quot;Error in ItemUpdating: &amp;quot; &amp;amp; ex.ToString()&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;properties.Cancel = True&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;End Try&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;End Sub&lt;/p&gt;</description></item><item><title>re: Using Javascript to Manipulate a List Form Field</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#4529463</link><pubDate>Thu, 23 Aug 2007 21:35:39 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:4529463</guid><dc:creator>Jason</dc:creator><description>&lt;p&gt;It works well, is there somewhere to find a complete list of Sharepoint Columns &amp;amp; Identifiers? &amp;nbsp;I'm specifically looking for multiple selection, not a dropdown list select.&lt;/p&gt;
&lt;p&gt;thanks,&lt;/p&gt;
&lt;p&gt;jt&lt;/p&gt;</description></item><item><title>re: Using Javascript to Manipulate a List Form Field</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#4590271</link><pubDate>Mon, 27 Aug 2007 14:12:31 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:4590271</guid><dc:creator>Patrik</dc:creator><description>&lt;p&gt;Can someone indicate on which page in which application template this is used? As such I can look at a real life example.&lt;/p&gt;</description></item><item><title>re: Using Javascript to Manipulate a List Form Field</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#4597083</link><pubDate>Mon, 27 Aug 2007 23:29:25 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:4597083</guid><dc:creator>Jeff K</dc:creator><description>&lt;p&gt;An example of the Application Template is the Job Requisitions Server Admin Template. &amp;nbsp;In the list Candidates, the DispForm.aspx uses Data Views to show items from the Interview Calendar related to the display item. &amp;nbsp;There is then the link to add a new Interview by passing the user to NewForm.aspx in the Interview Calendar list. &amp;nbsp;This is where the javasript above lives.&lt;/p&gt;
&lt;p&gt;~Jeff K&lt;/p&gt;</description></item><item><title>re: Using Javascript to Manipulate a List Form Field</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#4765917</link><pubDate>Wed, 05 Sep 2007 19:13:41 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:4765917</guid><dc:creator>Matt</dc:creator><description>&lt;p&gt;Will this script work when using the Office SharePoint Designer to create a workflow? &amp;nbsp;I get an error message when I try and add any script to the page.&lt;/p&gt;</description></item><item><title>re: Using Javascript to Manipulate a List Form Field</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#4781354</link><pubDate>Thu, 06 Sep 2007 10:31:20 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:4781354</guid><dc:creator>Patrik</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Great post: I managed to elaborate something similar on other pages.&lt;/p&gt;
&lt;p&gt;One question.&lt;/p&gt;
&lt;p&gt;On the example template, you can schedule an interview on the candidates dispform.aspx page. This gives the CandidateId as querystring parameter to the next target screen where it is used as input to determine the value of a dropdown box.&lt;/p&gt;
&lt;p&gt;In my environment I have set up something similar, but I want to give an additional parameter to the following target page, which is used as input for a second dropdown box. My problem is that the second parameter is a lookup field to a list. I managed to pass the value through the target page, but in fact it shouldn't give the value which is displayed on the screen, but the ID of the value in the lookup list. How can I get the ID of that lookup field and pass it through?&lt;/p&gt;
&lt;p&gt;Additionally: will the script mentioned here be able to handle two parameters at the same time to determine the dropdown values in the second target page?&lt;/p&gt;</description></item><item><title>re: Using Javascript to Manipulate a List Form Field</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#5124797</link><pubDate>Tue, 25 Sep 2007 20:02:08 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5124797</guid><dc:creator>Phani</dc:creator><description>&lt;p&gt;Can you please give the tag name and identifier for Person/Group field? I need to hide a UserField for my NewForm.aspx. I tried using the multiple Lookup for SharePoint Field Type, but it doesn't work. I also tried few other combinations but no use. Please help.&lt;/p&gt;</description></item><item><title>SharePoint 2007 – Lookup Tables With More Than 20 Values </title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#5150760</link><pubDate>Wed, 26 Sep 2007 22:58:34 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5150760</guid><dc:creator>Windows Server</dc:creator><description>&lt;p&gt;There are many choices to customize lists in SharePoint 2007, but one of the more useful techniques is&lt;/p&gt;
</description></item><item><title>SharePoint 2007 – Lookup Tables With More Than 20 Values</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#5150946</link><pubDate>Wed, 26 Sep 2007 23:10:35 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5150946</guid><dc:creator>Microsoft Office SharePoint Server</dc:creator><description>&lt;p&gt;There are many choices to customize lists in SharePoint 2007, but one of the more useful techniques is&lt;/p&gt;
</description></item><item><title>re: Using Javascript to Manipulate a List Form Field</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#5217837</link><pubDate>Mon, 01 Oct 2007 06:21:33 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5217837</guid><dc:creator>nevillew</dc:creator><description>&lt;p&gt;Hi, I've seem many examples of having a query string item populate a field and java script is a popular answer. It boils down to getting the java script into the aspx page.&lt;/p&gt;
&lt;p&gt;My problem is, the newform.aspx page has no where to put the java script. There is no html in it..&lt;/p&gt;
&lt;p&gt;This article says there is a _spBodyOnLoadFunctionNames &amp;nbsp;function but I can not find that....&lt;/p&gt;
&lt;p&gt;Basically, I create a custom list... I then use sharepoint designer to go to the newform.aspx file for that list.&lt;/p&gt;
&lt;p&gt;The code in the page begins with:&lt;/p&gt;
&lt;p&gt;&amp;lt;%@ Page language=&amp;quot;C#&amp;quot; MasterPageFile=&amp;quot;~masterurl/default.master&amp;quot; &lt;/p&gt;
&lt;p&gt;........&lt;/p&gt;
&lt;p&gt;........&lt;/p&gt;
&lt;p&gt;I was able to get around this by detaching the page from the masterpage. That seems to show the html code, but I don't want to do that, and this article doesn't allude to that...&lt;/p&gt;
&lt;p&gt;Can someone help me out on this? Basically, I have no idea where to stick the java script and get it to run base on my situation... I'm confused that I can't find others with this issue...&lt;/p&gt;
&lt;p&gt;Help, please..&lt;/p&gt;
</description></item><item><title>re: Using Javascript to Manipulate a List Form Field</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#5231725</link><pubDate>Tue, 02 Oct 2007 02:59:26 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5231725</guid><dc:creator>Tobias</dc:creator><description>&lt;p&gt;Hi nevillew,&lt;/p&gt;
&lt;p&gt;Jeff said:&lt;/p&gt;
&lt;p&gt;An example of the Application Template is the Job Requisitions Server Admin Template. &amp;nbsp;In the list Candidates, the DispForm.aspx uses Data Views to show items from the Interview Calendar related to the display item. &amp;nbsp;There is then the link to add a new Interview by passing the user to NewForm.aspx in the Interview Calendar list. &amp;nbsp;This is where the javasript above lives.&lt;/p&gt;
&lt;p&gt;Look at this page and you'll see they use a Content Editor Web Part. Insert this web part and you can insert code onto the page.&lt;/p&gt;</description></item><item><title>re: Using Javascript to Manipulate a List Form Field</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#5245062</link><pubDate>Tue, 02 Oct 2007 19:46:36 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5245062</guid><dc:creator>nevillew</dc:creator><description>&lt;p&gt;Hi, thanks for your response. Sorry, I'm still a bit confused...I do appreciate your help very much....&lt;/p&gt;
&lt;p&gt;I'll go through my steps and then list some problems..&lt;/p&gt;
&lt;p&gt;1) I create a custom list called test.&lt;/p&gt;
&lt;p&gt;2) I create columns Column1, Column2 and Column3.&lt;/p&gt;
&lt;p&gt;3) I then go into SharePoint designer and browse to the list. In the list I see the following aspx pages.&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;AllItems.aspx, DispForm.aspx, EditForm.aspx and NewForm.aspx. &lt;/p&gt;
&lt;p&gt;4) Now, what I want is to be able to do isretrieve data from the url and store it in a field, when the user &lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;loads NewForm.aspx&lt;/p&gt;
&lt;p&gt;The 2 things I notice (while using SharePoint Designer is)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;a) In display view, the controls are not visible. It shows a standard display.&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Refer to &lt;a rel="nofollow" target="_new" href="http://blog.henryong.com/2007/09/05/how-to-edit-the-form-fields-of-a-sharepoint-list/"&gt;http://blog.henryong.com/2007/09/05/how-to-edit-the-form-fields-of-a-sharepoint-list/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;b) When I look at code view, I see aspx code. I don't believe I can stick my java script in here, &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;although from some other sites I read, they imply I can.&lt;/p&gt;
&lt;p&gt;Now, this article makes reference to my situation saying that the newform.aspx page is the content page and there is a master page which is used in conjunction with the content page...&lt;/p&gt;
&lt;p&gt;The article mentions a function: _spBodyOnLoadFunctionNames but I can't find out where to locate this...&lt;/p&gt;
&lt;p&gt;You would think I could google it and get a hundred hits but there is not much on this....&lt;/p&gt;
&lt;p&gt;I also need a solution that is modular. I.e only effects this list.&lt;/p&gt;
&lt;p&gt;So basically, that is my situation... I'm not sure why thisn isn't confusing others here....&lt;/p&gt;
&lt;p&gt;I was able to achieve something by creating a new aspx page and then importing sharepoint content into it.&lt;/p&gt;
&lt;p&gt;This created a page that was detached from a master page. It contained &amp;lt;Head&amp;gt; ... etc....&lt;/p&gt;
&lt;p&gt;The problem with this method is, it is too much overhead to support these new pages...&lt;/p&gt;
&lt;p&gt;I also tried to back them up and restore them but I think because of unique identifiers in the page&lt;/p&gt;
&lt;p&gt;it caused issues...&lt;/p&gt;
&lt;p&gt;Basically, I've found that trying to get a query string variable into a field causes to much damn pain that its just better to have the user imput the value, although this drives me crazy. You'd think there would be a more simpler out the box way to do this (and please correct me if I am wrong).&lt;/p&gt;
&lt;p&gt;So, based on the above can you help me out... Maybe I'm just going off in the wrong direction, but something tells me there is more to this than what this blog states.....&lt;/p&gt;
&lt;p&gt;PS, why is the interace for entering comments into this blog so crappy? I'm not complaing, but come on...&lt;/p&gt;
</description></item><item><title>re: Using Javascript to Manipulate a List Form Field</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#5280281</link><pubDate>Fri, 05 Oct 2007 03:35:24 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5280281</guid><dc:creator>TracyW</dc:creator><description>&lt;p&gt;Neville&lt;/p&gt;
&lt;p&gt;You're not too far off. To execute the code on the newitem.aspx page of this one list, just insert a script tag (pretty much anywhere near the bottom), I generally put them near another script tag and then insert the call to _spBodyOnLoadFunctionNames and then the functions your want called&lt;/p&gt;
&lt;p&gt;Insert this code &lt;/p&gt;
&lt;p&gt;&amp;lt;script&amp;gt;&lt;/p&gt;
&lt;p&gt;_spBodyOnLoadFunctionNames (&amp;quot;Bob&amp;quot;);&lt;/p&gt;
&lt;p&gt;function Bob() {alert('Hello World'};&lt;/p&gt;
&lt;p&gt;&amp;lt;/script&amp;gt;&lt;/p&gt;
&lt;p&gt;When the page loads you get the alert box.&lt;/p&gt;
&lt;p&gt;Hope this helps&lt;/p&gt;</description></item><item><title>re: Using Javascript to Manipulate a List Form Field</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#5401893</link><pubDate>Thu, 11 Oct 2007 17:46:05 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5401893</guid><dc:creator>Tom Resing</dc:creator><description>&lt;p&gt;I agree with the previous posters. _spBodyOnLoadFunctionNames is undocumented. Should we settle for the fact that the SharePoint Designer Team bothered to mention it briefly in this blog post. Where is it in the SDK docs or MSDN? Is there a corresponding OnUnload function? Proper use of Google Maps requires unloading what you load and I can only guess without proper documentation.&lt;/p&gt;</description></item><item><title>re: Using Javascript to Manipulate a List Form Field</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#5402153</link><pubDate>Thu, 11 Oct 2007 18:25:30 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5402153</guid><dc:creator>Denis Kitchen</dc:creator><description>&lt;p&gt;I noticed a lot of folks want to set the People Picker (Assigned To) field. &lt;/p&gt;
&lt;p&gt;Adding this to the fillDefaultValues function worked for me:&lt;/p&gt;
&lt;p&gt;var assignedToInput = getTagFromIdentifierAndTitle(&amp;quot;div&amp;quot;, &amp;quot;&amp;quot;, &amp;quot;People Picker&amp;quot;);&lt;/p&gt;
&lt;p&gt;assignedToInput.innerHTML = vals[&amp;quot;Assigned_To&amp;quot;];&lt;/p&gt;
&lt;p&gt;Cheers!&lt;/p&gt;</description></item><item><title>re: Using Javascript to Manipulate a List Form Field</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#5508963</link><pubDate>Thu, 18 Oct 2007 17:26:32 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5508963</guid><dc:creator>cnovaksmart</dc:creator><description>&lt;p&gt;I've been trying to use the code listed above and have been having trouble getting it to execute. &amp;nbsp;I think it might be due to where I've placed the call to _spBodyOnLoadFunctionNames. One of the posts says to add a Content Editor Web Part and then add the call to the page. THis still does not work for me. &amp;nbsp;Is it possible to get an example showing where exactly this call has been inserted within a sharepoint page, meanign a good chunk of the page? &amp;nbsp;Thanks!!&lt;/p&gt;
</description></item><item><title>re: Using Javascript to Manipulate a List Form Field</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#5912607</link><pubDate>Mon, 05 Nov 2007 19:26:11 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5912607</guid><dc:creator>Tom</dc:creator><description>&lt;p&gt;Are there any other blogs or sites similar to this one which would help me understand how to create CSS/Javascript-based tooltips for each calendar event in the Month/Week/Day calendar views??&lt;/p&gt;
&lt;p&gt;Thank you, Tom&lt;/p&gt;</description></item><item><title>re: Using Javascript to Manipulate a List Form Field</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#5923085</link><pubDate>Tue, 06 Nov 2007 03:11:13 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5923085</guid><dc:creator>Jonathan</dc:creator><description>&lt;P&gt;First off, to people having trouble getting it working, simply place the script block within any content area that renders on the page. &amp;nbsp;Probably the safest bet to make sure it gets on is the main page placeholder.&lt;/P&gt;
&lt;P&gt;&amp;lt;script language="javascript" type="text/javascript"&amp;gt;&lt;/P&gt;
&lt;P&gt;_spBodyOnLoadFunctionNames.push("hideFields");&lt;/P&gt;
&lt;P&gt;function hideFields() &lt;/P&gt;
&lt;P&gt;{&lt;/P&gt;
&lt;P&gt;&amp;nbsp; //test it first!&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;alert('It Worked!!');&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;
&lt;P&gt;&amp;lt;/script&amp;gt;&lt;/P&gt;
&lt;P&gt;Throw the script block from above in directly below &amp;lt;asp:Content ContentPlaceHolderId="PlaceHolderMain" runat="server"&amp;gt; and if you get the message box on page load than you've taken care of loading javascript onto the page and can begin working on the next steps. &amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now to my problem... &lt;/P&gt;
&lt;P&gt;I've had success with everything except the Recurrence and Workspace fields. &amp;nbsp;I'm using them as below:&lt;/P&gt;
&lt;P&gt;//Recurrence&lt;/P&gt;
&lt;P&gt;var control5 = getTagFromIdentifierAndTitle("INPUT","BooleanField","Recurrence");&lt;/P&gt;
&lt;P&gt;control5.parentNode.parentNode.parentNode.style.display="none";&lt;/P&gt;
&lt;P&gt;I'm getting 'parentNode is null or not an object'. &amp;nbsp;Any help would be greatly appreciated.&lt;/P&gt;</description></item><item><title>re: Using Javascript to Manipulate a List Form Field</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#5935014</link><pubDate>Tue, 06 Nov 2007 15:38:12 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5935014</guid><dc:creator>Ben</dc:creator><description>&lt;p&gt;Thanks for this post!&lt;/p&gt;
&lt;p&gt;Can the same be accomplished with a document library where the properties are shown in for example the properties pane in Word (2007)? I need to accomplish the same for these libraries. Any other suggestions?&lt;/p&gt;
&lt;p&gt;Thank you, Ben&lt;/p&gt;</description></item><item><title>re: Using Javascript to Manipulate a List Form Field</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#6025644</link><pubDate>Fri, 09 Nov 2007 22:14:18 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6025644</guid><dc:creator>Geoff G</dc:creator><description>&lt;p&gt;All -- I was able to get regular Text Fields auto-populating from a querystring {NewForm.aspx?myQueryStringName=some_value_here} with this script below. Note i used the function from Belchski {THX!!} called 'setTextFromFieldName' and called it at the bottom of the script like so: &amp;nbsp; [setTextFromFieldName(&amp;quot;theFormFieldDisplayNametoPopulate&amp;quot;, vals[&amp;quot;myQueryStringName&amp;quot;]);]. I opened NewForm.aspx up in DEsigner &amp;amp; plopped the script right above the &amp;lt;/asp:Content&amp;gt; tag.&lt;/p&gt;
&lt;p&gt;I hope this works for everyone...GREAT little script. I am using for a link from the Remedy Help Desk App to autopopulate a HD Ticket Number &amp;amp; Summary into a User Survey (how was your Ticket completed, etc.).&lt;/p&gt;
&lt;p&gt;----------------------------------------------------------------------&lt;/p&gt;
&lt;p&gt;&amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;gt;&lt;/p&gt;
&lt;p&gt;_spBodyOnLoadFunctionNames.push(&amp;quot;fillDefaultValues&amp;quot;);&lt;/p&gt;
&lt;p&gt;function getTagFromIdentifierAndTitle(tagName, identifier, title) {&lt;/p&gt;
&lt;p&gt; &amp;nbsp;var len = identifier.length;&lt;/p&gt;
&lt;p&gt; &amp;nbsp;var tags = document.getElementsByTagName(tagName);&lt;/p&gt;
&lt;p&gt; &amp;nbsp;for (var i=0; i &amp;lt; tags.length; i++) {&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;var tempString = tags[i].id;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;if (tags[i].title == title &amp;amp;&amp;amp; (identifier == &amp;quot;&amp;quot; || tempString.indexOf(identifier) == tempString.length - len)) {&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;return tags[i];&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;}&lt;/p&gt;
&lt;p&gt; &amp;nbsp;}&lt;/p&gt;
&lt;p&gt; &amp;nbsp;return null;&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;function setTextFromFieldName(fieldName, value) {&lt;/p&gt;
&lt;p&gt; if (value == undefined) return;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; var theInput = getTagFromIdentifierAndTitle(&amp;quot;input&amp;quot;,&amp;quot;TextField&amp;quot;,fieldName);&lt;/p&gt;
&lt;p&gt;theInput.value=value&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;function fillDefaultValues() {&lt;/p&gt;
&lt;p&gt; &amp;nbsp;var qs = location.search.substring(1, location.search.length);&lt;/p&gt;
&lt;p&gt; &amp;nbsp;var args = qs.split(&amp;quot;&amp;amp;&amp;quot;);&lt;/p&gt;
&lt;p&gt; &amp;nbsp;var vals = new Object();&lt;/p&gt;
&lt;p&gt; &amp;nbsp;for (var i=0; i &amp;lt; args.length; i++) {&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;var nameVal = args[i].split(&amp;quot;=&amp;quot;);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;var temp = unescape(nameVal[1]).split('+');&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;nameVal[1] = temp.join(' ');&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;vals[nameVal[0]] = nameVal[1];&lt;/p&gt;
&lt;p&gt; &amp;nbsp;} &amp;nbsp;&lt;/p&gt;
&lt;p&gt; &amp;nbsp;setTextFromFieldName(&amp;quot;theFormFieldtoPopulate&amp;quot;, vals[&amp;quot;myQueryStringName&amp;quot;]);&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;&amp;lt;/script&amp;gt;&lt;/p&gt;
&lt;p&gt;----------------------------------------------------------------------&lt;/p&gt;</description></item><item><title>re: Using Javascript to Manipulate a List Form Field</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#6378021</link><pubDate>Mon, 19 Nov 2007 00:38:32 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6378021</guid><dc:creator>Skullcrusher</dc:creator><description>&lt;p&gt;I was just about to try and write something like this myself for setting the value of a Lookup field but thought I'd do a quick google first.&lt;/p&gt;
&lt;p&gt;Thank god I did as this has saved me loads of time and was exactly what I was after.&lt;/p&gt;
&lt;p&gt;Thanks for sharing!!&lt;/p&gt;
</description></item><item><title>re: Using Javascript to Manipulate a List Form Field</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#6527615</link><pubDate>Mon, 26 Nov 2007 11:35:52 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6527615</guid><dc:creator>GirlGeek</dc:creator><description>&lt;p&gt;my question revolves around the old fashioned document.myform.myfieldname.value='text';&lt;/p&gt;
&lt;p&gt;doesn't this work with SharePoint Designer (for the Form Web Part)?&lt;/p&gt;</description></item><item><title>re: Using Javascript to Manipulate a List Form Field</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#6593418</link><pubDate>Thu, 29 Nov 2007 09:45:44 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6593418</guid><dc:creator>jules</dc:creator><description>&lt;p&gt;hi,&lt;/p&gt;
&lt;p&gt;what should i use to get the ID of the current item in EditForm.aspx please?&lt;/p&gt;</description></item><item><title>re: Using Javascript to Manipulate a List Form Field</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#6599536</link><pubDate>Thu, 29 Nov 2007 18:05:25 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6599536</guid><dc:creator>Tim Staddon</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Just in case anyone's wanted it, here's a routine to toggle a Yes/No field which is presented via a checkbox:&lt;/p&gt;
&lt;p&gt;function setYesNoFromFieldName(fieldName) {&lt;/p&gt;
&lt;p&gt; &amp;nbsp; var theInput = getTagFromIdentifierAndTitle(&amp;quot;input&amp;quot;,&amp;quot;BooleanField&amp;quot;,fieldName);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; if (theInput.checked==&amp;quot;True&amp;quot;) {&lt;/p&gt;
&lt;p&gt; &amp;nbsp; 		theInput.checked=&amp;quot;False&amp;quot;;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; 		} else {&lt;/p&gt;
&lt;p&gt; &amp;nbsp; 		theInput.checked=&amp;quot;True&amp;quot;; &amp;nbsp; &lt;/p&gt;
&lt;p&gt; &amp;nbsp; 		} &lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;</description></item><item><title>Adding category titles to Blog sites (category.aspx)</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#6879398</link><pubDate>Thu, 27 Dec 2007 22:06:07 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6879398</guid><dc:creator>echef</dc:creator><description>&lt;p&gt;I recently found an application of the Blog template that was a great fit, but needed the Category title&lt;/p&gt;
</description></item><item><title>Adding category titles to Blog sites (category.aspx)</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#6879419</link><pubDate>Thu, 27 Dec 2007 22:10:08 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6879419</guid><dc:creator>SHAREPOINTBlogs.com Mirror</dc:creator><description>&lt;p&gt;I recently found an application of the Blog template that was a great fit, but needed the Category title&lt;/p&gt;
</description></item><item><title>re: Using Javascript to Manipulate a List Form Field</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#7045410</link><pubDate>Wed, 09 Jan 2008 23:49:01 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7045410</guid><dc:creator>buggsy2</dc:creator><description>&lt;p&gt;Anyone have an example of a Web Service call to get default field values?&lt;/p&gt;</description></item><item><title>URL Parameters and Pre-populating Lookup Fields</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#7047417</link><pubDate>Thu, 10 Jan 2008 03:52:56 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7047417</guid><dc:creator>Mirrored Blogs</dc:creator><description>&lt;p&gt;The other title for this blog is &amp;amp;quot;For the Love of Pete, This Should be Easier!&amp;amp;quot; When you make&lt;/p&gt;
</description></item><item><title>Pulling in Querystrings into a SharePoint 2007 Survey</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#7153637</link><pubDate>Sat, 19 Jan 2008 01:21:53 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7153637</guid><dc:creator>SharePoint 1970</dc:creator><description>&lt;p&gt;I had a small project in SharePoint 2007 where I needed to pull in Querystring variables from a URL into&lt;/p&gt;
</description></item><item><title>re: Using Javascript to Manipulate a List Form Field</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#7209378</link><pubDate>Wed, 23 Jan 2008 18:10:31 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7209378</guid><dc:creator>RamUday</dc:creator><description>&lt;p&gt;The tagName for a multiple lines of text field seems to be &amp;quot;textarea&amp;quot;.&lt;/p&gt;
&lt;p&gt;When i passed &amp;quot;input&amp;quot; as the tagName for a multi line text box, the multi line field were not being returned.&lt;/p&gt;
&lt;p&gt;It works with &amp;quot;textarea&amp;quot;.&lt;/p&gt;</description></item><item><title>re: Using Javascript to Manipulate a List Form Field</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#7221935</link><pubDate>Thu, 24 Jan 2008 16:29:07 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7221935</guid><dc:creator>RamUday</dc:creator><description>&lt;p&gt;I have being trying to assign a value to a multi line text box using a javascript function.&lt;/p&gt;
&lt;p&gt;the value should get set when the user click on a link in the page.&lt;/p&gt;
&lt;p&gt;I could not set the value after the page is rendered. &lt;/p&gt;
&lt;p&gt;When I used _spBodyOnLoadFunctionNames.push() to execute the same javascript function on body load, the value is being set correctly.&lt;/p&gt;
&lt;p&gt;The same is not happening when the javascript function is called after the page is rendered(i.e. when the user clicks the link)&lt;/p&gt;
&lt;p&gt;Does anybody have any lead on this&lt;/p&gt;</description></item><item><title>re: Using Javascript to Manipulate a List Form Field</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#7456277</link><pubDate>Tue, 05 Feb 2008 08:13:38 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7456277</guid><dc:creator>Sharon</dc:creator><description>&lt;p&gt;Same as Jason's question, does anyone know where a complete list of SharePoint Field Type identifiers are?&lt;/p&gt;
&lt;p&gt;Thanks.&lt;/p&gt;</description></item><item><title>re: Using Javascript to Manipulate a List Form Field</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#7476421</link><pubDate>Wed, 06 Feb 2008 00:43:46 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7476421</guid><dc:creator>Minou325</dc:creator><description>&lt;p&gt;Does anyone know the identifier for a HiddenField?&lt;/p&gt;</description></item><item><title>re: Using Javascript to Manipulate a List Form Field</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#7488396</link><pubDate>Wed, 06 Feb 2008 13:34:05 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7488396</guid><dc:creator>Markuso</dc:creator><description>&lt;p&gt;I've also found a way to get a reference to a &amp;lt;strong&amp;gt;Radio Buttons Choice&amp;lt;/strong&amp;gt; field type that was tricky to get at since it doesn't use the 'Title' attribute. Please see below:&lt;/p&gt;
&lt;p&gt;&amp;lt;a href=&amp;quot;&lt;a rel="nofollow" target="_new" href="http://blog.markuso.com/posts/9/using-javascript-to-access-a-list-form-field-in-sharepoint-designer/&amp;quot;&amp;gt;http://blog.markuso.com/posts/9/using-javascript-to-access-a-list-form-field-in-sharepoint-designer/&amp;lt;/a&amp;gt;"&gt;http://blog.markuso.com/posts/9/using-javascript-to-access-a-list-form-field-in-sharepoint-designer/&amp;quot;&amp;gt;http://blog.markuso.com/posts/9/using-javascript-to-access-a-list-form-field-in-sharepoint-designer/&amp;lt;/a&amp;gt;&lt;/a&gt;&lt;/p&gt;</description></item><item><title>re: Using Javascript to Manipulate a List Form Field</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#7494241</link><pubDate>Wed, 06 Feb 2008 20:07:01 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7494241</guid><dc:creator>Markuso</dc:creator><description>&lt;p&gt;I've also found a way to get a reference to a Radio Buttons Choice field. It was tricky to get at since it doesn't use the 'Title' attribute. Please see below:&lt;/p&gt;
&lt;p&gt;&lt;a rel="nofollow" target="_new" href="http://blog.markuso.com/posts/9/using-javascript-to-access-a-list-form-field-in-sharepoint-designer/"&gt;http://blog.markuso.com/posts/9/using-javascript-to-access-a-list-form-field-in-sharepoint-designer/&lt;/a&gt;&lt;/p&gt;</description></item><item><title>re: Using Javascript to Manipulate a List Form Field</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#7526216</link><pubDate>Fri, 08 Feb 2008 00:12:02 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7526216</guid><dc:creator>T.</dc:creator><description>&lt;p&gt;Thank you for the great script! &amp;nbsp;Does anyone know how to get the time portion of a date/time field (DateTimeFieldDate)?&lt;/p&gt;</description></item><item><title>re: Using Javascript to Manipulate a List Form Field</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#7541091</link><pubDate>Fri, 08 Feb 2008 17:07:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7541091</guid><dc:creator>Matt</dc:creator><description>&lt;p&gt;Using Script from &lt;a rel="nofollow" target="_new" href="http://blog.markuso.com/posts/9/using-javascript-to-access-a-list-form-field-in-sharepoint-designer/"&gt;http://blog.markuso.com/posts/9/using-javascript-to-access-a-list-form-field-in-sharepoint-designer/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;how can i use?&lt;/p&gt;
&lt;p&gt;Original Poste (October 11, 2007 10:46 AM Denis Kitchen)&lt;/p&gt;
&lt;p&gt;var assignedToInput = getTagFromIdentifierAndTitle(&amp;quot;div&amp;quot;, &amp;quot;&amp;quot;, &amp;quot;People Picker&amp;quot;);&lt;/p&gt;
&lt;p&gt;assignedToInput.innerHTML = vals[&amp;quot;Assigned_To&amp;quot;];&lt;/p&gt;
&lt;p&gt;So far I have this..... but it does not work and does not reference the particular one I need.... I am just trying to hide it.&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;var tagName = &amp;quot;div&amp;quot;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;var identifier = &amp;quot;&amp;quot;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;var FieldName = &amp;quot;People Picker&amp;quot;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;var control = getTagFromIdentifierAndTitle(tagName,identifier,FieldName, Option);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;control.style.display=“none”;&lt;/p&gt;
&lt;p&gt;------------------------------------------------------------------------------------------------------------------------&lt;/p&gt;
&lt;p&gt;Also note another method from CleverWorkarounds that might be usable......by someone who understands it. &amp;nbsp;I could not.&lt;/p&gt;
&lt;p&gt;&lt;a rel="nofollow" target="_new" href="http://www.cleverworkarounds.com/category/sharepoint/application-development/javascript/"&gt;http://www.cleverworkarounds.com/category/sharepoint/application-development/javascript/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;What they have noticed is every contol SharePoint creates marks it with a commented name. &amp;nbsp;So by searching for the commented name you should be able to locate the control with in that area perdicably per each control... I just lack understand of the code and it use/syntax to figure out why it does not work for me.&lt;/p&gt;
&lt;p&gt;function findacontrol(FieldName) {&lt;/p&gt;
&lt;p&gt; &amp;nbsp; var ctrl = null;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; var arr = document.getElementsByTagName(‘!’);//get all comments&lt;/p&gt;
&lt;p&gt;for (var i=0;i &amp;lt; arr.length; i++ ) &lt;/p&gt;
&lt;p&gt; &amp;nbsp; {&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;// now match the field name&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (arr[i].innerHTML.indexOf(FieldName) &amp;gt; 0) {&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return arr[i];&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; } &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; }&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;function hideFields() { &lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;var control = findacontrol(“Device Name”);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;control.parentNode.parentNode.style.display=“none”;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;control = findacontrol(“Comments”);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;control.parentNode.parentNode.style.display=“none”;} &lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;control = findacontrol(“Options”);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;control.parentNode.parentNode.style.display=“none”;}&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;</description></item><item><title>Office Developer's Conference - Day 1</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#7634430</link><pubDate>Tue, 12 Feb 2008 10:24:12 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7634430</guid><dc:creator>Raymond Mitchell</dc:creator><description>&lt;p&gt;Wow, what a day.&amp;amp;#160; Some highlights: Kurt DelBene gave another keynote address following Bill Gates&lt;/p&gt;
</description></item><item><title>re: Using Javascript to Manipulate a List Form Field</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#7665047</link><pubDate>Wed, 13 Feb 2008 09:18:03 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7665047</guid><dc:creator>singh30oct</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;can you send me some code &lt;/p&gt;
&lt;p&gt;any user create only 1 item in lookup kist box&lt;/p&gt;
</description></item><item><title>re: Using Javascript to Manipulate a List Form Field</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#7676568</link><pubDate>Wed, 13 Feb 2008 18:47:11 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7676568</guid><dc:creator>Matt</dc:creator><description>&lt;p&gt;Good post, thanks for this. &amp;nbsp;It works well.&lt;/p&gt;
&lt;p&gt;However, I want to set a default value of a lookup field in a publishing page, only the first time a user creates the page.&lt;/p&gt;
&lt;p&gt;First problem, is setting the field value by actual value of the field, not the index. &amp;nbsp;Currently the comparison and assignemnt is done based on ID. &amp;nbsp;How can I assign a string value to the field?&lt;/p&gt;
&lt;p&gt;Second, this default value is set every time a user renders the page. &amp;nbsp;I need to find a way where the default value is only set the first time a page is created.&lt;/p&gt;
&lt;p&gt;Any help would be appreciated.&lt;/p&gt;</description></item><item><title>re: Using Javascript to Manipulate a List Form Field</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#7697081</link><pubDate>Thu, 14 Feb 2008 20:50:19 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7697081</guid><dc:creator>Marius Mans</dc:creator><description>&lt;p&gt;Great, Great Great. I combined this with a Insert Template and Magic !!!. Thanks very much.&lt;/p&gt;</description></item><item><title>re: Using Javascript to Manipulate a List Form Field</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#7720261</link><pubDate>Fri, 15 Feb 2008 22:13:15 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7720261</guid><dc:creator>sanjaya</dc:creator><description>&lt;p&gt;hi Matt,&lt;/p&gt;
&lt;p&gt;From the earlier postings i understand that you had a problem with People field.&lt;/p&gt;
&lt;p&gt;Were u able to find the solution???&lt;/p&gt;
&lt;p&gt;i am facing the same problem.&lt;/p&gt;
&lt;p&gt;I have 3 to 4 user fields in my newform.aspx, how do i find them through javascript and set the default values.&lt;/p&gt;
&lt;p&gt;any help frm anybody would be appreciated..&lt;/p&gt;</description></item><item><title>re: Using Javascript to Manipulate a List Form Field</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#7748362</link><pubDate>Sun, 17 Feb 2008 11:22:14 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7748362</guid><dc:creator>Ramadan</dc:creator><description>&lt;p&gt;thanks for the nice article. helped me out... yet i still have a javascript problem with sharepoint:&lt;/p&gt;
&lt;p&gt;I have a publishing site with some pages. i wanted to do something basic stuff like toggling a div visibility when someone clicks a link. i managed to include the javascript function in the page (in the ArticleLinks.aspx page... adding it to the master did not do the job) but looks like there is no way to call the javascript function from the page!&lt;/p&gt;
&lt;p&gt;each time i edit the page and go into the source code... adding the javascript function call to the URL or the OnClick is always removed... this is so annoying!!!&lt;/p&gt;
&lt;p&gt;such a thing should take 5 mintues and untill now it took me 4 hours...&lt;/p&gt;
&lt;p&gt;apperciate if you could help out with this,&lt;/p&gt;
&lt;p&gt;Ramadan&lt;/p&gt;</description></item><item><title>re: Using Javascript to Manipulate a List Form Field</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#7824943</link><pubDate>Thu, 21 Feb 2008 01:51:21 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7824943</guid><dc:creator>Lyndon</dc:creator><description>&lt;p&gt;I struggled with the prepopulating of Lookups until I realized the above code is designed to work on the ID of the Lookup Field. I was passing the value displayed in the lookup field and nothing worked.&lt;/p&gt;
&lt;p&gt;If you don't have the ID of the lookup field but you do have the text simply change&lt;/p&gt;
&lt;p&gt;the Line &amp;nbsp; &amp;nbsp;if (opts[i].value == value) { &amp;nbsp;in the setSelectedOption to&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;if (opts[i].innerText== value) {&lt;/p&gt;
&lt;p&gt;Good Post!&lt;/p&gt;</description></item><item><title>re: Using Javascript to Manipulate a List Form Field</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#8041101</link><pubDate>Wed, 05 Mar 2008 05:12:49 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8041101</guid><dc:creator>chuasteve</dc:creator><description>&lt;p&gt;Anyone can help?&lt;/p&gt;
&lt;p&gt;Currently, i'm developing one page which is containt drop down list and i would like to select one of the values when the page is loading.&lt;/p&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;p&gt;dropdown list has three values:-&lt;/p&gt;
&lt;p&gt;Waiting (this is the first value when the page is loading)&lt;/p&gt;
&lt;p&gt;Approve&lt;/p&gt;
&lt;p&gt;Reject&lt;/p&gt;
&lt;p&gt;Now, i would like to select the second value which is &amp;quot;Approve&amp;quot; when the page is loading.&lt;/p&gt;
&lt;p&gt;So, the &amp;quot;Approve&amp;quot; will be selected after the page is load.&lt;/p&gt;
</description></item><item><title>[译]使用JavaScript来操纵数据视图DataView新建视图的默认值</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#8071452</link><pubDate>Thu, 06 Mar 2008 15:40:59 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8071452</guid><dc:creator>dosboy</dc:creator><description>&lt;p&gt;觉得这篇文章比较有参考价值，把大意翻译过来，没有忠实于原文。 原文链接：&lt;a rel="nofollow" target="_new" href="http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/u"&gt;http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/u&lt;/a&gt;...&lt;/p&gt;
</description></item><item><title>re: Using Javascript to Manipulate a List Form Field</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#8219706</link><pubDate>Sat, 15 Mar 2008 08:07:27 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8219706</guid><dc:creator>Troy</dc:creator><description>&lt;p&gt;It looks like at least one person has been able to make this work for fields in the Insert Template. &amp;nbsp;I would appreciate some ideas on how to make this work on my page with two web parts with Insert Templates. &amp;nbsp;To clarify, the javasicript code fails on page load (throwing some annoying javascript errors)...then when the Insert Template is initiated on one web part, the code does run again and still gives the same error. &amp;nbsp;If I initiate the second Insert Template link, the script works fine and adds the default values to each Insert Template. So, I know what the problem is, I just don't know how to fix it.&lt;/p&gt;
&lt;p&gt;It doesn't seem that the FillDefaultValues script can run on page load in my scenerio, and I believe I'll have to have two seperate functions (one for each Insert Template on the page). &amp;nbsp;But, when and how can the function be called? &amp;nbsp;Ideally it would be called when I click 'Add' to initiate the Insert Template... &amp;nbsp;If anyone knows how to do that, please fill me in...&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;</description></item><item><title>[SPD Workflows] Manipolazione JS e validazione di custom Collect Data forms</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#8306800</link><pubDate>Tue, 18 Mar 2008 09:08:50 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8306800</guid><dc:creator>Massimo Prota's BLog</dc:creator><description>&lt;p&gt;[SPD Workflows] Manipolazione JS e validazione di custom Collect Data forms&lt;/p&gt;
</description></item><item><title>re: Using Javascript to Manipulate a List Form Field</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#8310754</link><pubDate>Tue, 18 Mar 2008 12:11:53 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8310754</guid><dc:creator>jjthomas</dc:creator><description>&lt;p&gt;How to set the current user in a people picker field on the newform.aspx&lt;/p&gt;
</description></item><item><title>re: Using Javascript to Manipulate a List Form Field</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#8316738</link><pubDate>Tue, 18 Mar 2008 18:54:08 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8316738</guid><dc:creator>frikouflios</dc:creator><description>&lt;p&gt;this is very good solution and thanks you very match.... &lt;/p&gt;
&lt;p&gt;but i have &amp;nbsp;a question.. If i want to set the selected value in a combo (lookup) &amp;nbsp;and i have 500 items or more what it happens with the time that you need to make the sequential search? Is there any faster way?&lt;/p&gt;
&lt;p&gt;again i want to thanks you for your solution&lt;/p&gt;
&lt;p&gt;Greek developer&lt;/p&gt;
</description></item><item><title>re: Using Javascript to Manipulate a List Form Field</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#8324982</link><pubDate>Wed, 19 Mar 2008 09:55:24 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8324982</guid><dc:creator>jjthomas</dc:creator><description>&lt;p&gt;Can anyone please tell me how can I have the current user as the default value in the Attendee2 field when the form is displayed in edit mode.&lt;/p&gt;
&lt;p&gt;&amp;lt;SharePoint:FormField runat=&amp;quot;server&amp;quot; id=&amp;quot;ff3{$Pos}&amp;quot; ControlMode=&amp;quot;New&amp;quot; FieldName=&amp;quot;Attendee2&amp;quot; __designer:bind=&amp;quot;{ddwrt:DataBind('i',concat('ff3',$Pos),'Value','ValueChanged','ID',ddwrt:EscapeDelims(string(@ID)),'@Attendee2')}&amp;quot; /&amp;gt;&lt;/p&gt;</description></item><item><title>re: Using Javascript to Manipulate a List Form Field</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#8331547</link><pubDate>Sat, 22 Mar 2008 22:56:27 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8331547</guid><dc:creator>ronald</dc:creator><description>&lt;p&gt;Can someone tell me how to use JavaScript with a multiple select lookup, I already got it working with the single lookup field. But when I change Lookup for SelectCandidate or SelectResult it doesn't works.&lt;/p&gt;
&lt;p&gt;Thans,&lt;/p&gt;
&lt;p&gt;Ronald&lt;/p&gt;</description></item><item><title>WSS 3.0 &amp; MOSS: Construyendo vistas avanzadas con SharePoint Designer 2007 (III)!</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#8339856</link><pubDate>Thu, 27 Mar 2008 18:41:13 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8339856</guid><dc:creator>Blog del CIIN</dc:creator><description>&lt;p&gt;Siguiendo con la serie de post de construcci&amp;#243;n de aplicaciones de SharePoint utilizando SharePoint Designer&lt;/p&gt;
</description></item><item><title>re: Using Javascript to Manipulate a List Form Field</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#8344191</link><pubDate>Sun, 30 Mar 2008 13:27:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8344191</guid><dc:creator>Soudip</dc:creator><description>&lt;p&gt;how can i make this work in Sharepoint portal 2003...&lt;/p&gt;
&lt;p&gt;i am not able to find the mainplaceholder tag there...(in code view FrontPage03)&lt;/p&gt;
&lt;p&gt;please help me...its really urgent!!!!!!!!!&lt;/p&gt;</description></item><item><title>re: Using Javascript to Manipulate a List Form Field</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#8373207</link><pubDate>Wed, 09 Apr 2008 23:15:31 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8373207</guid><dc:creator>Skullcrusher</dc:creator><description>&lt;p&gt;I've noticed a lot of people struggling to set a people picker fields value to the current user. &amp;nbsp;I had the need to this today and have posted a solution on my blog.&lt;/p&gt;
&lt;p&gt;&lt;a rel="nofollow" target="_new" href="http://blogs.vbcity.com/skullcrusher/archive/2008/04/10/9024.aspx"&gt;http://blogs.vbcity.com/skullcrusher/archive/2008/04/10/9024.aspx&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Hope this helps others&lt;/p&gt;
</description></item><item><title>re: Using Javascript to Manipulate a List Form Field</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#8446509</link><pubDate>Thu, 01 May 2008 09:28:56 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8446509</guid><dc:creator>mani</dc:creator><description>&lt;p&gt;hi friends&lt;/p&gt;
&lt;p&gt;I have to pull query strings to my survey, i have successfully done it and i have to hide those controls and the question to the user can any one help me out for the javascript&lt;/p&gt;</description></item><item><title>re: Using Javascript to Manipulate a List Form Field</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#8504071</link><pubDate>Wed, 14 May 2008 21:55:38 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8504071</guid><dc:creator>sukebeta</dc:creator><description>&lt;p&gt;Hi, here is a function for you to get the value from a lookup field by field name, a compliment to the function setLookupFromFieldName:&lt;/p&gt;
&lt;p&gt;function getLookupValueFromFieldName(fieldName) {&lt;/p&gt;
&lt;p&gt; &amp;nbsp;var value;&lt;/p&gt;
&lt;p&gt; &amp;nbsp;var theSelect = getTagFromIdentifierAndTitle(&amp;quot;select&amp;quot;,&amp;quot;Lookup&amp;quot;,fieldName);&lt;/p&gt;
&lt;p&gt;// if theSelect is null, it means that the target list has more than&lt;/p&gt;
&lt;p&gt;// 20 items, and the Lookup is being rendered with an input element&lt;/p&gt;
&lt;p&gt; &amp;nbsp;if (theSelect == null) { &lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;var theInput = getTagFromIdentifierAndTitle(&amp;quot;input&amp;quot;,&amp;quot;&amp;quot;,fieldName);&lt;/p&gt;
&lt;p&gt;	value = theInput.value;&lt;/p&gt;
&lt;p&gt; &amp;nbsp;} else {&lt;/p&gt;
&lt;p&gt;	value = theSelect.options(theSelect.selectedIndex).innerText;&lt;/p&gt;
&lt;p&gt; &amp;nbsp;}&lt;/p&gt;
&lt;p&gt; &amp;nbsp;return value;&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;</description></item><item><title>re: Using Javascript to Manipulate a List Form Field</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#8514167</link><pubDate>Fri, 16 May 2008 20:58:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8514167</guid><dc:creator>Monty</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;I was wondering if anyone knows how to edit/append the query string that the ok button on a Document Upload.aspx page is creating.&lt;/p&gt;
&lt;p&gt;I am trying to set a drop down field on the EditForm.aspx page after a user selects a document.&lt;/p&gt;
&lt;p&gt;I already have what I need passed in the query string to the Upload.aspx page but I am unsure on how to go about pushing what I need from there to the EditForm.aspx page when the &amp;quot;ok&amp;quot; button is clicked.&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;</description></item><item><title>Stop Messing With My Metadata! -- Locking Down Form Fields With Javascript</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#8560176</link><pubDate>Fri, 30 May 2008 00:09:40 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8560176</guid><dc:creator>Mirrored Blogs</dc:creator><description>&lt;p&gt;This blog assumes you are familiar with techniques to add javascript to a SharePoint page (specifically&lt;/p&gt;
</description></item><item><title>re: Using Javascript to Manipulate a List Form Field</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#8591748</link><pubDate>Wed, 11 Jun 2008 20:29:53 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8591748</guid><dc:creator>ashishkanoongo</dc:creator><description>&lt;p&gt;Can anyone suggest script for date comparison ? like there are two date fields i.e. start date and end date. I want to make sure that Enddata should not be less then start date.&lt;/p&gt;</description></item><item><title>re: Using Javascript to Manipulate a List Form Field</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#8721844</link><pubDate>Fri, 11 Jul 2008 21:49:31 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8721844</guid><dc:creator>dolomite</dc:creator><description>&lt;p&gt;Well I got the text fields and choice field to auto populate. But does anyone know the identifiers for the date fields?&lt;/p&gt;</description></item><item><title>re: Using Javascript to Manipulate a List Form Field</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#8721982</link><pubDate>Fri, 11 Jul 2008 23:34:50 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8721982</guid><dc:creator>dolomite</dc:creator><description>&lt;p&gt;ok, just figured it out...such a relief and just in time! If anyone else is interested here is the code for the Date Picker control and the Choice control :&lt;/p&gt;
&lt;p&gt;&amp;lt;script&amp;gt;&lt;/p&gt;
&lt;p&gt;function setChoiceFromFieldName(fieldName, value) {&lt;/p&gt;
&lt;p&gt; &amp;nbsp;if (value == undefined) return;&lt;/p&gt;
&lt;p&gt; &amp;nbsp;var theSelect = getTagFromIdentifierAndTitle(&amp;quot;select&amp;quot;,&amp;quot;DropDownChoice&amp;quot;,fieldName);&lt;/p&gt;
&lt;p&gt; &amp;nbsp;setSelectedOption(theSelect, value);&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;function setDateFromFieldName(fieldName, value) {&lt;/p&gt;
&lt;p&gt; &amp;nbsp;if (value == undefined) return;&lt;/p&gt;
&lt;p&gt; &amp;nbsp;var theInput = getTagFromIdentifierAndTitle(&amp;quot;input&amp;quot;,&amp;quot;DateTimeFieldDate&amp;quot;,fieldName);&lt;/p&gt;
&lt;p&gt; &amp;nbsp;theInput.value=value&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;// heres the mod that was posted earlier by lyndon &lt;/p&gt;
&lt;p&gt;// for lookup controls and choice controls to filter by the text values&lt;/p&gt;
&lt;p&gt;function setSelectedOption(select, value) {&lt;/p&gt;
&lt;p&gt; &amp;nbsp;var opts = select.options;&lt;/p&gt;
&lt;p&gt; &amp;nbsp;var l = opts.length;&lt;/p&gt;
&lt;p&gt; &amp;nbsp;if (select == null) return;&lt;/p&gt;
&lt;p&gt; &amp;nbsp;for (var i=0; i &amp;lt; l; i++) {&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;if (opts[i].innerText == value) {&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;select.selectedIndex = i;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;return true;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;}&lt;/p&gt;
&lt;p&gt; &amp;nbsp;}&lt;/p&gt;
&lt;p&gt; &amp;nbsp;return false;&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;&amp;lt;/script&amp;gt;&lt;/p&gt;</description></item><item><title>re: Using Javascript to Manipulate a List Form Field</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#8726802</link><pubDate>Sun, 13 Jul 2008 08:50:08 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8726802</guid><dc:creator>WW</dc:creator><description>&lt;p&gt;I also desparately need to find a way of getting, then passing an ID to the newitem.aspx - but I have no idea what you people are talking about - so I will continue Googling until I find a blogger who will write about this on a 4th grade level.&lt;/p&gt;</description></item><item><title>re: Using Javascript to Manipulate a List Form Field</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#8782363</link><pubDate>Mon, 28 Jul 2008 07:18:09 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8782363</guid><dc:creator>Rajesh</dc:creator><description>&lt;p&gt;How to update the drop down boxes of datetime filed using javascript? I need to add +5 to the current Hours.. &lt;/p&gt;</description></item><item><title>re: Using Javascript to Manipulate a List Form Field</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#8789597</link><pubDate>Tue, 29 Jul 2008 21:28:53 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8789597</guid><dc:creator>Candace</dc:creator><description>&lt;p&gt;Same question as above from Monty... &amp;nbsp;I've found this question on many other sites, but no posted answers. &amp;nbsp;&lt;/p&gt;
&lt;p&gt;... how to edit/append the query string that the OK button on a Document Upload.aspx page is creating.&lt;/p&gt;
&lt;p&gt;I am trying to set a drop down field on the EditForm.aspx page after a user selects a document.&lt;/p&gt;
&lt;p&gt;I already have what I need passed in the query string to the Upload.aspx page but I am unsure on how to go about pushing what I need from there to the EditForm.aspx page when the &amp;quot;ok&amp;quot; button is clicked.&lt;/p&gt;</description></item><item><title>re: Using Javascript to Manipulate a List Form Field</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#8793470</link><pubDate>Thu, 31 Jul 2008 18:45:56 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8793470</guid><dc:creator>Candace</dc:creator><description>&lt;p&gt;Figured it out... it works for libraries just the same. &amp;nbsp;The upload.aspx passes the query string through.&lt;/p&gt;</description></item><item><title>re: Using Javascript to Manipulate a List Form Field</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#8827917</link><pubDate>Mon, 04 Aug 2008 09:08:34 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8827917</guid><dc:creator>Jose Otavio Ferreira Soares</dc:creator><description>&lt;p&gt;Guys, as per other posts(RamUday) I've been having some trouble to select the &amp;quot;multiple lines&amp;quot; boxes as &amp;quot;input&amp;quot;. Change to textarea and has worked well. Cheers.&lt;/p&gt;</description></item><item><title>re: Using Javascript to Manipulate a List Form Field</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#8948488</link><pubDate>Sat, 13 Sep 2008 02:45:39 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8948488</guid><dc:creator>Swathi W</dc:creator><description>&lt;p&gt;I was breaking my head over how to populate the Hyperlink field with a default value using javascript&lt;/p&gt;
&lt;p&gt;About what its tag name and identifier could be.&lt;/p&gt;
&lt;p&gt;Well I now figured out and hope it would definitely help others.&lt;/p&gt;
&lt;p&gt;FOR Hyperlink Field&lt;/p&gt;
&lt;p&gt;Tag name- input &amp;nbsp;&lt;/p&gt;
&lt;p&gt;Identifier- URLFieldURL&lt;/p&gt;
&lt;p&gt;And just remember that if you are defaulting the Hyperlink field to a local link on the system. &lt;/p&gt;
&lt;p&gt;Replace &amp;quot;\&amp;quot; with &amp;quot;/&amp;quot;&lt;/p&gt;
&lt;p&gt;For ex: &amp;quot;\\pbosfile06\policy\Application&amp;quot; Change that to &amp;quot;//pbosfile06/policy/Application&amp;quot;. It would now work fine without any problem.&lt;/p&gt;
&lt;p&gt;And we can use the same function mentioned in this blog getTagFromIdentifierAndTitle()&lt;/p&gt;</description></item><item><title>re: Using Javascript to Manipulate a List Form Field</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#8966465</link><pubDate>Fri, 26 Sep 2008 16:49:01 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8966465</guid><dc:creator>Chris</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;What is the tagname for a person/group?&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
&lt;p&gt;Chris&lt;/p&gt;
&lt;p&gt;sammutchris@hotmail.com&lt;/p&gt;
&lt;p&gt;sammutchris@gmail.com&lt;/p&gt;</description></item><item><title>re: Using Javascript to Manipulate a List Form Field</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#8975564</link><pubDate>Fri, 03 Oct 2008 17:49:17 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8975564</guid><dc:creator>Bobby Vastakis</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I have a question about drop-down lists. &amp;nbsp;I am fairly new to sharepoint so please bear with me. &amp;nbsp;I have data form with a connection to SQL server 2000. &amp;nbsp;I have a table with multiple foreign keys. &amp;nbsp;Instead of displaying the foreign key (number), i want to display a drop down list for the name in that table. &amp;nbsp;Here is the example below:&lt;/p&gt;
&lt;p&gt;Table Mentor (m.ID, name, role, d.ID, p.ID)&lt;/p&gt;
&lt;p&gt;Table Division d(ID, division)&lt;/p&gt;
&lt;p&gt;Table Plant p(ID, plant)&lt;/p&gt;
&lt;p&gt;I want to display a data view form that i am able to insert, delete, and update. &amp;nbsp;I want the table to display m.name, m.role, d.division (drop down from existing data in division table), p.plant (drop down from existing data in plant table).&lt;/p&gt;
&lt;p&gt;Thanks in advance for the help,&lt;/p&gt;
&lt;p&gt;Bobby&lt;/p&gt;</description></item><item><title>re: Using Javascript to Manipulate a List Form Field</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#8998171</link><pubDate>Mon, 13 Oct 2008 19:05:14 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8998171</guid><dc:creator>bob e</dc:creator><description>&lt;p&gt;Hello Rob, &amp;nbsp;I am getting a script error when I add the code to my page. &amp;nbsp;Any thoughts on this error? &amp;nbsp;&lt;/p&gt;
&lt;p&gt;Webpage Script Errors&lt;/p&gt;
&lt;p&gt;User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; .NET CLR 3.0.04506.590; Zune 2.0; InfoPath.2; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; MS-RTC LM 8; .NET CLR 3.5.30428; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; SPC 3.1 P1 Ta)&lt;/p&gt;
&lt;p&gt;Timestamp: Mon, 13 Oct 2008 16:02:43 UTC&lt;/p&gt;
&lt;p&gt;Message: 'undefined' is null or not an object&lt;/p&gt;
&lt;p&gt;Line: 2097&lt;/p&gt;
&lt;p&gt;Char: 2&lt;/p&gt;
&lt;p&gt;Code: 0&lt;/p&gt;
&lt;p&gt;URI: &lt;a rel="nofollow" target="_new" href="http://intranet/_layouts/1033/core.js?rev=S5dt4K8TJGVTYU9HrW6enw%3D%3D"&gt;http://intranet/_layouts/1033/core.js?rev=S5dt4K8TJGVTYU9HrW6enw%3D%3D&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Message: Object doesn't support this property or method&lt;/p&gt;
&lt;p&gt;Line: 164&lt;/p&gt;
&lt;p&gt;Char: 1&lt;/p&gt;
&lt;p&gt;Code: 0&lt;/p&gt;
&lt;p&gt;URI: &lt;a rel="nofollow" target="_new" href="http://intranet/sites/main/ee/hotline/Page/Add%20Question.aspx?SectionTitle=06"&gt;http://intranet/sites/main/ee/hotline/Page/Add%20Question.aspx?SectionTitle=06&lt;/a&gt; WOOD, PLASTICS &amp;amp; COMPOSITES&amp;amp;CategoryTitle=ARCHITECTURAL WOODWORK&lt;/p&gt;</description></item><item><title>re: Using Javascript to Manipulate a List Form Field</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#8998194</link><pubDate>Mon, 13 Oct 2008 19:13:05 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8998194</guid><dc:creator>bob e</dc:creator><description>&lt;p&gt;fty - That line in my core.css is:&lt;/p&gt;
&lt;p&gt;	var rgopt=strOpts.split(&amp;quot;|&amp;quot;);&lt;/p&gt;</description></item><item><title>re: Using Javascript to Manipulate a List Form Field</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#9000701</link><pubDate>Wed, 15 Oct 2008 18:31:35 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9000701</guid><dc:creator>Tibor</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;How would you manage to use the web part parameters past in from athet web part as the default value. How can the parameters be retrieved by javascript?&lt;/p&gt;</description></item><item><title>re: Using Javascript to Manipulate a List Form Field</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#9008086</link><pubDate>Mon, 20 Oct 2008 23:29:55 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9008086</guid><dc:creator>Eduardo Dias</dc:creator><description>&lt;p&gt;Hi, I am trying to get the &amp;quot;Assigend To&amp;quot; filed value, I used the sugestion above but didn&amp;#180;t work, somebody knows how to get this field?&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Eduardo&lt;/p&gt;</description></item><item><title>Prepopulating Fields in SharePoint List Pages</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#9009129</link><pubDate>Tue, 21 Oct 2008 13:00:18 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9009129</guid><dc:creator>Dan Holme</dc:creator><description>&lt;p&gt;See &lt;a rel="nofollow" target="_new" href="http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list"&gt;http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list&lt;/a&gt;&lt;/p&gt;
</description></item><item><title>re: Using Javascript to Manipulate a List Form Field</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#9022753</link><pubDate>Wed, 29 Oct 2008 21:35:37 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9022753</guid><dc:creator>cristina</dc:creator><description>&lt;p&gt;Could someone give an idea how to have two pre-autopopulation &amp;nbsp;items such as &amp;nbsp;newform.aspx?report=Recruiter%20Center&amp;amp;age=20 &amp;nbsp;?&lt;/p&gt;
&lt;p&gt;regards, &lt;/p&gt;
&lt;p&gt;Cristina&lt;/p&gt;</description></item><item><title>re: Using Javascript to Manipulate a List Form Field</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#9024595</link><pubDate>Thu, 30 Oct 2008 18:10:27 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9024595</guid><dc:creator>Tuesday </dc:creator><description>&lt;p&gt;I'd like to reuse the setLookupFromFieldName or setSelecttedOption in an inline javascript to change the value of the ListForm field bound to a Sharepoint List.&lt;/p&gt;
&lt;p&gt;1. Project ID is the field name for the dropdown I'm trying to set.&lt;/p&gt;
&lt;p&gt;2. @Timesheet_ID is the value I want to set the dropdown to. It will always be known, and will always be in the dropdown list as an option.&lt;/p&gt;
&lt;p&gt;My design is this: The user clicks on the link below (timesheet ID is loaded prior) to fire off the javascript. I want the dropdown in the other web part to go to that timesheet ID. Is this possible or am I continuing to waste time?&lt;/p&gt;
&lt;p&gt;A sample timesheet ID value would be &amp;quot;#222 - IT Infrastructure&amp;quot;&lt;/p&gt;
&lt;p&gt;&amp;lt;a href=&amp;quot;#&amp;quot; onclick=&amp;quot;setLookupFromFieldName('Project ID', {@Timesheet_ID})&amp;quot;&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;lt;xsl:value-of select=&amp;quot;@Timesheet_ID&amp;quot; /&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;/a&amp;gt;&lt;/p&gt;
&lt;p&gt;Please help - this is driving me nuts!&lt;/p&gt;</description></item><item><title>re: Using Javascript to Manipulate a List Form Field</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#9052665</link><pubDate>Fri, 07 Nov 2008 20:38:39 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9052665</guid><dc:creator>Jean</dc:creator><description>&lt;p&gt;I'm trying to use something semilar &amp;nbsp;sukebeta &amp;nbsp;code which does not seem to be working. I have a script at the bottom of the Edit.aspx page, I need to prevent users setting a drop down field to approved if a couple fields are left empty. I can't set these fields to be required as the person that enters the request &amp;nbsp;does not do approval and those semi required fields doe not pertain to him.&lt;/p&gt;
&lt;p&gt;I have this working in a simple html and JScript page but the sharepoint portion makes it complicated.&lt;/p&gt;
&lt;p&gt;Any help would be much apprecaite.&lt;/p&gt;</description></item><item><title>re: Using Javascript to Manipulate a List Form Field</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#9160701</link><pubDate>Mon, 01 Dec 2008 18:52:01 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9160701</guid><dc:creator>Javier Regusci</dc:creator><description>&lt;p&gt;WORKARROUND for setting datetime hour and minute fields&lt;/p&gt;
&lt;p&gt;Here is a workarround for setting the values for start/end hours and start/end minute in a Task form. Since the ID for those select contros is generated dinamically i've implemented 2 functions which search for the ones that have the string &amp;quot;00:&amp;quot; for hours and &amp;quot;05&amp;quot; for minutes. I know it's not an elegant way to do it but it will have to do until i can find a way to get the ID for those controls. (Hopefully SP will always render the controls in the same order, because otherwise the values will get set in the wrong order).&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;function setHours(startHour, endHour) {&lt;/p&gt;
&lt;p&gt;	 &amp;nbsp;var tags = document.getElementsByTagName(&amp;quot;select&amp;quot;);&lt;/p&gt;
&lt;p&gt;	 &amp;nbsp;var value = startHour;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;for (var i=0; i &amp;lt; tags.length; i++) {&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;var select &amp;nbsp;= tags[i];&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (select != null &amp;amp;&amp;amp; select.options!=null &amp;amp;&amp;amp; select.options[0] != null){&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (select.options[0].value.indexOf(&amp;quot;00:&amp;quot;) &amp;gt;= 0 ) {&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; setSelectedOption(select, value);&lt;/p&gt;
&lt;p&gt;	 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; value = endHour;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/p&gt;
&lt;p&gt;	 &amp;nbsp;}&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;}&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;function setMinutes(startMinute, endMinute) {&lt;/p&gt;
&lt;p&gt;	 &amp;nbsp;var tags = document.getElementsByTagName(&amp;quot;select&amp;quot;);&lt;/p&gt;
&lt;p&gt;	 &amp;nbsp;var value = startMinute;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;for (var i=0; i &amp;lt; tags.length; i++) {&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;var select &amp;nbsp;= tags[i];&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (select != null &amp;amp;&amp;amp; select.options!=null &amp;amp;&amp;amp; select.options[0] != null){&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (select.options[1].value.indexOf(&amp;quot;05&amp;quot;) &amp;gt;= 0 ) {&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;setSelectedOption(select, value);&lt;/p&gt;
&lt;p&gt;	 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; value = endMinute;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/p&gt;
&lt;p&gt;	 &amp;nbsp;}&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;}&lt;/p&gt;
&lt;p&gt;For example, a call would be:&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;setHours(&amp;quot;09:&amp;quot;, &amp;quot;10:&amp;quot;);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;setMinutes(&amp;quot;05, &amp;quot;10&amp;quot;);&lt;/p&gt;
&lt;p&gt;Remember to append the &amp;quot;:&amp;quot; for the hour fields!&lt;/p&gt;
&lt;p&gt;Please let me know if anyone found a better way to do it. Thanks.&lt;/p&gt;</description></item><item><title>re: Using Javascript to Manipulate a List Form Field</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#9170105</link><pubDate>Wed, 03 Dec 2008 17:18:31 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9170105</guid><dc:creator>realite</dc:creator><description>&lt;p&gt;really nice work, in my scenario there is a problem with post back and i hope to i can solve with this solution. Thanks a lot&lt;/p&gt;</description></item><item><title>re: Using Javascript to Manipulate a List Form Field</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#9188000</link><pubDate>Wed, 10 Dec 2008 01:23:25 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9188000</guid><dc:creator>Michael Hill</dc:creator><description>&lt;p&gt;Thanks to Rob and to the many commenters for this code. I needed to populate a custom column when uploading documents so I used this tip on EditForm.aspx. My parameter value is in the URL when the upload button is pushed, but by the time I get to EditForm.aspx, the Source URL has been encoded (the &amp;quot;?&amp;quot; to &amp;quot;%3F&amp;quot; and &amp;quot;=&amp;quot; to &amp;quot;%3D&amp;quot;). So I just had to insert a couple of lines to convert those characters. If I had more than one parameter, I guess I would have had to add an additional line to convert &amp;quot;%26&amp;quot; to &amp;quot;&amp;amp;&amp;quot;.&lt;/p&gt;
&lt;p&gt; &amp;nbsp;var qs = location.search.substring(1, location.search.length);&lt;/p&gt;
&lt;p&gt; &amp;nbsp;qs = qs.replace(&amp;quot;%3F&amp;quot;,&amp;quot;&amp;amp;&amp;quot;);&lt;/p&gt;
&lt;p&gt; &amp;nbsp;qs = qs.replace(&amp;quot;%3D&amp;quot;,&amp;quot;=&amp;quot;);&lt;/p&gt;
&lt;p&gt;The other thing I added was to check to see if &amp;quot;Mode=Upload&amp;quot; was in the URL so it would only populate the field on upload.&lt;/p&gt;</description></item><item><title>re: Using Javascript to Manipulate a List Form Field</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#9340538</link><pubDate>Mon, 19 Jan 2009 22:00:02 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9340538</guid><dc:creator>Ramesh Krishnan</dc:creator><description>&lt;p&gt;Great Post.&lt;/p&gt;
&lt;p&gt;Is it possible to do this for the Document Library (or is it possible to do the meta data and the uploading on the same page?)&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
&lt;p&gt;ramesh&lt;/p&gt;</description></item><item><title>re: Using Javascript to Manipulate a List Form Field</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#9358595</link><pubDate>Wed, 21 Jan 2009 23:41:02 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9358595</guid><dc:creator>sandy</dc:creator><description>&lt;p&gt;I don't have sharepoint designer but this thread looks like where I should post my question.&lt;/p&gt;
&lt;p&gt;Below is the .asp code from a non sharepoint webpage:&lt;/p&gt;
&lt;p&gt; &amp;nbsp;&amp;lt;form method=&amp;quot;POST&amp;quot; onSubmit=&amp;quot;return validateOnSubmit()&amp;quot; action=&amp;quot;&lt;a rel="nofollow" target="_new" href="http://mysite/ByeBye.aspx&amp;quot;"&gt;http://mysite/ByeBye.aspx&amp;quot;&lt;/a&gt; name=&amp;quot;requestSend&amp;quot;&amp;gt;&lt;/p&gt;
&lt;p&gt;						&amp;lt;table cellpadding=&amp;quot;2&amp;quot; cellspacing=&amp;quot;2&amp;quot; border=&amp;quot;0&amp;quot;&amp;gt;&lt;/p&gt;
&lt;p&gt;							&amp;lt;tr&amp;gt;&lt;/p&gt;
&lt;p&gt;								&amp;lt;td class=&amp;quot;relativeText&amp;quot;&amp;gt;Name*:&amp;lt;/td&amp;gt;&lt;/p&gt;
&lt;p&gt;								&amp;lt;td&amp;gt;&amp;lt;input type=&amp;quot;text&amp;quot; size=&amp;quot;20&amp;quot; name=&amp;quot;from&amp;quot; onChange=&amp;quot;validateformat(this,'v_from');&amp;quot; value=&amp;quot;Sandra Chamberlion&amp;quot;&amp;gt;&amp;lt;/td&amp;gt;&lt;/p&gt;
&lt;p&gt;								&amp;lt;td width=&amp;quot;25%&amp;quot; id=&amp;quot;v_from&amp;quot; class=&amp;quot;error&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;/p&gt;
&lt;p&gt;							&amp;lt;/tr&amp;gt;&lt;/p&gt;
&lt;p&gt;							&amp;lt;tr&amp;gt;&lt;/p&gt;
&lt;p&gt;								&amp;lt;td class=&amp;quot;relativeText&amp;quot;&amp;gt;Phone*:&amp;lt;/td&amp;gt;&lt;/p&gt;
&lt;p&gt;								&amp;lt;td&amp;gt;&amp;lt;input type=&amp;quot;text&amp;quot; size=&amp;quot;10&amp;quot; maxlength=&amp;quot;10&amp;quot; name=&amp;quot;phone&amp;quot; onChange=&amp;quot;validateExt(this, 'v_phone', true);&amp;quot; value=&amp;quot;0000000000&amp;quot;&amp;gt;&amp;lt;/td&amp;gt;&lt;/p&gt;
&lt;p&gt;								&amp;lt;td id=&amp;quot;v_phone&amp;quot; class=&amp;quot;error&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;/p&gt;
&lt;p&gt;							&amp;lt;/tr&amp;gt;&lt;/p&gt;
&lt;p&gt;							&amp;lt;tr&amp;gt;&lt;/p&gt;
&lt;p&gt;								&amp;lt;td class=&amp;quot;relativeText&amp;quot;&amp;gt;Contact*:&amp;lt;/td&amp;gt;&lt;/p&gt;
&lt;p&gt;								&amp;lt;td&amp;gt;&amp;lt;input type=&amp;quot;text&amp;quot; size=&amp;quot;30&amp;quot; name=&amp;quot;email&amp;quot; onChange=&amp;quot;validateEmail(this, 'v_email', true);&amp;quot; value=&amp;quot;schamberlion@x.com&amp;quot;&amp;gt;&amp;lt;/td&amp;gt;&lt;/p&gt;
&lt;p&gt;								&amp;lt;td id=&amp;quot;v_email&amp;quot; class=&amp;quot;error&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;/p&gt;
&lt;p&gt;							&amp;lt;/tr&amp;gt;&lt;/p&gt;
&lt;p&gt;							&amp;lt;tr&amp;gt;&lt;/p&gt;
&lt;p&gt;								&amp;lt;td class=&amp;quot;relativeText&amp;quot;&amp;gt;Weekdays*:&amp;lt;/td&amp;gt;&lt;/p&gt;
&lt;p&gt;								&amp;lt;td valign=&amp;quot;top&amp;quot;&amp;gt;&lt;/p&gt;
&lt;p&gt;								&amp;lt;select class=&amp;quot;sidetext&amp;quot; name=&amp;quot;days&amp;quot; onChange=&amp;quot;validatePresent(this, 'v_days);&amp;quot;&amp;gt;&lt;/p&gt;
&lt;p&gt;									&amp;lt;option value=&amp;quot;&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;lt;/option&amp;gt;&lt;/p&gt;
&lt;p&gt;									&amp;lt;option value=&amp;quot;Monday&amp;quot;&amp;gt;Monday&amp;lt;/option&amp;gt;&lt;/p&gt;
&lt;p&gt;									&amp;lt;option value=&amp;quot;Tuesday&amp;quot;&amp;gt;Tuesday&amp;lt;/option&amp;gt;&lt;/p&gt;
&lt;p&gt;									&amp;lt;option value=&amp;quot;Wednesday&amp;quot;&amp;gt;Wednesday&amp;lt;/option&amp;gt;&lt;/p&gt;
&lt;p&gt;									&amp;lt;option value=&amp;quot;Thursday&amp;quot;&amp;gt;Thursday&amp;lt;/option&amp;gt;&lt;/p&gt;
&lt;p&gt;									&amp;lt;option value=&amp;quot;Friday&amp;quot;&amp;gt;Friday&amp;lt;/option&amp;gt;&lt;/p&gt;
&lt;p&gt;									&amp;lt;option value=&amp;quot;Saturday&amp;quot;&amp;gt;Saturday&amp;lt;/option&amp;gt;&lt;/p&gt;
&lt;p&gt;									&amp;lt;option value=&amp;quot;Sunday&amp;quot;&amp;gt;Sunday&amp;lt;/option&amp;gt;&lt;/p&gt;
&lt;p&gt;								&amp;lt;/select&amp;gt; &amp;lt;/td&amp;gt;&lt;/p&gt;
&lt;p&gt;								&amp;lt;td id=&amp;quot;v_days&amp;quot; class=&amp;quot;error&amp;quot;&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;/p&gt;
&lt;p&gt;							&amp;lt;/tr&amp;gt;&lt;/p&gt;
&lt;p&gt;							&amp;lt;tr&amp;gt;&lt;/p&gt;
&lt;p&gt;								&amp;lt;td colspan=&amp;quot;3&amp;quot; align=&amp;quot;right&amp;quot;&amp;gt;&amp;lt;input type=&amp;quot;reset&amp;quot; value=&amp;quot;Cancel&amp;quot;&amp;gt;&lt;/p&gt;
&lt;p&gt;								&amp;lt;input type=&amp;quot;Submit&amp;quot; value=&amp;quot;Submit Request&amp;quot; name=&amp;quot;Send&amp;quot;&amp;gt;&amp;lt;/td&amp;gt;&lt;/p&gt;
&lt;p&gt;							&amp;lt;/tr&amp;gt;&lt;/p&gt;
&lt;p&gt;						&amp;lt;/table&amp;gt;&lt;/p&gt;
&lt;p&gt;						&amp;lt;/form&amp;gt;&lt;/p&gt;
&lt;p&gt;Above is the asp code from a page, say page A, &amp;nbsp;where people fill out a form like name, phone, email, etc and hit submit button. In my sharepoint site, say page B, I have created a custom list with exactly same fields as it appears in the form. When the user fills the information in page A and hits submit button, how do I pass those values to prepopulate in the custom list when I open page B. both page A and page B are on different servers now? How would it be done if they were in the same server. if it can be done, where exactly I need to do the change in code?&lt;/p&gt;</description></item><item><title>re: Using Javascript to Manipulate a List Form Field</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#9362630</link><pubDate>Thu, 22 Jan 2009 07:23:24 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9362630</guid><dc:creator>tom daly</dc:creator><description>&lt;p&gt;I was unable to get this to work with my list of 27 form fields. &lt;/p&gt;
&lt;p&gt;getTagFromIdentifierAndTitle(&amp;quot;input&amp;quot;,&amp;quot;&amp;quot;,&amp;quot;Title&amp;quot;); returns &amp;nbsp;tags Count = 0;&lt;/p&gt;
&lt;p&gt;getTagFromIdentifierAndTitle(&amp;quot;*&amp;quot;,&amp;quot;&amp;quot;,&amp;quot;Title&amp;quot;); returns tags count = 9 .. some &amp;lt;TITLE&amp;gt; &amp;lt;SCRIPT&amp;gt; &amp;lt;META&amp;gt; &lt;/p&gt;
&lt;p&gt;all my form fields are text boxes, and 1 multiline textbox.&lt;/p&gt;</description></item><item><title>re: Using Javascript to Manipulate a List Form Field</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#9409305</link><pubDate>Mon, 09 Feb 2009 23:53:10 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9409305</guid><dc:creator>SP Designer</dc:creator><description>&lt;p&gt; &amp;nbsp;Thanks this is working well for me- &amp;nbsp;I just have an issue. &amp;nbsp;Some of the fields that I am populating from the URL on the NewForm need to be read-only and some hidden.&lt;/p&gt;
&lt;p&gt; &amp;nbsp;I have tried making the read-only field a Label, but then cannot access the field in javascript.&lt;/p&gt;
&lt;p&gt; &amp;nbsp;I tried making the hidden field property visible=false but it seems as if the field does not exist on the page when rendered and therefore cannot set the value in javascript.&lt;/p&gt;
&lt;p&gt; &amp;nbsp;How can I populate (from query string parms) read-only and hidden fields on the NewForm?&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;</description></item><item><title>re: Using Javascript to Manipulate a List Form Field</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#9433354</link><pubDate>Thu, 19 Feb 2009 09:19:28 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9433354</guid><dc:creator>Rob</dc:creator><description>&lt;p&gt;Hey, &lt;/p&gt;
&lt;p&gt;For Rich Text Fields (i.e., Multiple Lines of Text), the tagName is &amp;quot;textarea&amp;quot; and not &amp;quot;input&amp;quot; as shown in the table at the top.&lt;/p&gt;
&lt;p&gt;Also, in my case where I am modifying a copy of NewForm.aspx, it seems that BooleanField can not be found. &amp;nbsp;So, I simply looked up the field id (use Browser - right-click View Source) and created:&lt;/p&gt;
&lt;p&gt;function setYesNoFrimFieldId(id, value)&lt;/p&gt;
&lt;p&gt;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; if (( value == undefined) || ( id == undefined) return;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; var b = document.getElementById( id );&lt;/p&gt;
&lt;p&gt; &amp;nbsp; var newBoolean = false ;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; var newOnOffVal = &amp;quot;off&amp;quot;;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; if ( value == 1 || value == true || value == &amp;quot;true&amp;quot; )&lt;/p&gt;
&lt;p&gt; &amp;nbsp; {&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;newBoolean = true ;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;newOnOffVal = &amp;quot;on&amp;quot;;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; }&lt;/p&gt;
&lt;p&gt; &amp;nbsp; b.checked = newBoolean ;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; b.value = newOnOffVal ;&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;Great post. &amp;nbsp;Keep the dialog going.&lt;/p&gt;</description></item><item><title>Survey pulling in URL Querystring Data with Hidden Fields(!!), Anonymous Access.</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#9455203</link><pubDate>Tue, 03 Mar 2009 00:16:11 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9455203</guid><dc:creator>SharePoint 1970</dc:creator><description>&lt;p&gt;This is a bit like &amp;amp;quot;Part II&amp;amp;quot; to my original post [ &lt;a rel="nofollow" target="_new" href="http://www.sharepointblogs.com/ggill1970"&gt;http://www.sharepointblogs.com/ggill1970&lt;/a&gt;&lt;/p&gt;
</description></item><item><title>re: Using Javascript to Manipulate a List Form Field</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#9471961</link><pubDate>Thu, 12 Mar 2009 20:36:10 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9471961</guid><dc:creator>Parth</dc:creator><description>&lt;p&gt;Please.. Please reply for the following question that i have.&lt;/p&gt;
&lt;p&gt;I just would like to know that where would i define &amp;quot;QUERYSTRING VARIABLE NAME &amp;quot; before using them into following &lt;/p&gt;
&lt;p&gt;setLookupFromFieldName(&amp;quot;&amp;lt;&amp;lt;FIELD DISPLAY NAME _1&amp;gt;&amp;gt;&amp;quot;, vals[&amp;quot;&amp;lt;&amp;lt;QUERYSTRING VARIABLE NAME _&amp;gt;&amp;gt;&amp;quot;]);&lt;/p&gt;
&lt;p&gt;setLookupFromFieldName(&amp;quot;&amp;lt;&amp;lt;FIELD DISPLAY NAME_2&amp;gt;&amp;gt;&amp;quot;, vals[&amp;quot;&amp;lt;&amp;lt;QUERYSTRING VARIABLE NAME_2 &amp;gt;&amp;gt;&amp;quot;]);&lt;/p&gt;
&lt;p&gt;Do i have to define them into dataview?? I m currently using this logic to auto populate one drop down. Works gr8, but wne i try and do it for 2 drop down, i get random values selected into second drop-down. Would you please share something that can help little extra. &lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;</description></item><item><title>re: Using Javascript to Manipulate a List Form Field</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#9471974</link><pubDate>Thu, 12 Mar 2009 20:41:08 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9471974</guid><dc:creator>alienout</dc:creator><description>&lt;p&gt;Please.. Please reply for the following question that i have.&lt;/p&gt;
&lt;p&gt;I just would like to know that where would i define &amp;quot;QUERYSTRING VARIABLE NAME &amp;quot; before using them into following &lt;/p&gt;
&lt;p&gt;setLookupFromFieldName(&amp;quot;&amp;lt;&amp;lt;FIELD DISPLAY NAME _1&amp;gt;&amp;gt;&amp;quot;, vals[&amp;quot;&amp;lt;&amp;lt;QUERYSTRING VARIABLE NAME _&amp;gt;&amp;gt;&amp;quot;]);&lt;/p&gt;
&lt;p&gt;setLookupFromFieldName(&amp;quot;&amp;lt;&amp;lt;FIELD DISPLAY NAME_2&amp;gt;&amp;gt;&amp;quot;, vals[&amp;quot;&amp;lt;&amp;lt;QUERYSTRING VARIABLE NAME_2 &amp;gt;&amp;gt;&amp;quot;]);&lt;/p&gt;
&lt;p&gt;Do i have to define them into dataview?? I m currently using this logic to auto populate one drop down. Works gr8, but wne i try and do it for 2 drop down, i get random values selected for second dropdown. I m using ID - query string to pass the values from previous page. Would you please share something that can help little extra. &lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
</description></item><item><title>re: Using Javascript to Manipulate a List Form Field</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#9522700</link><pubDate>Tue, 31 Mar 2009 16:51:48 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9522700</guid><dc:creator>Rennick</dc:creator><description>&lt;p&gt;Can anyone please help me hide a form field of type &amp;quot;Persons and Groups&amp;quot; in newform.aspx using the javascript I used here in the following post. Everything hides except the &amp;quot;Persons and Groups&amp;quot; type of field :-(&lt;/p&gt;
&lt;p&gt;&lt;a rel="nofollow" target="_new" href="http://www.cleverworkarounds.com/2008/02/07/more-sharepoint-branding-customisation-using-javascript-part-1/"&gt;http://www.cleverworkarounds.com/2008/02/07/more-sharepoint-branding-customisation-using-javascript-part-1/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Really would appreciate anyone's help. A post here to share would be great. Thanks, Rennick&lt;/p&gt;</description></item><item><title>re: Using Javascript to Manipulate a List Form Field</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#9537642</link><pubDate>Wed, 08 Apr 2009 10:35:05 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9537642</guid><dc:creator>sellwong</dc:creator><description>&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;I want to compare the date and time in the list from sharepoint, i used the following script to compare two dates but i don't know how to compare the times. please advice, thx&lt;/P&gt;
&lt;P&gt;function PreSaveAction()&lt;/P&gt;
&lt;P&gt;{&lt;/P&gt;
&lt;P&gt;var date1 = getTagFromIdentifierAndTitle("INPUT","DateTimeFieldDate","Start Date");&lt;/P&gt;
&lt;P&gt;var date2 = getTagFromIdentifierAndTitle("INPUT","DateTimeFieldDate","End Date");&lt;/P&gt;
&lt;P&gt;var arrDate1 = date1.value.split("/");&lt;/P&gt;
&lt;P&gt;var useDate1 = new Date(arrDate1[2], arrDate1[1]-1, arrDate1[0]);&lt;/P&gt;
&lt;P&gt;var arrDate2 = date2.value.split("/");&lt;/P&gt;
&lt;P&gt;var useDate2 = new Date(arrDate2[2], arrDate2[1]-1, arrDate2[0]);&lt;/P&gt;
&lt;P&gt;if(useDate1 &amp;gt; useDate2 || useDate1 &amp;gt; today || useDate2 &amp;gt; today)&lt;/P&gt;
&lt;P&gt;{&lt;/P&gt;
&lt;P&gt;alert("The End Date cannot happen earlier than the Start Date");&lt;/P&gt;
&lt;P&gt;return false; // Cancel the item save process&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;
&lt;P&gt;return true; // OK to proceed with the save item&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;
&lt;P&gt;function getTagFromIdentifierAndTitle(tagName, identifier, title) {&lt;/P&gt;
&lt;P&gt;var len = identifier.length;&lt;/P&gt;
&lt;P&gt;var tags = document.getElementsByTagName(tagName);&lt;/P&gt;
&lt;P&gt;for (var i=0; i &amp;lt; tags.length; i++) {&lt;/P&gt;
&lt;P&gt;var tempString = tags[i].id;&lt;/P&gt;
&lt;P&gt;if (tags[i].title == title &amp;amp;&amp;amp; (identifier==""||tempString.indexOf(identifier)==tempString.length-len)) {&lt;/P&gt;
&lt;P&gt;return tags[i];&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;
&lt;P&gt;return null;&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;</description></item><item><title>re: Using Javascript to Manipulate a List Form Field</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#9539324</link><pubDate>Thu, 09 Apr 2009 05:14:33 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9539324</guid><dc:creator>sellwong</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I used the following javascipt to validate the date filed of my sharepoint list currently.&lt;/p&gt;
&lt;p&gt;function PreSaveAction()&lt;/p&gt;
&lt;p&gt;{&lt;/p&gt;
&lt;p&gt;var date1 = getTagFromIdentifierAndTitle(&amp;quot;INPUT&amp;quot;,&amp;quot;DateTimeFieldDate&amp;quot;,&amp;quot;Start Date&amp;quot;);&lt;/p&gt;
&lt;p&gt;var date2 = getTagFromIdentifierAndTitle(&amp;quot;INPUT&amp;quot;,&amp;quot;DateTimeFieldDate&amp;quot;,&amp;quot;End Date&amp;quot;);&lt;/p&gt;
&lt;p&gt;var arrDate1 = date1.value.split(&amp;quot;/&amp;quot;);&lt;/p&gt;
&lt;p&gt;var useDate1 = new Date(arrDate1[2], arrDate1[1]-1, arrDate1[0]);&lt;/p&gt;
&lt;p&gt;var arrDate2 = date2.value.split(&amp;quot;/&amp;quot;);&lt;/p&gt;
&lt;p&gt;var useDate2 = new Date(arrDate2[2], arrDate2[1]-1, arrDate2[0]);&lt;/p&gt;
&lt;p&gt;if(useDate1 &amp;gt; useDate2 || useDate1 &amp;gt; today || useDate2 &amp;gt; today)&lt;/p&gt;
&lt;p&gt;{&lt;/p&gt;
&lt;p&gt;alert(&amp;quot;The End Date cannot happen earlier than the Start Date&amp;quot;);&lt;/p&gt;
&lt;p&gt;return false; // Cancel the item save process&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;return true; // OK to proceed with the save item&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;But it cannot validate the time field, please kindly help me to resolve this problem.&lt;/p&gt;
&lt;p&gt;thx&lt;/p&gt;
</description></item><item><title>re: Using Javascript to Manipulate a List Form Field</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#9552610</link><pubDate>Thu, 16 Apr 2009 13:55:07 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9552610</guid><dc:creator>Pradeep</dc:creator><description>&lt;p&gt;Hi ur Blog was exactly what the doctor ordered........&lt;/p&gt;
&lt;p&gt;but there is loop &amp;nbsp;hole in that &amp;nbsp;code&lt;/p&gt;
&lt;p&gt;when we have multi look up column &amp;nbsp; Lookup (multiple) , There we have to append &amp;nbsp;Title &lt;/p&gt;
&lt;p&gt;with &amp;quot;possible values&amp;quot; &amp;nbsp;or &amp;quot;selected values&amp;quot; &lt;/p&gt;
&lt;p&gt;here si the change required &lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;function getTagFromIdentifierAndTitle(tagName, identifier, title) {&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;var len = identifier.length;&lt;/p&gt;
&lt;p&gt;// for first look up &amp;nbsp;select box&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;title = title + &amp;quot; possible values&amp;quot;;&lt;/p&gt;
&lt;p&gt;// // for 2 nd look up &amp;nbsp;select box&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;title = title + &amp;quot; selected values&amp;quot;;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;var tags = document.getElementsByTagName(tagName);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;for (var i=0; i &amp;lt; tags.length; i++) {&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;var tempString = tags[i].id;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (tags[i].title == title &amp;amp;&amp;amp; (identifier == &amp;quot;&amp;quot; || tempString.indexOf(identifier) == tempString.length - len)) {&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return tags[i];&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;return null;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;}&lt;/p&gt;</description></item><item><title>re: Using Javascript to Manipulate a List Form Field</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#9554310</link><pubDate>Fri, 17 Apr 2009 17:46:44 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9554310</guid><dc:creator>Mark Stokes</dc:creator><description>&lt;p&gt;Person fields are tough. &amp;nbsp;I am trying to work on this now.&lt;/p&gt;
&lt;p&gt;The difficult bit is that a person field contains many controls on the page, as shown below:&lt;/p&gt;
&lt;p&gt;&amp;lt;span dir=&amp;quot;none&amp;quot;&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;input name=&amp;quot;ctl00$m$g_1fc260be_de66_4e85_9a87_866e6694f4c8$ff18_1$ctl00$ctl00$HiddenUserFieldValue&amp;quot; type=&amp;quot;hidden&amp;quot; id=&amp;quot;ctl00_m_g_1fc260be_de66_4e85_9a87_866e6694f4c8_ff18_1_ctl00_ctl00_HiddenUserFieldValue&amp;quot; /&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;span id=&amp;quot;ctl00_m_g_1fc260be_de66_4e85_9a87_866e6694f4c8_ff18_1_ctl00_ctl00_UserField&amp;quot; class=&amp;quot;ms-usereditor&amp;quot; nomatchestext=&amp;quot;&amp;amp;lt;No Matching Names&amp;amp;gt;&amp;quot; moreitemstext=&amp;quot;More Names...&amp;quot; removetext=&amp;quot;Remove&amp;quot; value=&amp;quot;&amp;quot; allowempty=&amp;quot;1&amp;quot; showentitydisplaytextintextbox=&amp;quot;0&amp;quot; eeaftercallbackclientscript=&amp;quot;&amp;quot;&amp;gt;&lt;/p&gt;
&lt;p&gt;	&amp;lt;input name=&amp;quot;ctl00$m$g_1fc260be_de66_4e85_9a87_866e6694f4c8$ff18_1$ctl00$ctl00$UserField$hiddenSpanData&amp;quot; type=&amp;quot;hidden&amp;quot; id=&amp;quot;ctl00_m_g_1fc260be_de66_4e85_9a87_866e6694f4c8_ff18_1_ctl00_ctl00_UserField_hiddenSpanData&amp;quot; /&amp;gt;&lt;/p&gt;
&lt;p&gt;	&amp;lt;input name=&amp;quot;ctl00$m$g_1fc260be_de66_4e85_9a87_866e6694f4c8$ff18_1$ctl00$ctl00$UserField$OriginalEntities&amp;quot; type=&amp;quot;hidden&amp;quot; id=&amp;quot;ctl00_m_g_1fc260be_de66_4e85_9a87_866e6694f4c8_ff18_1_ctl00_ctl00_UserField_OriginalEntities&amp;quot; value=&amp;quot;&amp;amp;lt;Entities /&amp;amp;gt;&amp;quot; /&amp;gt;&lt;/p&gt;
&lt;p&gt;	&amp;lt;input name=&amp;quot;ctl00$m$g_1fc260be_de66_4e85_9a87_866e6694f4c8$ff18_1$ctl00$ctl00$UserField$HiddenEntityKey&amp;quot; type=&amp;quot;hidden&amp;quot; id=&amp;quot;ctl00_m_g_1fc260be_de66_4e85_9a87_866e6694f4c8_ff18_1_ctl00_ctl00_UserField_HiddenEntityKey&amp;quot; /&amp;gt;&lt;/p&gt;
&lt;p&gt;	&amp;lt;input name=&amp;quot;ctl00$m$g_1fc260be_de66_4e85_9a87_866e6694f4c8$ff18_1$ctl00$ctl00$UserField$HiddenEntityDisplayText&amp;quot; type=&amp;quot;hidden&amp;quot; id=&amp;quot;ctl00_m_g_1fc260be_de66_4e85_9a87_866e6694f4c8_ff18_1_ctl00_ctl00_UserField_HiddenEntityDisplayText&amp;quot; /&amp;gt;&lt;/p&gt;
&lt;p&gt;	&amp;lt;table id=&amp;quot;ctl00_m_g_1fc260be_de66_4e85_9a87_866e6694f4c8_ff18_1_ctl00_ctl00_UserField_OuterTable&amp;quot; class=&amp;quot;ms-usereditor&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot; style=&amp;quot;border-collapse: collapse;&amp;quot;&amp;gt;&lt;/p&gt;
&lt;p&gt;		&amp;lt;tr valign=&amp;quot;bottom&amp;quot;&amp;gt;&lt;/p&gt;
&lt;p&gt;			&amp;lt;td valign=&amp;quot;top&amp;quot; style=&amp;quot;width: 90%;&amp;quot;&amp;gt;&lt;/p&gt;
&lt;p&gt;				&amp;lt;table cellpadding=&amp;quot;0&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot; style=&amp;quot;width: 100%; table-layout: fixed;&amp;quot;&amp;gt;&lt;/p&gt;
&lt;p&gt;					&amp;lt;tr&amp;gt;&lt;/p&gt;
&lt;p&gt;						&amp;lt;td&amp;gt;&lt;/p&gt;
&lt;p&gt;							&amp;lt;div id=&amp;quot;ctl00_m_g_1fc260be_de66_4e85_9a87_866e6694f4c8_ff18_1_ctl00_ctl00_UserField_upLevelDiv&amp;quot; tabindex=&amp;quot;0&amp;quot; onfocusin=&amp;quot;this._fFocus=1;saveOldEntities('ctl00_m_g_1fc260be_de66_4e85_9a87_866e6694f4c8_ff18_1_ctl00_ctl00_UserField_upLevelDiv')&amp;quot; onclick=&amp;quot;onClickRw(true, true);&amp;quot; onchange=&amp;quot;updateControlValue('ctl00_m_g_1fc260be_de66_4e85_9a87_866e6694f4c8_ff18_1_ctl00_ctl00_UserField')&amp;quot; onfocusout=&amp;quot;this._fFocus=0;&amp;quot; onpaste=&amp;quot;dopaste();&amp;quot; autopostback=&amp;quot;0&amp;quot; class=&amp;quot;ms-inputuserfield&amp;quot; ondragstart=&amp;quot;canEvt(event);&amp;quot; onkeyup=&amp;quot;return onKeyUpRw('ctl00_m_g_1fc260be_de66_4e85_9a87_866e6694f4c8_ff18_1_ctl00_ctl00_UserField');&amp;quot; oncopy=&amp;quot;docopy();&amp;quot; onblur=&amp;quot;updateControlValue('ctl00_m_g_1fc260be_de66_4e85_9a87_866e6694f4c8_ff18_1_ctl00_ctl00_UserField')&amp;quot; title=&amp;quot;People Picker&amp;quot; onkeydown=&amp;quot;return onKeyDownRw(this, 'ctl00_m_g_1fc260be_de66_4e85_9a87_866e6694f4c8_ff18_1_ctl00_ctl00_UserField', 3, true, event);&amp;quot; contenteditable=&amp;quot;true&amp;quot; style=&amp;quot;width: 100%; word-wrap: break-work; overflow-x: hidden; background-color: window; color: windowtext;&amp;quot; name=&amp;quot;upLevelDiv&amp;quot;&amp;gt;&lt;/p&gt;
&lt;p&gt;							&amp;lt;/div&amp;gt;&lt;/p&gt;
&lt;p&gt;							&amp;lt;textarea name=&amp;quot;ctl00$m$g_1fc260be_de66_4e85_9a87_866e6694f4c8$ff18_1$ctl00$ctl00$UserField$downlevelTextBox&amp;quot; rows=&amp;quot;1&amp;quot; cols=&amp;quot;20&amp;quot; id=&amp;quot;ctl00_m_g_1fc260be_de66_4e85_9a87_866e6694f4c8_ff18_1_ctl00_ctl00_UserField_downlevelTextBox&amp;quot; class=&amp;quot;ms-input&amp;quot; onkeydown=&amp;quot;return onKeyDownRw(this, 'ctl00_m_g_1fc260be_de66_4e85_9a87_866e6694f4c8_ff18_1_ctl00_ctl00_UserField', 3, true, event);&amp;quot; onkeyup=&amp;quot;onKeyUpRw('ctl00_m_g_1fc260be_de66_4e85_9a87_866e6694f4c8_ff18_1_ctl00_ctl00_UserField');&amp;quot; title=&amp;quot;People Picker&amp;quot; autopostback=&amp;quot;0&amp;quot; style=&amp;quot;width: 100%; display: none; position: absolute;&amp;quot;&amp;gt;&amp;lt;/textarea&amp;gt;&lt;/p&gt;
&lt;p&gt;						&amp;lt;/td&amp;gt;&lt;/p&gt;
&lt;p&gt;					&amp;lt;/tr&amp;gt;&lt;/p&gt;
&lt;p&gt;				&amp;lt;/table&amp;gt;&lt;/p&gt;
&lt;p&gt;			&amp;lt;/td&amp;gt;&lt;/p&gt;
&lt;p&gt;			&amp;lt;td align=&amp;quot;right&amp;quot; valign=&amp;quot;top&amp;quot; nowrap=&amp;quot;true&amp;quot; style=&amp;quot;padding-left: 5px;&amp;quot;&amp;gt;&lt;/p&gt;
&lt;p&gt;				&amp;lt;a id=&amp;quot;ctl00_m_g_1fc260be_de66_4e85_9a87_866e6694f4c8_ff18_1_ctl00_ctl00_UserField_checkNames&amp;quot; title=&amp;quot;Check Names&amp;quot; onclick=&amp;quot;var arg=getUplevel('ctl00_m_g_1fc260be_de66_4e85_9a87_866e6694f4c8_ff18_1_ctl00_ctl00_UserField');var ctx='ctl00_m_g_1fc260be_de66_4e85_9a87_866e6694f4c8_ff18_1_ctl00_ctl00_UserField';EntityEditorSetWaitCursor(ctx);WebForm_DoCallback('ctl00$m$g_1fc260be_de66_4e85_9a87_866e6694f4c8$ff18_1$ctl00$ctl00$UserField',arg,EntityEditorHandleCheckNameResult,ctx,EntityEditorHandleCheckNameError,true);return false;&amp;quot; href=&amp;quot;javascript:&amp;quot;&amp;gt;&lt;/p&gt;
&lt;p&gt;					&amp;lt;img title=&amp;quot;Check Names&amp;quot; src=&amp;quot;&lt;a rel="nofollow" target="_new" href="http://usoakcwsps502:7001/_layouts/images/checknames.gif&amp;quot;"&gt;http://usoakcwsps502:7001/_layouts/images/checknames.gif&amp;quot;&lt;/a&gt; alt=&amp;quot;Check Names&amp;quot; style=&amp;quot;border-width: 0px;&amp;quot; /&amp;gt;&lt;/p&gt;
&lt;p&gt;				&amp;lt;/a&amp;gt;&lt;/p&gt;
&lt;p&gt;				&amp;lt;a id=&amp;quot;ctl00_m_g_1fc260be_de66_4e85_9a87_866e6694f4c8_ff18_1_ctl00_ctl00_UserField_browse&amp;quot; accesskey=&amp;quot;B&amp;quot; title=&amp;quot;Browse&amp;quot; onclick=&amp;quot;__Dialog__ctl00_m_g_1fc260be_de66_4e85_9a87_866e6694f4c8_ff18_1_ctl00_ctl00_UserField(); return false;&amp;quot; href=&amp;quot;javascript:&amp;quot;&amp;gt;&lt;/p&gt;
&lt;p&gt;					&amp;lt;img title=&amp;quot;Browse&amp;quot; src=&amp;quot;&lt;a rel="nofollow" target="_new" href="http://usoakcwsps502:7001/_layouts/images/addressbook.gif&amp;quot;"&gt;http://usoakcwsps502:7001/_layouts/images/addressbook.gif&amp;quot;&lt;/a&gt; alt=&amp;quot;Browse&amp;quot; style=&amp;quot;border-width: 0px;&amp;quot; /&amp;gt;&lt;/p&gt;
&lt;p&gt;				&amp;lt;/a&amp;gt;&lt;/p&gt;
&lt;p&gt;			&amp;lt;/td&amp;gt;&lt;/p&gt;
&lt;p&gt;		&amp;lt;/tr&amp;gt;&lt;/p&gt;
&lt;p&gt;		&amp;lt;tr&amp;gt;&lt;/p&gt;
&lt;p&gt;			&amp;lt;td colspan=&amp;quot;3&amp;quot;&amp;gt;&lt;/p&gt;
&lt;p&gt;				&amp;lt;span id=&amp;quot;ctl00_m_g_1fc260be_de66_4e85_9a87_866e6694f4c8_ff18_1_ctl00_ctl00_UserField_errorLabel&amp;quot; class=&amp;quot;ms-error&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;/p&gt;
&lt;p&gt;			&amp;lt;/td&amp;gt;&lt;/p&gt;
&lt;p&gt;		&amp;lt;/tr&amp;gt;&lt;/p&gt;
&lt;p&gt;	&amp;lt;/table&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;/span&amp;gt;&lt;/p&gt;
&lt;p&gt;So getting into the right bit is prooving tricky. &amp;nbsp;I haven't got a solution yet, but am working on it. &amp;nbsp;I'll post back here if I get anything working.&lt;/p&gt;
&lt;p&gt;Mark&lt;/p&gt;</description></item><item><title>re: Using Javascript to Manipulate a List Form Field</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#9603204</link><pubDate>Mon, 11 May 2009 18:27:27 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9603204</guid><dc:creator>Socki</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;Your post are interesting but I have a problem.&lt;/p&gt;
&lt;p&gt;I have a sharepoint custom form and javascript don't execute.&lt;/p&gt;
&lt;p&gt;Have you any idea to help me?&lt;/p&gt;
&lt;p&gt;Excuse me for the english but I am french.&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
&lt;p&gt;Socki &lt;/p&gt;</description></item><item><title>re: Using Javascript to Manipulate a List Form Field</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#9615460</link><pubDate>Thu, 14 May 2009 12:33:30 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9615460</guid><dc:creator>Getto</dc:creator><description>&lt;p&gt;*Lookups are a bit more complicated because Lookup FormFields render differently when the target list contains more than 20 items. See the end of the post for an example. &lt;/p&gt;
&lt;p&gt;Why is that - what is the reson for this? &lt;/p&gt;</description></item><item><title>re: Using Javascript to Manipulate a List Form Field</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#9723632</link><pubDate>Wed, 10 Jun 2009 11:09:41 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9723632</guid><dc:creator>Frank_W</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I have tried to add some script code to my SharePoint site (NewForm.aspx and EditForm.aspx ) but it is not working. I simply added the following code near the bottom of the script directly above the &amp;lt;/body&amp;gt; tag:&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;&amp;lt;script&amp;gt;&lt;/p&gt;
&lt;p&gt;	_spBodyOnLoadFunctionNames (&amp;quot;Bob&amp;quot;);&lt;/p&gt;
&lt;p&gt;	function Bob() &lt;/p&gt;
&lt;p&gt;	{&lt;/p&gt;
&lt;p&gt;	alert('Hello World')&lt;/p&gt;
&lt;p&gt;	};&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;&amp;lt;/script&amp;gt;&lt;/p&gt;
&lt;p&gt;When opening the two pages nothing happens. Normaly I expected to see a message box.&lt;/p&gt;
&lt;p&gt;Does anybody has an idea why the script is not working?&lt;/p&gt;
&lt;p&gt;Frank&lt;/p&gt;
</description></item><item><title>re: Using Javascript to Manipulate a List Form Field</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#9735228</link><pubDate>Fri, 12 Jun 2009 17:58:34 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9735228</guid><dc:creator>Bill Koontz</dc:creator><description>&lt;p&gt;This is NOT working for me!!! I don't know why, but after pasting the code into my &amp;quot;NewForm.aspx&amp;quot; and testing it in a browser, I notice that regardless of what I put in my querystring I only get the first item from my list in the dropdown. &amp;nbsp;If I leave the querystring off completely the dropdown is empty, so I'm confident the script is running and attempting to set the dropdown, but for some odd reason, its setting it to the first drop down value no matter what I put in the query string.&lt;/p&gt;
&lt;p&gt;Any ideas why that would happen ?!?!?!?&lt;/p&gt;</description></item><item><title>Insert a CustomValidator in a SharePoint Form (New/Edit)</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#9750634</link><pubDate>Sun, 14 Jun 2009 16:49:47 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9750634</guid><dc:creator>Notes For .NET</dc:creator><description>&lt;p&gt;Insert a CustomValidator in a SharePoint Form (New/Edit)&lt;/p&gt;
</description></item><item><title>re: Using Javascript to Manipulate a List Form Field</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#9809337</link><pubDate>Tue, 30 Jun 2009 09:50:05 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9809337</guid><dc:creator>Andrea</dc:creator><description>&lt;p&gt;I wonder if there is a method to retrieve the data in the lookup when it has more than 20 items. The &amp;quot;ShowDropdown&amp;quot; function fails, I really don't know why. Can someone help me? It is really important!&lt;/p&gt;</description></item><item><title>re: Using Javascript to Manipulate a List Form Field</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#9813710</link><pubDate>Thu, 02 Jul 2009 13:31:41 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9813710</guid><dc:creator>gitz</dc:creator><description>&lt;p&gt;Great Post!&lt;/p&gt;
&lt;p&gt;Anyone can tell me how can i get lookup (mutliple) values depending on which one is clicked ? &lt;/p&gt;
&lt;p&gt;Always returns me NULL with &amp;nbsp;getTagFromIdentifierAndTitle &lt;/p&gt;</description></item><item><title>re: Using Javascript to Manipulate a List Form Field</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#9818162</link><pubDate>Mon, 06 Jul 2009 00:37:11 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9818162</guid><dc:creator>Jeff</dc:creator><description>&lt;p&gt;I've just spent days building out a similar set of functions to prefill form elements, hide &amp;quot;columns&amp;quot;, convert other editable fields to read-only, etc. only to discover that when viewing sharepoint pages with Internet Explorer some of the dropdown fields are rendered as some sort of highly modified input field instead of a standard select element (while other dropdown fields use the select element - bizarre!). Where have the select elements gone?!&lt;/p&gt;
&lt;p&gt;In an input-element-dropdown field how do you add, remove or sort &amp;quot;options&amp;quot;? How do you determine which &amp;quot;option&amp;quot; is selected? How do you programatically select an &amp;quot;option&amp;quot;. &lt;/p&gt;
&lt;p&gt;What a nightmare!&lt;/p&gt;</description></item><item><title>re: Using Javascript to Manipulate a List Form Field</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#9822183</link><pubDate>Tue, 07 Jul 2009 13:21:47 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9822183</guid><dc:creator>Andrea</dc:creator><description>&lt;p&gt;Great Rob!&lt;/p&gt;
&lt;p&gt;I managed to take control of a single lookup with less than 20 items and of a multiple lookup; still, the simple lookup with more than 20 items fails on &amp;quot;ShowDropdown&amp;quot; function! I really don't understand why... could someone help me? It is really important! I have the ID of the lookup (that is an input, correct); if I query the value of this Lookup it is undefined. I can't access objects inside the lookup when they have more than 20 items.&lt;/p&gt;
&lt;p&gt;For Frank W: Try to put the ;(semicolon) after alert('Hello World'); instead of putting it after the bracket!&lt;/p&gt;</description></item><item><title>re: Using Javascript to Manipulate a List Form Field</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#9823918</link><pubDate>Wed, 08 Jul 2009 16:31:14 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9823918</guid><dc:creator>Andrea</dc:creator><description>&lt;p&gt;OK, I'0ve got this snippet nearly working:	&lt;/p&gt;
&lt;p&gt;Select1ID = &amp;quot;ctl00_m_g_154f7ce6_a92a_47a7_aefd_7f52043cc1a0_ctl00_ctl04_ctl01_ctl00_ctl00_ctl04_ctl00_ctl01&amp;quot;;&lt;/p&gt;
&lt;p&gt;Lookup1 = document.getElementById(Select1ID);&lt;/p&gt;
&lt;p&gt;ShowDropdown(Lookup1.id);&lt;/p&gt;
&lt;p&gt;opt1 = document.getElementById(Lookup1.opt);&lt;/p&gt;
&lt;p&gt;OptLoseFocus(opt1); &lt;/p&gt;
&lt;p&gt;var o = opt1[1]; //or whatever...&lt;/p&gt;
&lt;p&gt;opt1.add(o); //this fails!!!!!!!!!!!!!!!!!!!&lt;/p&gt;
&lt;p&gt;Does someone knows why the add function fails?&lt;/p&gt;
&lt;p&gt;I've discovered this code won't work if you don't use _spBodyOnLoadFunctionNames.push(the function with this code inside).&lt;/p&gt;</description></item><item><title>re: Using Javascript to Manipulate a List Form Field</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#9828663</link><pubDate>Fri, 10 Jul 2009 15:31:39 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9828663</guid><dc:creator>Johnny</dc:creator><description>&lt;p&gt;Referring to the original post, please can someone explain to me like i'm a 10 year old how to get this script to work???&lt;/p&gt;
&lt;p&gt;I'm assuming its a CEWP in the newform.aspx. What is the &amp;lt;&amp;lt;FIELD DISPLAY NAME&amp;gt;&amp;gt; supposed to be and what is the &amp;lt;&amp;lt;QUERYSTRING VARIABLE NAME&amp;gt;&amp;gt;? Is one a column name and the other an entry in the column?&lt;/p&gt;
&lt;p&gt;What does this function do exactly? I don't quite understand this: &amp;quot;This Javascript parses the page’s query string, locates the HTML objects that are rendered by the relevant SharePoint fields, and sets their value based on the information in the query string. &amp;quot;&lt;/p&gt;
&lt;p&gt;Sorry but I am completely lost and judging by the responses, this is something not to be missed!&lt;/p&gt;</description></item><item><title>re: Using Javascript to Manipulate a List Form Field</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#9852118</link><pubDate>Wed, 29 Jul 2009 16:57:39 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9852118</guid><dc:creator>Mary Kay Scott</dc:creator><description>&lt;p&gt;Javascript is not executing for me as well. &amp;nbsp;&lt;/p&gt;
&lt;p&gt;It's very odd, because all the javascript in the master page executes just fine -- it's only javascript that is added to individual pages. &lt;/p&gt;
&lt;p&gt;I've tried this script (and a &amp;quot;hello&amp;quot; alert) in both the PlaceHolderMain and the PlaceHolderAdditionalPageHead, with no difference.&lt;/p&gt;
&lt;p&gt;Has anyone who has experienced this problem found a way to get it to work? &amp;nbsp;If so, please reply..... &lt;/p&gt;</description></item><item><title>re: Using Javascript to Manipulate a List Form Field</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#9852946</link><pubDate>Thu, 30 Jul 2009 08:22:21 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9852946</guid><dc:creator>Rahul</dc:creator><description>&lt;p&gt;Hi Rob,&lt;/p&gt;
&lt;p&gt;I am working on a sharepoint intranet portal, Initially on the master page of the portal it was the simple search option but i want advance search so i changed the search option from simple to advance but litrally i am facing one error when i open my site it shows an error that is error on the page &amp;amp; when i click on the error the description is &amp;nbsp;&amp;quot;document.getElementByID(...) is null or not an object&amp;quot; on the left bottom side of my page.&lt;/p&gt;
&lt;p&gt;My advance search code is belllow:&lt;/p&gt;
&lt;p&gt;&amp;lt;DIV id=&amp;quot;SearchArea&amp;quot;&amp;gt;&amp;lt;TABLE cellSpacing=&amp;quot;0&amp;quot; cellPadding=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot; border=&amp;quot;0&amp;quot; TOPLEVEL=&amp;quot;&amp;quot;&amp;gt;&amp;lt;TBODY&amp;gt;&amp;lt;TR&amp;gt;&amp;lt;TD vAlign=&amp;quot;top&amp;quot;&amp;gt;&amp;lt;DIV id=&amp;quot;WebPartWPQ1&amp;quot; allowDelete=&amp;quot;false&amp;quot; width=&amp;quot;100%&amp;quot; HasPers=&amp;quot;true&amp;quot; WebPartID=&amp;quot;00000000-0000-0000-0000-000000000000&amp;quot; OnlyForMePart=&amp;quot;true&amp;quot;&amp;gt;&amp;lt;DIV id=&amp;quot;SRSB&amp;quot;&amp;gt;&amp;lt;DIV&amp;gt;&amp;lt;INPUT id=&amp;quot;ctl00_PlaceHolderSearchArea_ctl01_ctl00&amp;quot; type=&amp;quot;hidden&amp;quot; name=&amp;quot;ctl00$PlaceHolderSearchArea$ctl01$ctl00&amp;quot; value=&amp;quot;&lt;a rel="nofollow" target="_new" href="http://devsrv:5555/SME&amp;quot;"&gt;http://devsrv:5555/SME&amp;quot;&lt;/a&gt; /&amp;gt;&amp;lt;TABLE class=&amp;quot;ms-sbtable ms-sbtable-ex&amp;quot; border=&amp;quot;0&amp;quot;&amp;gt;&amp;lt;TBODY&amp;gt;&amp;lt;TR class=&amp;quot;ms-sbrow&amp;quot;&amp;gt;&amp;lt;TD class=&amp;quot;ms-sbscopes ms-sbcell&amp;quot;&amp;gt;&amp;lt;SELECT class=&amp;quot;ms-sbscopes&amp;quot; id=&amp;quot;ctl00_PlaceHolderSearchArea_ctl01_SBScopesDDL&amp;quot; title=&amp;quot;Search Scope&amp;quot; name=&amp;quot;ctl00$PlaceHolderSearchArea$ctl01$SBScopesDDL&amp;quot;&amp;gt; &amp;lt;OPTION value=&amp;quot;This Site&amp;quot;&amp;gt;This Site: SME&amp;lt;/OPTION&amp;gt; &amp;lt;OPTION value=&amp;quot;&amp;quot;&amp;gt;All Sites&amp;lt;/OPTION&amp;gt; &amp;lt;OPTION value=&amp;quot;/searchcenter/Pages/peopleresults.aspx&amp;quot;&amp;gt;People&amp;lt;/OPTION&amp;gt;&amp;lt;/SELECT&amp;gt;&amp;lt;/TD&amp;gt;&amp;lt;TD class=&amp;quot;ms-sbcell&amp;quot;&amp;gt;&amp;lt;INPUT class=&amp;quot;ms-sbplain&amp;quot; onkeypress=&amp;quot;javascript:return S6AE27B38_OSBEK(event);&amp;quot; id=&amp;quot;ctl00_PlaceHolderSearchArea_ctl01_S6AE27B38_InputKeywords&amp;quot; title=&amp;quot;Enter search words&amp;quot; style=&amp;quot;WIDTH: 170px&amp;quot; accessKey=&amp;quot;S&amp;quot; alt=&amp;quot;Enter search words&amp;quot; maxLength=&amp;quot;200&amp;quot; name=&amp;quot;InputKeywords&amp;quot; value=&amp;quot;&amp;quot; /&amp;gt;&amp;lt;/TD&amp;gt;&amp;lt;TD class=&amp;quot;ms-sbgo ms-sbcell&amp;quot;&amp;gt;&amp;lt;A id=&amp;quot;ctl00_PlaceHolderSearchArea_ctl01_S6AE27B38_go&amp;quot; title=&amp;quot;Go Search&amp;quot; href=&amp;quot;javascript:S6AE27B38_Submit()&amp;quot;&amp;gt;&amp;lt;IMG onmouseover=&amp;quot;this.src='/_layouts/images/gosearch.gif'&amp;quot; title=&amp;quot;Go Search&amp;quot; style=&amp;quot;BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px&amp;quot; onmouseout=&amp;quot;this.src='/_layouts/images/gosearch.gif'&amp;quot; alt=&amp;quot;Go Search&amp;quot; src=&amp;quot;&lt;a rel="nofollow" target="_new" href="http://onicra-pcs1:1985/_layouts/images/gosearch.gif&amp;quot;"&gt;http://onicra-pcs1:1985/_layouts/images/gosearch.gif&amp;quot;&lt;/a&gt; /&amp;gt;&amp;lt;/A&amp;gt;&amp;lt;/TD&amp;gt;&amp;lt;TD class=&amp;quot;ms-sbcell ms-sblink&amp;quot;&amp;gt;&amp;lt;A id=&amp;quot;ctl00_PlaceHolderSearchArea_ctl01_S6AE27B38_AdvSearchLink&amp;quot; title=&amp;quot;Advanced Search&amp;quot; href=&amp;quot;/searchcenter/Pages/Advanced.aspx&amp;quot;&amp;gt;Advanced Search&amp;lt;/A&amp;gt;&amp;lt;/TD&amp;gt;&amp;lt;TD class=&amp;quot;ms-sbLastcell&amp;quot;&amp;gt;&amp;lt;/TD&amp;gt;&amp;lt;/TR&amp;gt;&amp;lt;/TBODY&amp;gt;&amp;lt;/TABLE&amp;gt;&amp;lt;/DIV&amp;gt;&amp;lt;/DIV&amp;gt;&amp;lt;/DIV&amp;gt;&amp;lt;/TD&amp;gt;&amp;lt;/TR&amp;gt;&amp;lt;/TBODY&amp;gt;&amp;lt;/TABLE&amp;gt;&amp;lt;/DIV&amp;gt;&lt;/p&gt;
&lt;p&gt;Please help me to sort out this problem.&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
&lt;p&gt;Rahul&lt;/p&gt;</description></item><item><title>re: Using Javascript to Manipulate a List Form Field</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#9863832</link><pubDate>Tue, 11 Aug 2009 07:27:48 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9863832</guid><dc:creator>Sam</dc:creator><description>&lt;p&gt;Hi all,&lt;/p&gt;
&lt;p&gt;I am trying to 'grab' the values from a newform.aspx (customized) using Javascript in order to calculate a total for an expense form. &amp;nbsp;I have an expense field, a miles field, a mileage rate field (prepopulated with the default federal standard .550 and ControlMode = &amp;quot;display&amp;quot; so the user cannot accidentally edit the rate. &amp;nbsp;I have &amp;quot;hidden&amp;quot; this field by enclosing it with a span tag and setting the color to &amp;quot;white&amp;quot; via style. &amp;nbsp;All fields are given default values. &amp;nbsp;The idea I am going for is that onload, the script executes, gets the values from the appropriate fields, calculates total = mileagerate*miles + expense and prints the total amount at the bottom of the table. &amp;nbsp;Additionally, I would like to set the &amp;quot;miles&amp;quot; and &amp;quot;expense&amp;quot; fields to trigger the same function onchange.&lt;/p&gt;
&lt;p&gt;My problem is that I am grabbing something, but what i am storing in my variables is not the text or value that the control contains but (I assume) the object ID. &amp;nbsp;I think this because when I test by printing to screen via document.write([a variable]) I end up with a td cell containing [object]. &amp;nbsp;I am very new to Javascript, everythin I've figured out is from the past two days, some experience with programming. &amp;nbsp;My script is below, all of which is located immediately the placeholdermain ID.&lt;/p&gt;
&lt;p&gt;&amp;lt;script type=&amp;quot;text/javascript&amp;quot; src=&amp;quot;../../_JS/SPAPI_Core.js&amp;quot; &amp;gt; &amp;lt;/script&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;script type=&amp;quot;text/javascript&amp;quot; src=&amp;quot;../../_JS/SPAPI_Lists.js&amp;quot; &amp;gt; &amp;lt;/script&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;script src=&amp;quot;../../_JS/jquery.min.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;script src=&amp;quot;../../_JS/jquery-ui.min.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;gt; &lt;/p&gt;
&lt;p&gt;_spBodyOnLoadFunctionNames.push(&amp;quot;TotalMyStuff&amp;quot;);&lt;/p&gt;
&lt;p&gt;function TotalMyStuff(){&lt;/p&gt;
&lt;p&gt;getField('text','ExpenseAmount').onchange = function() {totalAmount()};&lt;/p&gt;
&lt;p&gt;getField('input','Miles').onchange = function() {totalAmount()};&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;function getField(fieldType,fieldTitle) &lt;/p&gt;
&lt;p&gt;{ &lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;var docTags = document.getElementsByTagName(fieldType); &lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;for (var i=0; i &amp;lt; docTags.elements.	length; i++) { &lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (docTags[i].title == fieldTitle) { &lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return docTags[i] &lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;} &lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;} &lt;/p&gt;
&lt;p&gt;} &lt;/p&gt;
&lt;p&gt;function totalAmount()&lt;/p&gt;
&lt;p&gt;	 { &lt;/p&gt;
&lt;p&gt;var expense = getField('text','ExpenseAmount');&lt;/p&gt;
&lt;p&gt;var miles = getField('input','Miles');&lt;/p&gt;
&lt;p&gt;var mileage = document.getElementById('MileageRate');&lt;/p&gt;
&lt;p&gt;totalAmount = miles*mileage + expense;&lt;/p&gt;
&lt;p&gt;document.write(totalAmount);&lt;/p&gt;
&lt;p&gt;} &lt;/p&gt;
&lt;p&gt;getField('text','ExpenseAmount').onchange = function() {totalAmount()};&lt;/p&gt;
&lt;p&gt;getField('text','Miles').onchange = function() {totalAmount()};&lt;/p&gt;
&lt;p&gt;&amp;lt;/script&amp;gt;&lt;/p&gt;
&lt;p&gt;Your help is greatly appreciated.&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Sam&lt;/p&gt;</description></item><item><title>re: Using Javascript to Manipulate a List Form Field</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#9867279</link><pubDate>Thu, 13 Aug 2009 01:13:53 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9867279</guid><dc:creator>Sam</dc:creator><description>&lt;p&gt;I figured it out. &amp;nbsp;script is below in case it helps anyone (for internal server T&amp;amp;E tracking)&lt;/p&gt;
&lt;p&gt;&amp;lt;script type=&amp;quot;text/javascript&amp;quot; src=&amp;quot;../../_JS/SPAPI_Core.js&amp;quot; &amp;gt; &amp;lt;/script&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;script type=&amp;quot;text/javascript&amp;quot; src=&amp;quot;../../_JS/SPAPI_Lists.js&amp;quot; &amp;gt; &amp;lt;/script&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;script src=&amp;quot;../../_JS/jquery.min.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;script src=&amp;quot;../../_JS/jquery-ui.min.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;gt; &lt;/p&gt;
&lt;p&gt;_spBodyOnLoadFunctionNames.push(&amp;quot;TotalMyStuff&amp;quot;);&lt;/p&gt;
&lt;p&gt;function TotalMyStuff() {&lt;/p&gt;
&lt;p&gt;getField('input','ExpenseAmount').onchange = function() {totalAmount()};&lt;/p&gt;
&lt;p&gt;getField('input','Miles').onchange = function() {totalAmount()};&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;function getField(fieldType,fieldTitle) { &lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;var docTags = document.getElementsByTagName(fieldType); &lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;for (var i=0; i &amp;lt; docTags.length; i++) { &lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (docTags[i].title == fieldTitle) { &lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return docTags[i] &lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;} &lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;} &lt;/p&gt;
&lt;p&gt;} &lt;/p&gt;
&lt;p&gt;function toNumber(notNumber) &lt;/p&gt;
&lt;p&gt;{&lt;/p&gt;
&lt;p&gt;var newNumber = &amp;quot;&amp;quot;;&lt;/p&gt;
&lt;p&gt;	if (isNaN(notNumber)) &lt;/p&gt;
&lt;p&gt;	{&lt;/p&gt;
&lt;p&gt;		for (var i=0; i &amp;lt; notNumber.length; i++)&lt;/p&gt;
&lt;p&gt;		{&lt;/p&gt;
&lt;p&gt;			if (isNaN(Number(notNumber.charAt(i))) &amp;amp;&amp;amp; notNumber.charAt(i) != &amp;quot;.&amp;quot;) &lt;/p&gt;
&lt;p&gt;			{&lt;/p&gt;
&lt;p&gt;				newNumber = &amp;nbsp;newNumber + &amp;quot;&amp;quot;;&lt;/p&gt;
&lt;p&gt;			}&lt;/p&gt;
&lt;p&gt;			else &lt;/p&gt;
&lt;p&gt;			{&lt;/p&gt;
&lt;p&gt;				newNumber = newNumber + notNumber.charAt(i);&lt;/p&gt;
&lt;p&gt;			}&lt;/p&gt;
&lt;p&gt;		}&lt;/p&gt;
&lt;p&gt;	}&lt;/p&gt;
&lt;p&gt;newNumber = Number(newNumber);&lt;/p&gt;
&lt;p&gt;return newNumber;&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;function totalAmount()	 { &lt;/p&gt;
&lt;p&gt;var expense = getField('input','ExpenseAmount').value;&lt;/p&gt;
&lt;p&gt;var miles = getField('input','Miles').value;&lt;/p&gt;
&lt;p&gt;var mileage = document.getElementById('MileageRate').innerHTML;&lt;/p&gt;
&lt;p&gt;expense = Number(expense);&lt;/p&gt;
&lt;p&gt;miles = Number(miles);&lt;/p&gt;
&lt;p&gt;mileage = toNumber(mileage);&lt;/p&gt;
&lt;p&gt;calcAmount = expense + (miles*mileage);&lt;/p&gt;
&lt;p&gt;document.getElementById('totalexp').innerHTML = calcAmount.toPrecision(4);&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;getField('input','ExpenseAmount').onchange = function() {totalAmount()};&lt;/p&gt;
&lt;p&gt;getField('input','Miles').onchange = function() {totalAmount()};&lt;/p&gt;
&lt;p&gt;&amp;lt;/script&amp;gt;&lt;/p&gt;</description></item><item><title>re: Using Javascript to Manipulate a List Form Field</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#9872608</link><pubDate>Mon, 17 Aug 2009 21:19:37 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9872608</guid><dc:creator>Adam</dc:creator><description>&lt;p&gt;I've spent a while now trying to get this to work now, and have found that setSelectedOption() is not working cause it's trying to match a title string which appears in the lookup field to the corresponding item ID...&lt;/p&gt;
&lt;p&gt;Is there something that can be simply changed in the script rather than having to change all the calling pages?&lt;/p&gt;</description></item><item><title>re: Using Javascript to Manipulate a List Form Field</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#9872671</link><pubDate>Mon, 17 Aug 2009 21:51:16 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9872671</guid><dc:creator>Adam</dc:creator><description>&lt;p&gt;In case anyone had the same issue as me, whereby the passed value is the lookup value rather than it's ID, just change the test inside setSelectedOption()'s loop from opts[i].value to opts[i].text, so it should look like blow afterwards. &lt;/p&gt;
&lt;p&gt;if (opts[i].text == value)&lt;/p&gt;
&lt;p&gt;The rest of your solution works like a charm OP.&lt;/p&gt;</description></item><item><title>re: Using Javascript to Manipulate a List Form Field</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#9888383</link><pubDate>Fri, 28 Aug 2009 16:31:57 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9888383</guid><dc:creator>Jason G</dc:creator><description>&lt;p&gt;Great post, i did have a tricky issue in the setSelectedOption function. I had to change:&lt;/p&gt;
&lt;p&gt; if (opts[i].value== value) {&lt;/p&gt;
&lt;p&gt;to &lt;/p&gt;
&lt;p&gt; if (opts[i].text == value) {&lt;/p&gt;
&lt;p&gt;The values stored in my lookup field were just integers, but i was passing the display name in the query string. Once i changed it to match on text it worked great. Thx!&lt;/p&gt;</description></item><item><title>re: Using Javascript to Manipulate a List Form Field</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#9895408</link><pubDate>Tue, 15 Sep 2009 17:41:32 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9895408</guid><dc:creator>Martin Hipfinger</dc:creator><description>&lt;p&gt;hi,&lt;/p&gt;
&lt;p&gt;i've a problem with special characters, for instance german oder polish ones - they are not pasted correctly into the fields. how can i solve this? any help would be nice, thx!&lt;/p&gt;
&lt;p&gt;martin&lt;/p&gt;</description></item><item><title>re: Using Javascript to Manipulate a List Form Field</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#9897701</link><pubDate>Mon, 21 Sep 2009 22:16:23 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9897701</guid><dc:creator>Mark N</dc:creator><description>&lt;p&gt;Same issue as Frank W and Mary Kay Scott: &amp;nbsp;javascript doesn't execute regardless of where it is placed on content page (NewForm.aspx for me). &amp;nbsp;Anyone have an idea?&lt;/p&gt;</description></item><item><title>re: Using Javascript to Manipulate a List Form Field</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#9906379</link><pubDate>Tue, 13 Oct 2009 01:27:30 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9906379</guid><dc:creator>Tom</dc:creator><description>&lt;p&gt;Has anyone run into the situation where when re-populating a choice field drop down, this generates an error when the user hits ok to save the data? &amp;nbsp;I believe it is because my choice drop down starts with only one option in it (&amp;lt;&amp;lt;Select&amp;gt;&amp;gt;). &amp;nbsp;I then populate it with several pieces of data using:&lt;/p&gt;
&lt;p&gt;function SetOptions(select, value) &lt;/p&gt;
&lt;p&gt;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;var opts = select.options;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;opts.length=value.length+1;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;var l = opts.length;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; if (select == null) return;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; for (var i=1; i &amp;lt; l; i++) &lt;/p&gt;
&lt;p&gt; &amp;nbsp; {&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;opts[i].innerText=value[i-1];&lt;/p&gt;
&lt;p&gt; &amp;nbsp; }&lt;/p&gt;
&lt;p&gt; &amp;nbsp; return false;&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;select is the drop down and value is the array of values to populate the control with. &amp;nbsp;If I select the first option in the array, my form will save using the &amp;lt;&amp;lt;Select&amp;gt;&amp;gt; value. &amp;nbsp;Any ideas on how to get it to accept my new array of values?&lt;/p&gt;</description></item><item><title>re: Using Javascript to Manipulate a List Form Field</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#9907672</link><pubDate>Thu, 15 Oct 2009 14:02:22 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9907672</guid><dc:creator>Mauricio</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;i'm having a problem to hide a control on DisplayForm, couse it becomes a &amp;lt;a&amp;gt;&amp;lt;/a&amp;gt; tag.&lt;/p&gt;
&lt;p&gt;How can i find the control on displayform?&lt;/p&gt;
&lt;p&gt;thanks...&lt;/p&gt;</description></item><item><title>re: Using Javascript to Manipulate a List Form Field</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#9909796</link><pubDate>Tue, 20 Oct 2009 10:06:19 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9909796</guid><dc:creator>James</dc:creator><description>&lt;p&gt;Hello -&lt;/p&gt;
&lt;p&gt;I simply just want to be able to set the values of fields in my list upon page load. &amp;nbsp;How would I do that?&lt;/p&gt;
&lt;p&gt;I tried to use the example Belchski posted:&lt;/p&gt;
&lt;p&gt;function setTextFromFieldName(fieldName, value) {&lt;/p&gt;
&lt;p&gt; if (value == undefined) return;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; var theInput = getTagFromIdentifierAndTitle(&amp;quot;input&amp;quot;,&amp;quot;&amp;quot;,fieldName);&lt;/p&gt;
&lt;p&gt;theInput.value=value&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;but i'm not quite sure how this works.&lt;/p&gt;
&lt;p&gt;So for example&lt;/p&gt;
&lt;p&gt;I have one field in my list, which is Title, which is a textfield.&lt;/p&gt;
&lt;p&gt;On pageload, &amp;nbsp;how can I populate the title with a value?&lt;/p&gt;
&lt;p&gt;Any help on this would be of much help.&lt;/p&gt;
&lt;p&gt;Thank you&lt;/p&gt;</description></item><item><title>re: Using Javascript to Manipulate a List Form Field</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#9913029</link><pubDate>Mon, 26 Oct 2009 16:46:38 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9913029</guid><dc:creator>vj</dc:creator><description>&lt;p&gt;Hi all&lt;/p&gt;
&lt;p&gt;I am supposed to populate a sharepoint form created by ANOTHER team (so I have no developer/admin access to make any code changes) &lt;/p&gt;
&lt;p&gt;When I populate this form, it has many fields which have fixed values &lt;/p&gt;
&lt;p&gt;I am looking for a way to automate filling these fields, and leaving just the other fields unpopulated. As you can see, I cannot use any code/designer method that involves THAT team having to make code changes (although that woldbe the cleanest and most efficient method - but that's corp culture for you)&lt;/p&gt;
&lt;p&gt;Maybe a VBA script/macro..is there a way? &lt;/p&gt;
&lt;p&gt;FYI - its a custom list form, and has text boxes, lists and radio buttons&lt;/p&gt;
&lt;p&gt;Regards &lt;/p&gt;
&lt;p&gt;VJ&lt;/p&gt;</description></item><item><title>re: Using Javascript to Manipulate a List Form Field</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#9917114</link><pubDate>Wed, 04 Nov 2009 03:27:29 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9917114</guid><dc:creator>willhlaw</dc:creator><description>&lt;p&gt;VJ and all,&lt;/p&gt;
&lt;p&gt;If you are able to add a content editor webpart or script to the page, than you can use the solution that one of the jPoint developers has created. &amp;nbsp;It is called PopulateFromQueryString and an example is here, &amp;nbsp; &lt;a rel="nofollow" target="_new" href="http://www.sharejpoint.com/examples/Lists/PopulateFromQuerystring/NewForm.aspx?Title=hello%20world&amp;amp;Choice=Choice"&gt;http://www.sharejpoint.com/examples/Lists/PopulateFromQuerystring/NewForm.aspx?Title=hello%20world&amp;amp;Choice=Choice&lt;/a&gt; 2&amp;amp;Number=123&amp;amp;Person=demouser&amp;amp;YesNo=0. &amp;nbsp;It has been tested in IE 6+, FF 3+, and Chrome, as well as on custom pages with the list form web part.&lt;/p&gt;
&lt;p&gt;Here is the code that you can cut and paste onto your own site, but it is recommended to download the jPoint.zip file at &lt;a rel="nofollow" target="_new" href="http://jPoint.codeplex.com"&gt;http://jPoint.codeplex.com&lt;/a&gt; and put the files into a document library. &amp;nbsp;For the field names in the URL parameter, remove whitespace and special characters. &amp;nbsp;Just the field names; the values can have spaces and such. (i.e. ?AssignedTo=The Team!)&lt;/p&gt;
&lt;p&gt;&amp;lt;script type=&amp;quot;text/javascript&amp;quot; src=&amp;quot;//sharejpoint.googlecode.com/files/jPointLoader-0.6-expanded.js&amp;quot; &amp;gt;&amp;lt;/script&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;script&amp;gt;&lt;/p&gt;
&lt;p&gt;$(document).ready(function() {	&lt;/p&gt;
&lt;p&gt;		jP.Form.readForm();		&lt;/p&gt;
&lt;p&gt;		$.each(jP.Form.Items, function (idx, item) {&lt;/p&gt;
&lt;p&gt;			if(querySt(item.Name) != null &amp;amp;&amp;amp; querySt(item.Name) != &amp;quot;undefined&amp;quot;)&lt;/p&gt;
&lt;p&gt;				jP.Form[item.Name].val(unescape(querySt(item.Name)));&lt;/p&gt;
&lt;p&gt;		});&lt;/p&gt;
&lt;p&gt;});&lt;/p&gt;
&lt;p&gt;//Gets value of querystring key&lt;/p&gt;
&lt;p&gt;function querySt(ji)&lt;/p&gt;
&lt;p&gt;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; hu = window.location.search.substring(1);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; gy = hu.split(&amp;quot;&amp;amp;&amp;quot;);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; for (i=0;i&amp;lt;gy.length;i++)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ft = gy[i].split(&amp;quot;=&amp;quot;);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (ft[0].toUpperCase() == ji.toUpperCase()) //Fixed query so it is case insensitive&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return ft[1];&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;&amp;lt;/script&amp;gt;&lt;/p&gt;</description></item><item><title>re: Using Javascript to Manipulate a List Form Field</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#9928865</link><pubDate>Wed, 25 Nov 2009 23:22:51 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9928865</guid><dc:creator>ashiena</dc:creator><description>&lt;p&gt;Hye everyone,&lt;/p&gt;
&lt;p&gt;in my NewForm.aspx I have two field 'Title' and 'Application List'&lt;/p&gt;
&lt;p&gt;Display name is what we can see in the form? Is yes than its : 'Application List'&lt;/p&gt;
&lt;p&gt;And my querysting : /%2FPinjaman%2FAllItems%2Easpx%3FFilterField1%3DApplication%255Fx0020%255FList%26FilterValue1%3Dtest&lt;/p&gt;
&lt;p&gt;which I would like to set my dropdownlist default value to my filtervalue1 = test&lt;/p&gt;
&lt;p&gt;and I set in CEWP in javascript and chnage the following:&lt;/p&gt;
&lt;p&gt;1. setLookupFromFieldName(&amp;quot;Application List&amp;quot;, vals[&amp;quot;FilterValue1&amp;quot;]);&lt;/p&gt;
&lt;p&gt;2. from someone comment, I change the comparison to (opts[i].innerText== value)&lt;/p&gt;
&lt;p&gt;But the default value could not work. How is the correct way?&lt;/p&gt;
&lt;p&gt;Hope to get feedback soon...&lt;/p&gt;
&lt;p&gt;thank you in advanced...&lt;/p&gt;</description></item><item><title>re: Using Javascript to Manipulate a List Form Field</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#9929565</link><pubDate>Sat, 28 Nov 2009 03:57:14 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9929565</guid><dc:creator>Philipp</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I know it's an old thread, but I spent the last two hours, ok 30 minutes, with the search for the cause that the correct value is not choosen... The solution:&lt;/p&gt;
&lt;p&gt;in function setSelectedOption(select, value) the correct command would be if(opts[i].text == value) instead of if (opts[i].value == value)...&lt;/p&gt;</description></item><item><title>re: Using Javascript to Manipulate a List Form Field</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#9932940</link><pubDate>Sat, 05 Dec 2009 10:51:55 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9932940</guid><dc:creator>Shahab</dc:creator><description>&lt;p&gt;Hi geeks,&lt;/p&gt;
&lt;p&gt; I`m new in sharePoint and just wondered how could i set the default value for one of my &amp;quot;date/time&amp;quot; fields (say &amp;quot;Issue Start Time&amp;quot;) &amp;nbsp;in newform.aspx with current Time and date.&lt;/p&gt;
&lt;p&gt; SP would handle the date portion , but i have painful problems with time portion. &amp;nbsp;I really appreciate your guide &lt;/p&gt;</description></item><item><title>re: Using Javascript to Manipulate a List Form Field</title><link>http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx#9938339</link><pubDate>Thu, 17 Dec 2009 19:20:51 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9938339</guid><dc:creator>samuel</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I need to access person or Group control on a Sharepoint &amp;nbsp;List form using javascript. I need tagname and identifier for person or group.. Please Let me know if anyone has an idea.&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Samuel Mendu&lt;/p&gt;</description></item></channel></rss>