<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Extending Lookup Fields with &#8220;Add new item&#8221; option</title>
	<atom:link href="http://blog.mastykarz.nl/extending-lookup-fields-add-new-item-option/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.mastykarz.nl/extending-lookup-fields-add-new-item-option/</link>
	<description>Innovation Matters &#124; SharePoint Server MVP</description>
	<lastBuildDate>Mon, 26 Jul 2010 17:43:19 +0200</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Carl</title>
		<link>http://blog.mastykarz.nl/extending-lookup-fields-add-new-item-option/comment-page-2/#comment-45479</link>
		<dc:creator>Carl</dc:creator>
		<pubDate>Tue, 30 Mar 2010 19:47:44 +0000</pubDate>
		<guid isPermaLink="false">http://blog.mastykarz.nl/extending-lookup-fields-add-new-item-option/#comment-45479</guid>
		<description>Tx GMax. My div.innerHTML was there, but cut off like yours during copy-paste.

CW</description>
		<content:encoded><![CDATA[<p>Tx GMax. My div.innerHTML was there, but cut off like yours during copy-paste.</p>
<p>CW</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: GMax</title>
		<link>http://blog.mastykarz.nl/extending-lookup-fields-add-new-item-option/comment-page-2/#comment-45453</link>
		<dc:creator>GMax</dc:creator>
		<pubDate>Tue, 30 Mar 2010 06:08:08 +0000</pubDate>
		<guid isPermaLink="false">http://blog.mastykarz.nl/extending-lookup-fields-add-new-item-option/#comment-45453</guid>
		<description>hehe, some of innerHTML lost. I try to repeat it here:

div.innerHTML = \&#039;&lt;img alt=\&quot;\&quot; src=\&quot;/_layouts/images/setrect.gif\&quot; style=\&quot;vertical-align: baseline\&quot;/&gt;  &lt;a href=\&quot;\&#039; + list + \&#039;/NewForm.aspx?Source=\&#039; + escape(location.href) + \&#039;\&quot; rel=\&quot;nofollow\&quot;&gt;\&#039; + label + \&#039;&lt;/a&gt;\&#039;;</description>
		<content:encoded><![CDATA[<p>hehe, some of innerHTML lost. I try to repeat it here:</p>
<p>div.innerHTML = \&#039;&amp;lt;img alt=\&quot;\&quot; src=\&quot;/_layouts/images/setrect.gif\&quot; style=\&quot;vertical-align: baseline\&quot;/&amp;gt;  &amp;lt;a href=\&quot;\&#039; + list + \&#039;/NewForm.aspx?Source=\&#039; + escape(location.href) + \&#039;\&quot; rel=\&quot;nofollow\&quot;&amp;gt;\&#039; + label + \&#039;&amp;lt;/a&amp;gt;\&#039;;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: GMax</title>
		<link>http://blog.mastykarz.nl/extending-lookup-fields-add-new-item-option/comment-page-2/#comment-45452</link>
		<dc:creator>GMax</dc:creator>
		<pubDate>Tue, 30 Mar 2010 06:07:30 +0000</pubDate>
		<guid isPermaLink="false">http://blog.mastykarz.nl/extending-lookup-fields-add-new-item-option/#comment-45452</guid>
		<description>hehe, some of innerHTML lost. I try to repeat it here:

div.innerHTML = &#039;&lt;img alt=&quot;&quot; src=&quot;/_layouts/images/setrect.gif&quot; style=&quot;vertical-align: baseline&quot;/&gt;  &lt;a href=&quot;&#039; + list + &#039;/NewForm.aspx?Source=&#039; + escape(location.href) + &#039;&quot; rel=&quot;nofollow&quot;&gt;&#039; + label + &#039;&lt;/a&gt;&#039;;</description>
		<content:encoded><![CDATA[<p>hehe, some of innerHTML lost. I try to repeat it here:</p>
<p>div.innerHTML = &#039;&lt;img alt=&#034;" src=&#034;/_layouts/images/setrect.gif&#034; style=&#034;vertical-align: baseline&#034;/&gt;  &lt;a href=&#034;&#039; + list + &#039;/NewForm.aspx?Source=&#039; + escape(location.href) + &#039;&#034; rel=&#034;nofollow&#034;&gt;&#039; + label + &#039;&lt;/a&gt;&#039;;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: GMax</title>
		<link>http://blog.mastykarz.nl/extending-lookup-fields-add-new-item-option/comment-page-2/#comment-45451</link>
		<dc:creator>GMax</dc:creator>
		<pubDate>Tue, 30 Mar 2010 06:04:46 +0000</pubDate>
		<guid isPermaLink="false">http://blog.mastykarz.nl/extending-lookup-fields-add-new-item-option/#comment-45451</guid>
		<description>here is my function
it is work as well as Marc Anderson;s jQuery variant

    $(function() {
        $(&quot;#onetIDListForm select[id$=Lookup], #onetIDListForm select[id$=SelectCandidate], #onetIDListForm input[class=ms-lookuptypeintextbox]&quot;).parents(&quot;td.ms-formbody&quot;).each(function() {
            var fieldWrapper = $(this);
            var text = fieldWrapper.text();
            var regex = /List=([^;]+);Label=([^;]+)(?:;CT=([0-9a-fx]+))?/i;
            var match = regex.exec(text);
            if (match != null) {
                var list = match[1];
                var label = match[2];
                var ct = match[3];
                var href = list + &#039;/NewForm.aspx?Source=&#039; + escape(location.href);
                if (ct != null &amp;&amp; ct.length &gt; 0) {
                    href += &#039;&amp;ContentTypeId=&#039; + ct;
                }
                this.lastChild.data = &quot;&quot;;
                var div = document.createElement(&quot;div&quot;);
                div.setAttribute(&quot;style&quot;, &quot;padding-top: 5px&quot;);
                div.innerHTML = &#039;  &lt;a href=&quot;&#039; + list + &#039;/NewForm.aspx?Source=&#039; + escape(location.href) + &#039;&quot; rel=&quot;nofollow&quot;&gt;&#039; + label + &#039;&lt;/a&gt;&#039;;
                this.appendChild(div);
            }
        })
    });

as far as I look, you do not implement latest changes in innerHTML, as described in above comments...</description>
		<content:encoded><![CDATA[<p>here is my function<br />
it is work as well as Marc Anderson;s jQuery variant</p>
<p>    $(function() {<br />
        $(&#034;#onetIDListForm select[id$=Lookup], #onetIDListForm select[id$=SelectCandidate], #onetIDListForm input[class=ms-lookuptypeintextbox]&#034;).parents(&#034;td.ms-formbody&#034;).each(function() {<br />
            var fieldWrapper = $(this);<br />
            var text = fieldWrapper.text();<br />
            var regex = /List=([^;]+);Label=([^;]+)(?:;CT=([0-9a-fx]+))?/i;<br />
            var match = regex.exec(text);<br />
            if (match != null) {<br />
                var list = match[1];<br />
                var label = match[2];<br />
                var ct = match[3];<br />
                var href = list + &#039;/NewForm.aspx?Source=&#039; + escape(location.href);<br />
                if (ct != null &amp;&amp; ct.length &gt; 0) {<br />
                    href += &#039;&amp;ContentTypeId=&#039; + ct;<br />
                }<br />
                this.lastChild.data = &#034;&#034;;<br />
                var div = document.createElement(&#034;div&#034;);<br />
                div.setAttribute(&#034;style&#034;, &#034;padding-top: 5px&#034;);<br />
                div.innerHTML = &#039;  <a href="' + list + '/NewForm.aspx?Source=' + escape(location.href) + '" rel="nofollow">&#039; + label + &#039;</a>&#039;;<br />
                this.appendChild(div);<br />
            }<br />
        })<br />
    });</p>
<p>as far as I look, you do not implement latest changes in innerHTML, as described in above comments&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Carl</title>
		<link>http://blog.mastykarz.nl/extending-lookup-fields-add-new-item-option/comment-page-2/#comment-45432</link>
		<dc:creator>Carl</dc:creator>
		<pubDate>Mon, 29 Mar 2010 21:22:31 +0000</pubDate>
		<guid isPermaLink="false">http://blog.mastykarz.nl/extending-lookup-fields-add-new-item-option/#comment-45432</guid>
		<description>This is what I have, and nothing is showing up under the multipick field.



    $(function() {
    $(&quot;#onetIDListForm select[id$=Lookup], #onetIDListForm select[id$=SelectCandidate], #onetIDListForm input[class=ms-lookuptypeintextbox]&quot;).parents(&quot;td.ms-formbody&quot;).each(function() {
            var fieldWrapper = $(this);
            var text = fieldWrapper.text();
            var regex = /List=([^;]+);Label=([^;]+)(?:;CT=([0-9a-fx]+))?/i;
            var match = regex.exec(text);
            if (match != null) {
                var list = match[1];
                var label = match[2];
                var ct = match[3];
                var href = list + &#039;/NewForm.aspx?Source=&#039; + escape(location.href);
                if (ct != null &amp;&amp; ct.length &gt; 0) {
                    href += &#039;&amp;ContentTypeId=&#039; + ct;
                }
                var link = this.lastChild.data = &quot;&quot;;
                var div = document.createElement(&quot;div&quot;);
                div.setAttribute(&quot;style&quot;, &quot;padding-top: 5px&quot;);
                div.innerHTML = &#039;&lt;a href=&quot;&#039; + lookupList + &#039;/NewForm.aspx?Source=&#039; + escape(location.href) + &#039;&quot; rel=&quot;nofollow&quot;&gt;&#039; + label + &#039;&lt;/a&gt;&#039;;
                this.appendChild(div);
                fieldWrapper.html(fieldWrapper.html().replace(regex, link));
            }
        })
    });


Carl</description>
		<content:encoded><![CDATA[<p>This is what I have, and nothing is showing up under the multipick field.</p>
<p>    $(function() {<br />
    $(&#034;#onetIDListForm select[id$=Lookup], #onetIDListForm select[id$=SelectCandidate], #onetIDListForm input[class=ms-lookuptypeintextbox]&#034;).parents(&#034;td.ms-formbody&#034;).each(function() {<br />
            var fieldWrapper = $(this);<br />
            var text = fieldWrapper.text();<br />
            var regex = /List=([^;]+);Label=([^;]+)(?:;CT=([0-9a-fx]+))?/i;<br />
            var match = regex.exec(text);<br />
            if (match != null) {<br />
                var list = match[1];<br />
                var label = match[2];<br />
                var ct = match[3];<br />
                var href = list + &#039;/NewForm.aspx?Source=&#039; + escape(location.href);<br />
                if (ct != null &amp;&amp; ct.length &gt; 0) {<br />
                    href += &#039;&amp;ContentTypeId=&#039; + ct;<br />
                }<br />
                var link = this.lastChild.data = &#034;&#034;;<br />
                var div = document.createElement(&#034;div&#034;);<br />
                div.setAttribute(&#034;style&#034;, &#034;padding-top: 5px&#034;);<br />
                div.innerHTML = &#039;<a href="' + lookupList + '/NewForm.aspx?Source=' + escape(location.href) + '" rel="nofollow">&#039; + label + &#039;</a>&#039;;<br />
                this.appendChild(div);<br />
                fieldWrapper.html(fieldWrapper.html().replace(regex, link));<br />
            }<br />
        })<br />
    });</p>
<p>Carl</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Carl</title>
		<link>http://blog.mastykarz.nl/extending-lookup-fields-add-new-item-option/comment-page-2/#comment-45431</link>
		<dc:creator>Carl</dc:creator>
		<pubDate>Mon, 29 Mar 2010 20:57:27 +0000</pubDate>
		<guid isPermaLink="false">http://blog.mastykarz.nl/extending-lookup-fields-add-new-item-option/#comment-45431</guid>
		<description>I&#039;ve tried all angles. With and with out Waldek&#039;s method, with and without your new selector string. 

Can you paste your entire function please?

Also, you could try Marc Anderson&#039;s jQuery method. It works very well, except I need one like this for when using wiki pages.</description>
		<content:encoded><![CDATA[<p>I&#039;ve tried all angles. With and with out Waldek&#039;s method, with and without your new selector string. </p>
<p>Can you paste your entire function please?</p>
<p>Also, you could try Marc Anderson&#039;s jQuery method. It works very well, except I need one like this for when using wiki pages.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Carl</title>
		<link>http://blog.mastykarz.nl/extending-lookup-fields-add-new-item-option/comment-page-2/#comment-45428</link>
		<dc:creator>Carl</dc:creator>
		<pubDate>Mon, 29 Mar 2010 19:28:56 +0000</pubDate>
		<guid isPermaLink="false">http://blog.mastykarz.nl/extending-lookup-fields-add-new-item-option/#comment-45428</guid>
		<description>Nope, nothing. Are you using the origianl code or the modified version Waldek suggested on Nov 9, 2009?</description>
		<content:encoded><![CDATA[<p>Nope, nothing. Are you using the origianl code or the modified version Waldek suggested on Nov 9, 2009?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: GMax</title>
		<link>http://blog.mastykarz.nl/extending-lookup-fields-add-new-item-option/comment-page-1/#comment-45418</link>
		<dc:creator>GMax</dc:creator>
		<pubDate>Mon, 29 Mar 2010 14:12:50 +0000</pubDate>
		<guid isPermaLink="false">http://blog.mastykarz.nl/extending-lookup-fields-add-new-item-option/#comment-45418</guid>
		<description>I paste _only_ selector string, change yours(2nd in your post) to my and try it</description>
		<content:encoded><![CDATA[<p>I paste _only_ selector string, change yours(2nd in your post) to my and try it</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Carl</title>
		<link>http://blog.mastykarz.nl/extending-lookup-fields-add-new-item-option/comment-page-1/#comment-45412</link>
		<dc:creator>Carl</dc:creator>
		<pubDate>Mon, 29 Mar 2010 13:21:41 +0000</pubDate>
		<guid isPermaLink="false">http://blog.mastykarz.nl/extending-lookup-fields-add-new-item-option/#comment-45412</guid>
		<description>Great GMax, however, looks like your copy-pasting cut off part of the code.</description>
		<content:encoded><![CDATA[<p>Great GMax, however, looks like your copy-pasting cut off part of the code.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: GMax</title>
		<link>http://blog.mastykarz.nl/extending-lookup-fields-add-new-item-option/comment-page-1/#comment-45395</link>
		<dc:creator>GMax</dc:creator>
		<pubDate>Mon, 29 Mar 2010 07:05:41 +0000</pubDate>
		<guid isPermaLink="false">http://blog.mastykarz.nl/extending-lookup-fields-add-new-item-option/#comment-45395</guid>
		<description>here is my fix for multipick fields:
selector line shuld looks like this:
$(&quot;#onetIDListForm select[id$=Lookup], #onetIDListForm select[id$=SelectCandidate], #onetIDListForm input[class=ms-lookuptypeintextbox]&quot;).parents(&quot;td.ms-formbody&quot;).each(function() {</description>
		<content:encoded><![CDATA[<p>here is my fix for multipick fields:<br />
selector line shuld looks like this:<br />
$(&#034;#onetIDListForm select[id$=Lookup], #onetIDListForm select[id$=SelectCandidate], #onetIDListForm input[class=ms-lookuptypeintextbox]&#034;).parents(&#034;td.ms-formbody&#034;).each(function() {</p>
]]></content:encoded>
	</item>
</channel>
</rss>
