I found this code a while ago that creates a drop down search box that will search a sharepoint list. I am extremely new to this so I am clueless in how I can modify this code to suit my needs. The code redirects to the same page with querystring data added to the URL. I was able to modify the drop down list and I changed the Column names to
(
Read more... )
Comments 5
var cs = document.getElementById("sfield").value;
, you need to say something like:
var sfield = document.getElementById("sfield");
var cs = sfield.options[sfield.selectedIndex].value;
Yeah, it's a bit unwieldy. (This is one of the reasons most JavaScript coders like to use frameworks. But I'd never discourage someone from learning to deal with raw JS first, just so they understand what's really going on!)
Reply
Reply
Reply
If you want to simplify it, just stick the damned thing into a form and submit it. There's no need to redirect the page anyway.
Reply
I think I am really over my head with this. I thought I could magically fix the code to fit my needs but its way too complicated. With sharepoint you can only have one text filter on a page and this was something I though would help me filter more than one column on a page.
Reply
Leave a comment