Results 1 to 9 of 9

Thread: Client Side Javascript works offline, but not online

  1. #1
    Join Date
    Feb 2013
    Posts
    7
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Unhappy Client Side Javascript works offline, but not online

    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

  2. #2
    Join Date
    Apr 2008
    Location
    So.Cal
    Posts
    3,643
    Thanks
    63
    Thanked 516 Times in 502 Posts
    Blog Entries
    5

    Default

    You don't have the jse_search.js file in your site root.

  3. #3
    Join Date
    Feb 2013
    Posts
    7
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    I do, it's in the subfolder 'Javascripts', as directed in the script. I tried what you suggested, still didn't work.

  4. #4
    Join Date
    Feb 2013
    Posts
    7
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Exclamation

    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..

  5. #5
    Join Date
    Apr 2008
    Location
    So.Cal
    Posts
    3,643
    Thanks
    63
    Thanked 516 Times in 502 Posts
    Blog Entries
    5

    Default

    Quote Originally Posted by aliyak View Post
    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?

  6. #6
    Join Date
    Feb 2013
    Posts
    7
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    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..

  7. #7
    Join Date
    Feb 2013
    Posts
    7
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by aliyak View Post
    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.
    Last edited by aliyak; 02-09-2013 at 12:40 AM.

  8. #8
    Join Date
    Apr 2008
    Location
    So.Cal
    Posts
    3,643
    Thanks
    63
    Thanked 516 Times in 502 Posts
    Blog Entries
    5

    Default

    Quote Originally Posted by aliyak View Post
    ...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.)

    Quote Originally Posted by aliyak View Post
    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 instead?

  9. The Following User Says Thank You to traq For This Useful Post:

    aliyak (02-09-2013)

  10. #9
    Join Date
    Feb 2013
    Posts
    7
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by traq View Post
    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 instead?
    Guess I will have to come into the new age. Lol
    Well an honest Thx for all your efforts friend

Similar Threads

  1. how api works client side
    By morplug in forum JavaScript
    Replies: 3
    Last Post: 10-03-2011, 02:39 AM
  2. Anylink dropdown menu works offline but not online
    By southerncrow in forum Dynamic Drive scripts help
    Replies: 4
    Last Post: 09-03-2011, 03:37 AM
  3. Replies: 1
    Last Post: 03-10-2009, 08:54 AM
  4. Online/Offline script help
    By cursed in forum PHP
    Replies: 6
    Last Post: 12-23-2006, 03:14 AM
  5. Online vs Offline - Differances?
    By tacmig99 in forum JavaScript
    Replies: 0
    Last Post: 10-19-2006, 09:38 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •