java help very urgent 2-3 hours my deadlines
onlinestore_menu_Example1.html.html
exact phrase any of the words all of the words product codes all categories selected categoriesEnter keywords above OR click on a category below:
| ** Alarm Clocks/Timers | ||||
| Clock Accessories | ||||
| ** Amplified Corded Phones | ||||
| ** Amplified Cordless Phones | ||||
| Neckloops/Headsets or Mobile/Cellphone/Use | ||||
| Phone Add-on Amplifiers/ Ringers/ Accessories | ||||
| ** FM Systems | ||||
| ** Personal Amplifier | ||||
| Accessories | ||||
| ** Signalling Systems | ||||
| Add On Accessories | ||||
| Alert to Door | ||||
| Alert to Sound | ||||
| Alert to TTY-VP-Phone Ringing | ||||
| Fire/Smoke/Security Alert Systems | ||||
| Personal Pagers | ||||
| Remote Receivers | ||||
| ** Text Telephones | ||||
| TTY/TDD | ||||
| VCO Phones | ||||
| ** TV Listening Systems | ||||
| Accessories | ||||
| *** Sale *** | ||||
|
Javascript.docx
HTML and Javascript Modifications to an existing web store.
Objectives:
#1. To add a second search box capability (1) as shown on the screen capture. I edited the attached javascript file to add this (1) search box at the top. The Problem: (1) needs to have behavior separate from the search box & [Go] button at the bottom (5). The search box at bottom works correctly the first time text is entered, user presses the [Go] button. At the top (1) needs this same behaviour, but (1) should use the top Text Input box for keywords. Making (1) search feature work correctly is the first goal & deliverable.
#2. After the above is working, need to fix a bug in the (5) search box. Correct behavior is: When user selects one or more Categories from the list in (4), the search for the keyword is constrained to only searching products assigned to the categories selected. We need a new capability to ‘unselect’ items in the (4) list. I would like the selection to automatically ‘unselect’ after 10 seconds of inactivity. After unselection is done, user can search at (5) with just the keywords again (not constraining the search for keywords with-in the categories) as before.
Other information:
Live store URL for testing behavior:
http://ecom.virtual-vendor.com/web/100015/www/
Note: this is a live store, one of my customers. I host several web stores. Please do not do anything to break the web store.
We can test your modified Javascript file. I can give FTP access to upload your modified HTML/Javascript file. The URL above can be refreshed to test your changes.
All searches are done with pre-programmed functions. No need to change the search code. Just need to do #1. Then #2 above in the javascript file that I send you.
Once successfully tested, we are done. I will take the code you give me and integrate it into the live web store HTML / Javascript template file. The system auto-generates the HTML / Javascript I sent to you.
After this project, I would like to discuss a further Wordpress related project (optional).
Javascript snippet on next page….
The following code was my attempt to (a) add the second search box and [Go] button to the top. It does display, but doesn’t function as I specify in Objectives #1 on page 1 of this document.
<!-- PO START search box -----------------------------------Peter pasted this here ---------------->
<form name="searchFormTop" action="" onSubmit="return false">
<INPUT TYPE="hidden" NAME="CiRestriction">
<INPUT TYPE="hidden" NAME="pricingParadigm" VALUE="">
<INPUT TYPE="hidden" NAME="itemsPerCoupon" VALUE="multiple">
<tr> <td>
<SELECT name="anyall" style="display:none">
<OPTION>exact phrase
<OPTION>any of the words
<OPTION SELECTED>all of the words
<OPTION>product codes
</SELECT>
<SELECT name="allselection" style="display:none">
<OPTION VALUE="_all">all categories
<OPTION SELECTED>selected categories
</SELECT> </td> </tr>
<tr> <td>
<SPAN class="style-menuText"> </SPAN> <!-- Text before search box goes before </SPAN> -->
</td> </tr>
<tr> <td>
<INPUT id="searchBox" CLASS="style-textWidget" TYPE="text" name="term" SIZE=16 STYLE="font-size:8pt" onKeyPress="return localCheckEnterNoCategories(this,event)"> <INPUT id="doSearchTop" CLASS="style-button" TYPE="button" VALUE=" Go " onClick="submitSearchForm()" target="basefrm">
</td> </tr>
<p>
Enter keywords above OR click on a category below: <p>
<tr><td><hr color="#FFFFFF"></td></tr>
</form>
<!-- PO END search box -----------------------------------Peter pasted the code above ----------------------------------->
More javascript (snippet) on next page…
I also modified the code below by inserting the code in yellow highlight. The [Go] button at the top does not seem to execute this function I added. If it can execute, I believe the search function parameters can be altered to behave as specified.
<script>
if (ShowAdvancedSearchLink) {
document.write('<tr><td> <a class="style-menuLink" href="javascript:goTo_ProductSearch()">Advanced Search</a></td></tr>') <!--- ignore advanced search -->
}
function localCheckEnter (theWidget, theEvent) {
alert("alert > localCheckEnter "); <!-- PO added -->
if (!isEnterEvent(theWidget,theEvent)) { return true }
var button = document.getElementById('doSearch')
button.click()
return false
}
<!-- PO added function below to support search at top-of-page. This code should be added to: _productSearchAsFrame.html -->
function localCheckEnterNoCategories (theWidget, theEvent {
alert("alert > localCheckEnterNoCategories "); <!-- PO added -->
if (!isEnterEvent(theWidget,theEvent)) { return true }
var button = document.getElementById('doSearchTop')
button.click()
return false
}
</script>
The entire HTML / javascript file available upon request. It is 12k in size.
IMPORTANT: Please make your changes, marked so I can identify them in the HTML file, enabling me to integrate the changes into the source files on my server. I want to be careful not to break a live system. Thanks.