Greetings,
I am completely new to javascript and need some help.
I have a script (which works fine) for a duty roster which searches a database table and returns a weekly schedule for the selected tech. Now there is a new table (extra duties) which I have showing in a iFrame on the same page as the first table. The problem is that I don’t know how to run the same search/script in the iFrame to show the same results so the tech’s can see both schedules together. Both tables reside in the same domain.
The script is as follows (I have included only one week out of the year for the example):
<select id=”tech”>
<option value=”gadabout”>Al Bell</option>
<option value=”mundy”>Matt Undy</option>
<option value=”kstupple”>Kyle Stupple</option>
<option value=”sperrin”>Steve Perrin</option>
<option value=”sdlamb”>Steve Lambert</option>
</select>
<select id=”startDate”>
<option value=”&comparisonType1=is+greater+than+or+equal+to&value1=05%252F04%252F2009&joinCondition2=AND&column2=startdate&comparisonType2=is+less+than+or+equal+to&value2=05%252F10%252F2009″>Week May 04 – May 10</option>
</select>
<script language=”javascript”>
function doSearch() {
var theTechname = document.getElementById(‘tech’).value;
var theWeek = document.getElementById(‘startDate’).value;
theSearchURL = “/<Webobject name=DataAccess_SiteID></WebObject>/<Webobject name=DataAccess_SectionName></WebObject>&column0=uniquename3&comparisonType0=is+equal+to&value0=” + theTechname + “&joinCondition1=AND&column1=startdate” + theWeek;
document.location.href = theSearchURL;
//alert(theSearchURL);
}
</script>
Any advice or example scripts would be greatly appreciated.