Welcome to WebmasterWorld Guest from 54.161.64.174

Forum Moderators: open

Message Too Old, No Replies

Search Function works in IE5.5 but not in Mozilla

     
7:37 pm on Aug 27, 2003 (gmt 0)

10+ Year Member



My team created a page where they could search images or pages using keywords and parameters. The search function was developed within house. I am a newcomer to this project. I have to figure out why it doesn't work with Netscape or Mozilla but in IE 5.5. I don't think it had to do with HTML coding or standards but the way linking is set up.

Here is a portion of the javascript code:

{
url = "{{sub_prefix}}/servlet/DisplayServlet? url=srchByKeywordURL&search=search2&whereClause=" + escape(whereClause);
sendToUrl(url);
}

This works for IE. I do not know what the code is saying but I know by intuition and guts that this above portion is why it won't work with Mozilla. Can anyone care to explain to me?

7:44 pm on Aug 27, 2003 (gmt 0)

WebmasterWorld Senior Member korkus2000 is a WebmasterWorld Top Contributor of All Time 10+ Year Member



That part seems OK. Did you declare url? Like:

var url;

8:04 pm on Aug 27, 2003 (gmt 0)

10+ Year Member



No I didn't. Where should I put it? outside the Javascript code or outside the function or within the function code?

why do you think this may be the reason? I am just curious.

11:57 pm on Aug 27, 2003 (gmt 0)

WebmasterWorld Senior Member korkus2000 is a WebmasterWorld Top Contributor of All Time 10+ Year Member



Like this:

{
var url = "{{sub_prefix}}/servlet/DisplayServlet?url=srchByKeywordURL&search=search2&whereClause=" + escape(whereClause);
sendToUrl(url);
}

Just that some javascript parsers require variable declaration, just as some require semicolons at the end of statements. It is a long shot that this is the problem, but it seems to be the only problem I could find with the code.

2:38 pm on Aug 28, 2003 (gmt 0)

10+ Year Member



I figured out. It wasn't the code I posted, go figure. It was the declarion of form and the use of form in methods.

For example, you would normally write in HTML:

document.searchForm.blah.blah or document.searchForm.blah

In the javascript code, the above code was included except for the word, "document". Strangley this omission doesn't affect IE but it affected Mozilla. So in the javascript code, i added the word, "document." to every formname, "searchForm".

I hope it is clear to you. Sorry for all the trouble.

 

Featured Threads

Hot Threads This Week

Hot Threads This Month