Advance software forum
May 18, 2012, 07:54:55 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   Help Search Login Register  
Pages: [1]   Go Down
  Print  
Author Topic: Ajax Search  (Read 1040 times)
0 Members and 2 Guests are viewing this topic.
randy
Newbie
*
Offline Offline

Posts: 3


View Profile
« on: February 02, 2009, 11:19:15 PM »

I have installed the seach box function but it loads part of the code from the end of line 293 on i.e.

Code:
";
  // if the searched for keyword is not in the cache then add it to the cache
  if(!oCache[keyword] && keyword)
    addToCache(keyword, results_array);
  // if the array of results is empty display a message
  if(results_array.length == 0)
  {
    div += "<tr><td>No results found starting with <strong>" + keyword +
           "</strong></td></tr>";

The part before the "; is var div = "<table>";
If I take the statement out the error goes away but of course the ajax does not work.

Any ideals?
Logged
Alex
Administrator
Full Member
*****
Offline Offline

Posts: 128


View Profile
« Reply #1 on: February 03, 2009, 06:19:02 AM »

Hello randy,

The
Code:
  var div = "<table>";
is used to display the results later, so it cannot be deleted.
I wonder what error do you have? This line should stay...
Logged
randy
Newbie
*
Offline Offline

Posts: 3


View Profile
« Reply #2 on: February 03, 2009, 08:02:13 PM »

Maybe because of a custom theme. See a screen shot at http://www.naturefarmsfarriersupply.com/error_search.jpg
Logged
Alex
Administrator
Full Member
*****
Offline Offline

Posts: 128


View Profile
« Reply #3 on: February 04, 2009, 08:25:43 AM »

Hmm, if the code is displayed, it means that it was not properly installed I guess.. or any other reason. The code should be processed, not displayed. Maybe you have STS or BTS installed? If yes, these template systems uses other algorithm to include javascripts into code... and
installation will differ a lot from a simple Osc ms2.2 this contribution is for...
Logged
randy
Newbie
*
Offline Offline

Posts: 3


View Profile
« Reply #4 on: February 04, 2009, 09:05:30 AM »

Yes it is the STS then. Thanks!!
Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 3.1.1 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!