Log in

View Full Version : Client Side Javascript works offline, but not online



aliyak
02-07-2013, 11:45 PM
I got a script for a client side search engine that works, or worked awesome.

it seems almost as if this happened overnight that the script no longer worked online. I have NO idea why. I didn't change anything, it just stopped displaying the results, and in the search bar displayed this: (none). So of course i started changing things here and there and still nothing. So i reverted everything on my site back to what it was originally.
First i thought it wasn't compatible with IE anymore, so i went to the site i dled the script from, and uploaded the original, unedited version onto my server. It WORKS.
Cool. So i get brave and I replace the jse_search.js with my version, lo and behold it WORKS.

top right side of the page is the search bar, you can view the script (not) in action here:
http://www.calgarymuslims.ca/Main.html

and the original i uploaded with my search results in place, you can search "t" and it will display all current results.
http://www.calgarymuslims.ca/New%20folder/form.html

so i know that there can't be anything wrong with the actual javascript because they work on the second link.
I have NO CLUE anymore. My brain is so fried at this point, i would LOOVE some insight.
Thx in advance :o

traq
02-08-2013, 12:06 AM
You don't have the jse_search.js file in your site root.

aliyak
02-08-2013, 06:46 PM
I do, it's in the subfolder 'Javascripts', as directed in the script. I tried what you suggested, still didn't work.

aliyak
02-08-2013, 08:58 PM
nothin? :(
Why does it work offline?? It's just weird that it died online suddenly when it was working last week without any issues...
I've never had a problem like this before :(
please help me out..

traq
02-08-2013, 09:20 PM
I do, it's in the subfolder 'Javascripts', as directed in the script. I tried what you suggested, still didn't work.

No: it's in a subfolder, therefore, it's not in the site root.

Your script is looking for it with a relative path: jse_search.js. This works in your "working" demo because there is a copy of that script at /New%20folder/jse_seacrh.js.

You either need to change the path in your (non-working) script to point at that file (or, at /Javascripts/jse_search.js), or move/copy the file to /jse_search.js. Did you try either of those solutions?

aliyak
02-08-2013, 09:34 PM
i still dont get it. I tried both of your suggestions and it didn't work.
I redirected the results to the one in the "new folder" and it worked... i have no idea what happened..

aliyak
02-08-2013, 09:51 PM
i still dont get it. I tried both of your suggestions and it didn't work.
I redirected the results to the one in the "new folder" and it worked... i have no idea what happened..

okay, i put the JSs into the root, now the page will load, but no results.... changed everything to (src="jse_search.js").

Back to square one.. Search results displaying no results and (none) in the search bar.

traq
02-09-2013, 02:20 AM
...I redirected the results to the one in the "new folder" and it worked.
So, using the script at /New%20folder/jse_search.js worked successfully?
(BTW, I'd highly recommend not using spaces in your URLs.)


okay, i put the JSs into the root, now the page will load, but no results.... changed everything to (src="jse_search.js").

Back to square one.. Search results displaying no results and (none) in the search bar.
I'm not sure. This is a pretty old script; have you considered using something like google site search (http://www.google.com/enterprise/search/products_gss.html) instead?

aliyak
02-09-2013, 03:21 AM
So, using the script at /New%20folder/jse_search.js worked successfully?
(BTW, I'd highly recommend not using spaces in your URLs.)


I'm not sure. This is a pretty old script; have you considered using something like google site search (http://www.google.com/enterprise/search/products_gss.html) instead?

Guess I will have to come into the new age. Lol
Well an honest Thx for all your efforts friend :)