C
css-discuss.org
I have added the 2 asterisks lines for the search field for
orderNumber ****:
This page is using YUI so its complicated to explain but the function
I need to change should be simple js.
--------------HTML-----------------------
<div id="filtersDiv">
**Order Number: <input type="text" id="filterOrderNumber"
name="filterOrderNumber" size="10" value="" />
** <input id="filterSearch"
type="submit" />
<ui>
<li id="process">ProcessCode: </li>
<li id="system">SystemCode: </li>
<li id="plant">Plant: </li>
</ul>
</ul>
</div>
-----------------------
I added the 2nd filterClickHandler2 event to listen for the
searchOrderNumber field.
var filterClickHandler = function(){
YAHOO.log("filter clicked");
var xmlStartDate = YAHOO.util.Dom.get("xmlStartDate").value;
var xmlEndDate = YAHOO.util.Dom.get("xmlEndDate").value;
var plant = YAHOO.util.Dom.get("userPlant").value;
var submitType='filterSubmit';
loadSecondaryFilters(xmlStartDate, xmlEndDate, plant);
var configURL = getConfigURL(xmlStartDate, xmlEndDate,submitType);
loadDataTable(configURL);
};
YAHOO.util.Event.addListener("filterSubmit", "click",
filterClickHandler);
var filterClickHandler2 = function(){
YAHOO.log("orderNumber filter clicked"); //
var orderNumber = YAHOO.util.Dom.get("orderNumber").value;
var submitType='filterSearch';
var configURL = getConfigURL(submitType);
loadDataTable(configURL);
};
YAHOO.util.Event.addListener("filterSearch", "click",
filterClickHandler2);
I added the submitType var to the clickhandler functions.
Now I need to alter the function getConfigURL() to accomodate for
both filters.
function getConfigURL(xmlStartDate, xmlEndDate,submitType) { //
1_11_2012 jr added submitType
var plant = YAHOO.util.Dom.get("userPlant").value;
if ( submitType='filterSubmit'){
var configURL = "/XMII/Illuminator?Transaction=" +
CN.config.GLOBAL_DIR + "/Message%20Queue/
GetMessageQueue&Server=XacuteConnector&Mode=Query&RowCount=99999&OutputParameter=outputXML&Content-
Type=text/xml&key=message";
configURL += "&ST=" + xmlStartDate;
configURL += "&ET=" + xmlEndDate;
configURL += "&plant=" + plant;
if(hasValue("empNo")) {
configURL += "&empNo=" + YAHOO.util.Dom.get("empNo").value;
}
if(hasValue("processDD")) {
configURL += "&processcd=" + YAHOO.util.Dom.get("processDD").value;
}
if(hasValue("systemDD")) {
configURL += "&systemcd=" + YAHOO.util.Dom.get("systemDD").value;
}
if(hasValue("functionDD")) {
configURL += "&functioncd=" +
YAHOO.util.Dom.get("functionDD").value;
}
if(hasValue("pageDD")) {
configURL += "&page=" + YAHOO.util.Dom.get("pageDD").value;
}
if(hasValue("moduleDD")) {
configURL += "&module=" + YAHOO.util.Dom.get("moduleDD").value;
}
if(hasValue("statusDD")) {
configURL += "&status=" + YAHOO.util.Dom.get("statusDD").value;
}
return configURL;
} } else{
//key is changed to orderNumber
var configURL = "/XMII/Illuminator?Transaction=" +
CN.config.GLOBAL_DIR + "/Message%20Queue/
GetMessageQueue&Server=XacuteConnector&Mode=Query&RowCount=99999&OutputParameter=outputXML&Content-
Type=text/xml&key=orderNumber";
?????
return configURL}
Is this right?
Tnx,
Jan
orderNumber ****:
This page is using YUI so its complicated to explain but the function
I need to change should be simple js.
--------------HTML-----------------------
<div id="filtersDiv">
**Order Number: <input type="text" id="filterOrderNumber"
name="filterOrderNumber" size="10" value="" />
** <input id="filterSearch"
type="submit" />
<ui>
<li id="process">ProcessCode: </li>
<li id="system">SystemCode: </li>
<li id="plant">Plant: </li>
</ul>
<li>End Date: <input type="text" id="endDate" name="endDate" /><input<input type="hidden" id="xmlStartDate" name="xmlStartDate" /></li>
<li><input id="filterSubmit" type="submit"></li>type="hidden" id="xmlEndDate" name="xmlEndDate" /> said:</li>
</ul>
</div>
-----------------------
I added the 2nd filterClickHandler2 event to listen for the
searchOrderNumber field.
var filterClickHandler = function(){
YAHOO.log("filter clicked");
var xmlStartDate = YAHOO.util.Dom.get("xmlStartDate").value;
var xmlEndDate = YAHOO.util.Dom.get("xmlEndDate").value;
var plant = YAHOO.util.Dom.get("userPlant").value;
var submitType='filterSubmit';
loadSecondaryFilters(xmlStartDate, xmlEndDate, plant);
var configURL = getConfigURL(xmlStartDate, xmlEndDate,submitType);
loadDataTable(configURL);
};
YAHOO.util.Event.addListener("filterSubmit", "click",
filterClickHandler);
var filterClickHandler2 = function(){
YAHOO.log("orderNumber filter clicked"); //
var orderNumber = YAHOO.util.Dom.get("orderNumber").value;
var submitType='filterSearch';
var configURL = getConfigURL(submitType);
loadDataTable(configURL);
};
YAHOO.util.Event.addListener("filterSearch", "click",
filterClickHandler2);
I added the submitType var to the clickhandler functions.
Now I need to alter the function getConfigURL() to accomodate for
both filters.
function getConfigURL(xmlStartDate, xmlEndDate,submitType) { //
1_11_2012 jr added submitType
var plant = YAHOO.util.Dom.get("userPlant").value;
if ( submitType='filterSubmit'){
var configURL = "/XMII/Illuminator?Transaction=" +
CN.config.GLOBAL_DIR + "/Message%20Queue/
GetMessageQueue&Server=XacuteConnector&Mode=Query&RowCount=99999&OutputParameter=outputXML&Content-
Type=text/xml&key=message";
configURL += "&ST=" + xmlStartDate;
configURL += "&ET=" + xmlEndDate;
configURL += "&plant=" + plant;
if(hasValue("empNo")) {
configURL += "&empNo=" + YAHOO.util.Dom.get("empNo").value;
}
if(hasValue("processDD")) {
configURL += "&processcd=" + YAHOO.util.Dom.get("processDD").value;
}
if(hasValue("systemDD")) {
configURL += "&systemcd=" + YAHOO.util.Dom.get("systemDD").value;
}
if(hasValue("functionDD")) {
configURL += "&functioncd=" +
YAHOO.util.Dom.get("functionDD").value;
}
if(hasValue("pageDD")) {
configURL += "&page=" + YAHOO.util.Dom.get("pageDD").value;
}
if(hasValue("moduleDD")) {
configURL += "&module=" + YAHOO.util.Dom.get("moduleDD").value;
}
if(hasValue("statusDD")) {
configURL += "&status=" + YAHOO.util.Dom.get("statusDD").value;
}
return configURL;
} } else{
//key is changed to orderNumber
var configURL = "/XMII/Illuminator?Transaction=" +
CN.config.GLOBAL_DIR + "/Message%20Queue/
GetMessageQueue&Server=XacuteConnector&Mode=Query&RowCount=99999&OutputParameter=outputXML&Content-
Type=text/xml&key=orderNumber";
?????
return configURL}
Is this right?
Tnx,
Jan