 |
|
|
| View previous topic :: View next topic |
| Author |
Message |
Noru66
Joined: 08 Aug 2007 Posts: 1
|
Posted: Wed Aug 08, 2007 4:32 pm Frame, form and encoding string |
|
|
|
Hi Everyone.
I hope some one will be able to help me. I put this post in this section, but may be I should put in HTML form or somewhere else. But actually it deals with frames and forms...
Anyway, here is the context. I try to put in my website a search engine. This search engine parse a xml file and return the results.
The information contained in the xml file is both in english and in japanese.
Here is the format of my website:
- a upper frame called "permanent"
- a lower frame divided in two parts
- left part called "tree"
- right part called "content"
For my search engine, I created two versions.
version 1:
- I create a page called "research". This page is accessible in the "content" frame.
It contains:
- the search form (text input and submit button). The method is get, so I can get the input text in the URL
- a little script to encode the URL (using encodeURIcomponent)
- the search script (it use decodeURIcomponent and parse the xml file)
With this version, it work very well and I can look for english and japanese. Japanese is well encoded.
version 2:
- To make the site cooler, I tried to put my search form in the "permanent" frame, so that it is always accessible. The encoding and search scripts remain in the "search" page, in "content" frame, like in the version 1. The result is that I can still search in english but not in japanese anymore.
It appears that the encoding is not executed anymore, and the input string is directly send to the search script, and this does not work if the string is Japanese.
For example I entered the string "Nissan" because of the new skyline ^_^
So in version 1 is encoded like that %E6%97%A5%E7%94%A3. But in version 2 it is encoded like that %93%FA%8EY.
It is totally different!
I have no idea about how to fix it. But I want to understand how this work and how to fix it.
Of course, if I fail, I got the version 1, less cool but fully operationnal ^_^
I hope I made myself clear. I am waiting for your comments. |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|
|
 |
|
|
|
|
|
|