Opened 12 years ago

Closed 12 years ago

#4662 closed defect (invalid)

TooltipDialog/NumberTextBox not working due to missing Mastertooltip.js

Reported by: guest Owned by: anonymous
Priority: high Milestone:
Component: General Version: 0.9
Keywords: Cc:
Blocked By: Blocking:

Description

After downloading the latest (as of Oct 1) dojo toolkit from the website (0.9.0) I can get most things working but Tooltip dialogs and the Number text box objects do not work. Firebug in Firefox throws an error: dijit.MasterTooltip? has no properties and I cannot find the _MasterTooltip.js file anywhere inside of the dojo zip file.

Here's the HTML for a page trying to use the number text box:

<!DOCTYPE html PUBLIC "-W3CDTD XHTML 1.0 TransitionalEN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml">

<head><title>Search page</title>

<style type="text/css"> @import "/wcsstore/B2BDirectStorefrontAssetStore/javascript/dojo-release-0.9.0/dijit/themes/tundra/tundra.css"; @import

"/wcsstore/B2BDirectStorefrontAssetStore/javascript/dojo-release-0.9.0/dojo/resources/dojo.css"; </style> <script type="text/javascript" src="/wcsstore/B2BDirectStorefrontAssetStore/javascript/dojo-release-0.9.0/dojo/dojo.js" djConfig="parseOnLoad: true"></script> <script type="text/javascript"> dojo.require("dojo.parser"); dojo.require("dijit.form.Slider"); dojo.require("dijit.form.Button"); dojo.require("dijit.form.FilteringSelect?"); dojo.require("dijit.form.CheckBox?"); dojo.require("dijit.form.NumberTextBox?"); dojo.require("dijit.Dialog"); </script> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

</head> <body class="tundra">

<table cellpadding="8" cellspacing="4" border="0" id="WC_AdvancedCatalogSearchForm_Table_2"> <tbody> <tr>

<td><h1>Advanced Search</h1> <!-- Start Search Form --> <form method="get" action="CatalogSearchResultView?" name="AdvancedSearchForm?" id="AdvancedSearchForm?"> <table border="0"

cellpadding="4" cellspacing="4" id="searchTable"> <tbody> <tr> <td> <div>

<input type="hidden" name="storeId" value="10051" id="storeId"/> <input type="hidden" name="langId" value="-1" id="langId"/> <input type="hidden" name="catalogId" value="10051" id="catalogId"/> <input type="hidden" name="updating" value="1" id="updating"/> <label for="searchTerm">Search for all of the following words</label><br /> <input id="searchTerm" size="30" maxlength="254" type="text" name="searchTerm" onkeyup="searchCount()" value="" /> </div> </td> <td rowspan="10" valign="top" align="right"><div id="searchCount"></div></td>

<td></td> </tr> <tr> <td> <div > <label for="styleNumber"> Style Number</label><br /> <input id="styleNumber" size="30" maxlength="254" type="text" name="styleNumber"

onkeyup="searchCount()" value="" />

</div></td> <td></td> <td></td> </tr> <tr> <td></td> <td></td> <td></td> </tr>

<tr> <td> <label for="category">Category</label><br /> <select id="category" name="category" dojoType="dijit.form.FilteringSelect?" autocomplete="true"

onChange="searchCount()"> <option value="" selected>Please select a category from the list below </option>

<option value="Baseball and Softball">Baseball and Softball</option>

<option value="Basketball">Basketball</option>

<option value="Soccer">Soccer</option>

<option value="Track and Field">Track and Field</option>

<option value="Football">Football</option>

<option value="Sport Shirts">Sport Shirts</option>

<option value="Coach">Coach</option>

<option value="Spiritwear">Spiritwear</option>

<option value="Athletic Tops">Athletic Tops</option>

<option value="Athletic Bottoms">Athletic Bottoms</option>

<option value="Athletic Fleece">Athletic Fleece</option>

<option value="Outerwear and Warmups">Outerwear and Warmups</option>

<option value="Denim Shirts">Denim Shirts</option>

<option value="Headwear">Headwear</option>

<option value="Accessories">Accessories</option>

<option value="Bags">Bags</option>

<option value="Totes">Totes</option>

<option value="Aprons">Aprons</option>

<option value="Closeout">Closeout</option>

</select> </td> <td></td>

<td></td> </tr> <tr> <td colspan="3"> <div ><label for="WC_AdvancedCatalogSearchForm_FormInput_catGroupId_In_AdvancedSearchForm_1">Sizes</label><br />

<input type="checkbox" dojotype="dijit.form.CheckBox?" id="productType" name="productType" value="Adult" onchange="searchCount()"> Adult</option>

<input type="checkbox" dojotype="dijit.form.CheckBox?" id="productType" name="productType" value="Youth" onchange="searchCount()"> Youth</option>

<input type="checkbox" dojotype="dijit.form.CheckBox?" id="productType" name="productType" value="Ladies" onchange="searchCount()"> Ladies</option>

<input type="checkbox" dojotype="dijit.form.CheckBox?" id="productType" name="productType" value="Girls" onchange="searchCount()"> Girls</option>

<input type="checkbox" dojotype="dijit.form.CheckBox?" id="productType" name="productType" value="One Size" onchange="searchCount()">One Size</option>

<input type="hidden" name="categoryType" value="ANY" id="WC_AdvancedCatalogSearchForm_FormInput_categoryType_In_AdvancedSearchForm_1"/> </div></td> </tr> <tr>

<td></td> <td></td>

<td></td> </tr> <tr> <td> <div > <label for="colors"> Color (applies to multi-color apparel as well)</label> <br /> <select name="colors" id="colors"

dojoType="dijit.form.FilteringSelect?" autocomplete="true" onchange="searchCount()">

<option value="" selected>Please select a color from the list below </option>

<option value="Black">Black</option>

<option value="White">White</option>

<option value="Red">Red</option>

<option value="Royal">Royal</option>

<option value="Navy">Navy</option>

<option value="Orange">Orange</option>

<option value="Maroon">Maroon</option>

<option value="Light Blue">Light Blue</option>

<option value="Columbia Blue">Columbia Blue</option>

<option value="Gold">Gold</option>

<option value="Vegas Gold">Vegas Gold</option>

<option value="Purple">Purple</option>

<option value="Kelly">Kelly</option>

<option value="Dark Green">Dark Green</option>

<option value="Athletic Heather">Athletic Heather</option>

<option value="Pink">Pink</option>

<option value="Ash">Ash</option>

<option value="Teal">Teal</option>

<option value="Silver Grey">Silver Grey</option>

<option value="Silver">Silver</option>

<option value="Blue Grey">Blue Grey</option>

<option value="Lime">Lime</option>

<option value="Light Pink">Light Pink</option>

<option value="Hunter Green">Hunter Green</option>

<option value="Stone">Stone</option>

<option value="Khaki">Khaki</option>

<option value="Charcoal Heather">Charcoal Heather</option>

<option value="Grey Heather">Grey Heather</option>

<option value="Natural">Natural</option>

<option value="Chambray">Chambray</option>

<option value="Hot Pink">Hot Pink</option>

<option value="Clear">Clear</option>

<option value="Graphite">Graphite</option>

</select> </div> </td>

<td></td> <td></td> </tr> <tr> <td><br /><div><label for="minColors"> Range of Colors Needed (Minimum)</label><br /> <div id="minColorsSlider" dojoType="dijit.form.HorizontalSlider?" value="0" minimum="0" maximum="50" discreteValues="1" intermediateChanges="true" showButtons="false" onchange="minColorLoad(arguments[0])"> <div dojoType="dijit.form.HorizontalRule?" container="minBottomDecoration" count="5" style="height:5px;"></div> <ol dojoType="dijit.form.HorizontalRuleLabels?" container="minBottomDecoration" style="height:1em;font-size:75%;color:gray;">

<li>0</li> <li>25</li> <li>50</li> </ol> </div> <br/> <label for="maxColors"> Range of Colors Needed (Maximum)</label><br />

<div id="maxColorsSlider" dojoType="dijit.form.HorizontalSlider?" value="51" minimum="1" maximum="51" discreteValues="1"

intermediateChanges="true" showButtons="false" onchange="maxColorLoad(arguments[0])"> <div dojoType="dijit.form.HorizontalRule?" container="maxBottomDecoration" count="5" style="height:5px;"></div> <ol dojoType="dijit.form.HorizontalRuleLabels?" container="maxBottomDecoration" style="height:1em;font-size:75%;color:gray;"> <li>0</li> <li>25</li> <li>50</li> </ol> </div>

<br/>

<input id="minColors" size="4" maxlength="2" type="text" name="minColors" onchange="searchCount()" value="" /> - <input id="maxColors" size="4" maxlength="2"

type="text" name="maxColors" onchange="searchCount()" value="" /> </div> </td> <td></td> <td></td> </tr> <tr> <td>

<div id="priceDiv">

<label for="minPrice">Price Range</label><br /> <input dojoType="dijit.form.NumberTextBox?" id="minPrice" size="6" maxlength="10" type="text"

name="minPrice" constraints="{min:0,max:900000,places:2}" promptMessage= "Please use whole dollars and no dollar signs - example 5.00" required= "false" invalidMessage= "Invalid minimum price." onchange="searchCount()" value="" /> - <input dojoType="dijit.form.NumberTextBox?" id="maxPrice" size="6" maxlength="10" type="text" name="maxPrice" constraints="{min:0,max:900000,places:2}" promptMessage= "Please use whole dollars and no dollar signs - example 5.00" required= "false" invalidMessage= "Invalid maximum price." onchange="searchCount()" value="" /> &nbsp;&nbsp;(Please use whole dollars and no dollar signs - example 5.00) </div> </td> <td></td> <td></td>

</tr> <tr>

<td><div ><label for="inseam">Inseam</label><br /> <select id="inseam" name="inseam" dojoType="dijit.form.FilteringSelect?" autocomplete="true"

onChange="searchCount()"> <option selected="selected" value="">Please select from the list</option>

<option value="4">4</option>

<option value="5">5</option>

<option value="6">6</option>

<option value="7">7</option>

<option value="8">8</option>

<option value="9">9</option>

<option value="10">10</option>

<option value="11">11</option>

</select>

</div> <input type="hidden" name="beginIndex" value="0" id="beginIndex"/> <input type="hidden" name="sType" value="AdvancedSearch?" id="sType"/> </td> <td></td> <td> </td> </tr> <tr> <td>

<div > <label for="WC_AdvancedCatalogSearchForm_closeout_In_AdvancedSearchForm_1_2">Closeout Only Items</label>&nbsp;&nbsp; <INPUT type="checkbox"

dojotype="dijit.form.CheckBox?" id="closeout" name="closeout" value="true" onchange="searchCount()" > </div> </td> <td></td> <td></td> </tr> <tr>

<td colspan="3"><br /> <!-- Start Submit Button --> <button dojoType="dijit.form.Button" onclick="submitSearch(document.AdvancedSearchForm?)"> Search Now </button>

<!-- End Submit Button --> </td> </tr> </tbody> </table>

</form> <!-- End Search Form --> </td> </tr> </tbody> </table> <script type="text/javascript"> var form = document.formsAdvancedSearchForm?;

function submitSearch(form) {

if (form.minPrice.value != "" && isNaN(form.minPrice.value)) { alert('Minimum Price must be a number. Please check the number and try again.'); form.minPrice.focus();

} else if (form.maxPrice.value != "" && isNaN(form.maxPrice.value)) { alert('Maximum Price must be a number. Please check the number and try again.'); form.maxPrice.focus(); } else if (form.minColors.value != "" && isNaN(form.minColors.value)) { alert('Minimum number of colors must be a number. Please check the number and try again.'); form.minColors.focus(); } else if (form.maxColors.value != "" && isNaN(form.maxColors.value)) { alert('Maximum number of colors must be a number. Please check the number and try again.'); form.maxColors.focus(); } else { form.submit(); } }

function minColorLoad(minVal) { var tempVal = dojo.byId('minColors').value; if (minVal != "0") { dojo.byId('minColors').value = Math.round(minVal); } else {

dojo.byId('minColors').value = ""; } if (tempVal != dojo.byId('minColors').value){ formIsReady(); searchCount(); } }

function maxColorLoad(maxVal) { var tempVal = dojo.byId('maxColors').value; if (maxVal != "51") { dojo.byId('maxColors').value = Math.round(maxVal); } else {

dojo.byId('maxColors').value = ""; } if (tempVal != dojo.byId('maxColors').value){ formIsReady(); searchCount(); } }

function formIsReady() { dojo.byId('updating').value = ""; }

function formNotReady() { dojo.byId('updating').value = "1"; }

function searchCount() {

var updateVal = dojo.byId('updating').value; if (updateVal != '1') { formNotReady(); var colorsSelect = dojo.byId('colors').value; var categorySelect = dojo.byId('category').value; var inseamSelect = dojo.byId('inseam').value; var closeoutSelect = ""; var miColor = dojo.byId('minColors').value; var maColor = dojo.byId('maxColors').value; var miPrice = dojo.byId('minPrice').value; var maPrice = dojo.byId('maxPrice').value; if (colorsSelect.indexOf('Please select') != -1) { colorsSelect = ""; } if (categorySelect.indexOf('Please select') != -1) { categorySelect = ""; } if (inseamSelect.indexOf('Please select') != -1) { inseamSelect = ""; } if (dojo.byId('closeout').checked) { closeoutSelect = '&closeout=' + dojo.byId('closeout').value; }

if (miPrice != "") { miPrice = '&minPrice=' + miPrice; }

if (maPrice != "") { maPrice = '&maxPrice=' + maPrice; }

var productTypes=""; for(var i=0; i < form.productType.length; i++){ if(form.productType[i].checked) { productTypes += '&productType=' +

form.productType[i].value; } } var countUrl = '/webapp/wcs/stores/servlet/AJAXSearchView?storeId='+form.storeId.value+'&catalogId='+form.catalogId.value+'&searchTerm='+form.searchTerm.value+'&styl eNumber='+form.styleNumber.value+'&category='+categorySelect+'&categoryType='+form.categoryType.value+'&minColors='+miColor+'&maxColors='+maColor+'&co lors='+colorsSelect+'&inseam='+inseamSelect + productTypes + closeoutSelect + miPrice + maPrice + '&beginIndex=0&sType=AdvancedSearch?'; dojo.xhrGet( { url: countUrl, handleAs: "text", timeout: 5000, The LOAD function will be called on a successful response. load: function(response, ioArgs) { dojo.byId('searchCount').innerHTML = response; formIsReady(); return response; }, The ERROR function will be called in an error case. error: function(response, ioArgs) { console.error("HTTP status code: ", ioArgs.xhr.status); formIsReady(); return response; } }); }

}

formIsReady(); </script><!--END MAIN CONTENT--></td>

</tr> </table>

Change History (1)

comment:1 Changed 12 years ago by bill

Resolution: invalid
Status: newclosed

Please attach test cases using the "Attach File" button. Anyway it looks like you forgot to require dijit.Tooltip. That's where MasterTooltip? is defined.

Note: See TracTickets for help on using tickets.