Tom Knowlton
asked on
window location ToUpper ??
$(document).ready(function ()
{
var loc = window.location.href;
if (loc.indexOf("CourseSearch .aspx") != -1)
{
alert("on coursesearch page");
}
});
Right now this only works if the page name is "CourseSearch"
I need it to work as long as the letters are in the right sequence, regardless of case.
coursesearch
Coursesearch
CourseSearch
courseSearch
COUrsesearch
coursesearchH
all are valid names for the same page
{
var loc = window.location.href;
if (loc.indexOf("CourseSearch
{
alert("on coursesearch page");
}
});
Right now this only works if the page name is "CourseSearch"
I need it to work as long as the letters are in the right sequence, regardless of case.
coursesearch
Coursesearch
CourseSearch
courseSearch
COUrsesearch
coursesearchH
all are valid names for the same page
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
It works.
ASKER
I could not remember the name of the function...
Open in new window