[ List Archives Home ] [ Thread index for 2008 ] [ Date index for 2008 ] [ Author index for 2008 ]


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Hello,

I have a question that the JavaScript experts out there may be able to answer. Our library is using meebo (www.meebo.com) for IM reference, and we have been experimenting with adding the meebo widget to WebPAC so that students can ask questions from a search page.

For testing I put a widget on our opacmenu page in staging: http://opac.sfsu.edu:2082/search

It works fine in IE, but I am having a problem with FireFox on PCs. The problem is that whenever you type an IM message and hit the return key in FireFox, a search query gets sent to WebPAC, you get a search results page, and you lose your IM session.

In looking at the JavaScript on the WebPAC search pages, we think that we have identified the source of the problem, but we don't know how to fix it. Our search pages have the following script, which gets added with the <!--{submit}--> token:


<script language="javascript">
function iiiDoSubmit_1() {
var name = "iiiFormHandle_1";
if (document.getElementById)
obj = document.getElementById(name);
else if (document.all)
obj = document.all[name];
else if (document.layers)
obj = document.layers[name];
obj.form.submit();
}
if (document.layers)
document.captureEvents(Event.KEYDOWN);
document.onkeydown =
function (evt) {
var keyCode = evt ? (evt.which ? evt.which : evt.keyCode) : event.keyCode;
if (keyCode == 13)
iiiDoSubmit_1(); };
</script>

We think that "if (keyCode == 13) iiiDoSubmit_1(); };" is submitting a search whenever you hit the "return" key anywhere on the page.

Any suggestions for getting around this?

Thank you,
John Wenzler


*******************************************************************************************************************
John Wenzler
Electronic Resources CoordinatorJ. Paul Leonard Library
San Francisco State University Library
Phone: (415) 405-0694
Fax: (415) 338-6940
http://www.library.sfsu.edu
********************************************************************************************************************

"Not everything that can be counted counts, and not everything that counts can be counted."

-- Albert Einstein

--- StripMime Report -- processed MIME parts ---
multipart/alternative
text/plain (text body -- kept)
text/html
---