Jump to content
This site uses cookies! Learn More

This site uses cookies!

armedunity.com uses cookies to improve user experience.

By continuing to use this site, you agree to allow us to store cookies on your computer.

  • 0
Sign in to follow this  
LeviMoore

Opening local html in browser loose everything from '?' and

Question

Hi

I'm trying to make a search function that search in the documentation and it works fine for online search, but when i search the local files it won't work.

The long and the short of it is that i have a html resource that the user can search in through my code.

If they search for 'horce' my code will generate an url looking something like this:

Please login or register to see this link.

and it works.

But if there is no internet connection they can search in a local version of the files on their maschine so the url will look something like:

file:///my/path/to/local/file/search.html?q=horse

But when i try to load the url to the local path it load the page with the url: file:///my/path/to/local/file/search.html

It has simply ignored everything from the '?' and to the end.

If I past the full path in to my browser it works fine.

The relevant part of my code looks like this:

Please login or register to see this code.

The variable _text i the word the user will be searching for, and the variables localScriptDocURL and webScriptDocURL is the path to the local version and the internet version respectively.

Share this post


Link to post
Share on other sites

1 answer to this question

Recommended Posts

  • 0

an ideas is when you have builded your game on a stand alone (client) you need to put in your html at the end in the file which it will generate then the url has to be (your gamename)_Data/(html document name )

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...