Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


getURL and problems with appending special characters to url in flash

Posted on 2010-01-12
Medium Priority
Last Modified: 2013-11-11
I've got a code for a button which takes variable search_text from the input field and appends this text to the following url:

So if user put in search field 'zuastnte', url should be submitted through getURL in the following form:

It works well if I type something in Latain alphabet, but problem arise if I type something in Cyrillic or other alphabet that contains special (local) characters.

If I'll type 'zuastnte' I'm receiving url like this:

In the other words, all special characters are becoming a normal ones...
Do I need to encode somehow my url?
Please help.

Many thanks in advance!

on (release, keyPress "<Enter>")
    if (search_text != "" && search_text != " " && search_text != undefined)
		var newURL = ""+search_text;
        getURL(newURL, "GET");

Open in new window

Question by:lokigfx
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 37

Expert Comment

ID: 26295101
Basically you have to encode all the special characters into something that HTML won't mess with...  AS2 does not have encodeURI() function, so you have to come up with your own function to convert them...

LVL 14

Accepted Solution

Designbyonyx earned 2000 total points
ID: 26308230
If you are using AS2, you would do the following:
on (release, keyPress "<Enter>")
    if (search_text != "" && search_text != " " && search_text != undefined)
                var newURL = ""+ escape(search_text);
        getURL(newURL, "GET");

Open in new window


Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is a very simple example to help those of you who are still migrating from AS2 to AS3 understand the redesigned event model in AS3. In AS2.0, event functions (that is, the function to be performed when an event is fired) were stored as a pro…
I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
The goal of the tutorial is to teach the user how to live broadcast using Flash Media Live Encoder and connecting it to YouTube to broadcast. Log into your Youtube account, choose live stream settings, start live stream from Flash Media Live Enc…
The goal of the tutorial is to teach the user what frame rate is, how to control it and what effect it has on the video.
Suggested Courses

715 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question