I've managed to set my preferred scope checkbox in the advanced search form by
adding a little JavaScript to a Content Editor web part I added to the page.
Nice. Very pleased with myself. :)
I'm now trying to add a little more checking to it but am having no joy.
Unfortunately, there is no group name associated with the scope checkboxes, so
I can't see an easy way to create an array automatically. And doing it manually
means I'd have to update it for any new scopes. The missing name value also
means that multiple selections are allowed but aren't actually implemented, so
the search returns no results!
So far I've got the following but she no work. Can anyone provide any insight?
var advScopes = new Array();
advScopes[0] =
ctl00_ctl17_g_bb3d0ed2_2b7f_4be2_bb02_13ec9395196f_ASB_SS_scb_0_1
advScopes[1] =
ctl00_ctl17_g_bb3d0ed2_2b7f_4be2_bb02_13ec9395196f_ASB_SS_scb_1_8
advScopes[2] =
ctl00_ctl17_g_bb3d0ed2_2b7f_4be2_bb02_13ec9395196f_ASB_SS_scb_2_6
advScopes[3] =
ctl00_ctl17_g_bb3d0ed2_2b7f_4be2_bb02_13ec9395196f_ASB_SS_scb_3_0
for(i=0;i<advScopes.length;i++)
{
if (!(document.getElementById(advScopes[i]).checked))
{
document.getElementById(advScopes[1]).checked = true;
}
}
--------------------------------------------------------------------------------
List address: [email protected]
Subscribe: [email protected]
Unsubscribe: [email protected]
List FAQ: http://www.codify.com/lists/ozmoss
Other lists you might want to join: http://www.codify.com/lists