SPLookupAddNew
Posted by Mike - May 24 ’13 at 01:04
I added references to jquery and SPServices to the master page. Verified the reference is good..)
I added a table to the form design, then I added this js-code to the js-editor in the new form:
window.$().SPServices.SPLookupAddNew({ lookupColumn: "ClassificationLevel", promptText: "Add new {0} " });
Unfortunately it's not working.... can you help? Thanks, Bill
-
DmitryAdminMember for: 10 years 7 months 22 days
You are right, there is an issue with SPLookupAddNew. How to get it working:
Use jquery 1.9.0 (not 1.9.1 because it has a bug with responseXML)
Put your lookup field into table and set its cell's Css Class to ‘ms-formbody’. SPServices uses it in selector to place ‘add new’ link.
Put your js-code into js-editor:
window.$().SPServices.SPLookupAddNew({ lookupColumn: "Parent", promptText: "Add new {0} " });
Result:
-
lijupnandananMemberMember for: 6 years 9 months 19 days
Hi,
i tried to get data from a lsi using SPService caml Query. But I got an error like "SPServices error Object doesn't support property or method SPFilterNode" . I referred spservice and jquery min js on master page. Still got this error.
This is my Code
function GetQueryDetAndHide(columnName)
{
alert("Qry Hide");
var thisSite = window.$().SPServices.SPGetCurrentSite().toLowerCase();
alert("Site :"+thisSite);
//thisSite=thisSite.replace("qhse","admin");
var serviceURL = thisSite;
try
{
window.$().SPServices({
operation: "GetListItems",
async: false,
webURL: serviceURL ,
listName: "SettingsList",
CAMLQuery: "<Query><Where><Eq><FieldRef Name='Value' /><Value Type='Lookup'>"+columnName+"</Value></Eq></Where></Query>",
CAMLViewFields: "<ViewFields> <FieldRef Name='Title' /> </ViewFields>",
completefunc: function (xData, Status) {
$(xData.responseXML).SPFilterNode("z:row").each(function() {
alert('qry inside remove');
var liHtml = $(this).attr("ows_Title") ;
alert(liHtml);
$("nobr:contains("+liHtml+")").parent('h3').parent('td').parent('tr').hide();
$("#tasksUL").append(liHtml);
});
}
});
}
catch(err)
{
alert(err.message);
}
}I got the current site url on this but got error on " $(xData.responseXML).SPFilterNode("z:row").each(function()" this session.
-
Dmitry KozlovAdminMember for: 9 years 4 months 11 days
[#2]: Hi,
Please, try to add the following line to the beginning of your function:
function GetQueryDetAndHide(columnName) { var $ = window.$; ... }
-
jatober349MemberMember for: 1 year 6 months 3 days
Katie's garden is so beautiful. All the flowers are unique and the garden is so beautiful. I like the work they are doing for the garden as I have pursued best essay writing service to complete my academic work on time. Beautiful butterflies are making these flowers more unique and beautiful. A real depiction of the spring.
-
Goldyy6MemberMember for: 1 year 4 months 20 days
Looking for help writing a paper free? While we are not free, we are affordable and will assist you securely and anonymously. To secure your information, we use HTTPS on our website and also enact strict privacy laws among our writers ( https://jetwriting.com/ ). And you can count on the security of your funds since we cooperate with trusted payment processing companies.
-
GreyMemberMember for: 1 year 1 month 1 day
The thought of writing a dissertation made me anxious. I used to do other academic assignments, but writing a dissertation seemed like one of the hardest tasks in the world. I have a job and it is very difficult for me to combine a full-time career with writing a dissertation. In order to solve this problem and have time to complete everything on time, I turned to a trusted resource for dissertation help online, because this task is too important for me to entrust it to anyone. Getting help to write my dissertation gave me a big advantage in making sure everything was done on time and properly and helped me get better grades.
-
among1MemberMember for: 9 months 18 days
I have read your blog, it is very helpful for me. I want to say thank you to you. I have bookmarked your site for future updates. I will be back in the near future!
-
mark_andersonMemberMember for: 5 months 7 days
Tw kings Cars offers a comprehensive portfolio of Private Hire passenger car services on a 24/7 basis, designed to meet the needs of our strong customer base. The diversity and flexibility of the services, together with our customer service means that tw kings Cars is the ideal choice for anyone looking for professional passenger car service. We can tailor services to meet any specific requirement.
-
churchillcarsMemberMember for: 5 months 1 day
We care for our customers very much, therefore, work on every aspect of taxi service to make your journey as pleasant as possible, we have a commitment to looking after our clients who have been instrumental in making us London renowned in the chauffeuring industry today.