Ask a Question related to Macromedia Flex General Discussion, Design and Development.
-
ruchir123 #1
getURL() not working as expected
Hello,
We have a requirement where homepage of the site will be specific to a
country. When a first time user navigates to the site(say, [url]www.abc.com[/url]),
he/she will select country from the list of countries and he/she will be
navigated to the homepage of that country([url]www.abc.com/countryx[/url]). This means
that repeat user will get the homepage of countryx when the user types
[url]www.abc.com[/url]. I am trying to achieve this through the code attached but the call
to getURL() is not working.
Any help will be greatly appreciated.
Thanks,
Ruchir
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml" width="1449"
height="602"
initialize="saveInfo()">
...
...
...
function saveInfo() {
userSelectedItem=SharedObject.getLocal("ComboCBS") ;
if (userSelectedItem==null)
{
mx.controls.Alert.show("Cannot create shared object",
"Error");
}
else {
if (userSelectedItem.data.name!=undefined)
CombCB.selectedIndex=userSelectedItem.data.name;
cntry = userSelectedItem.data.name;
if (cntry==1) {
getURL('http://localhost:8700/flex/Technical_Information.htm','_blank');
}
}
}
ruchir123 Guest
-
onDisconnect not working as expected on IE7
I have an application for a poker game which works perfectly in Firefox 1.5 and 2.0, however in IE7 (not too sure about IE6 thou) there is a serious... -
I need help please with the getURL() it is not working.
I was able to make this work in the earler ver. of Flash. But when the movie ends it will not goto the url that I am telling it to goto. Is there... -
setStyle() not working as expected
Hello, I have a need when a mouse pointer hovers over a vbox container, the backgroundColor property should be changed to a gray color and when... -
getURL taregt not working ...PLEASE HELP
Hello, I am working on a flash front end for a web based app (ColdFusion is the app server) and I have a "getURL" link with a target. The problem... -
getUrl and javascript now working in a frame
Hey, I have a flash page that uses getUrl to call a javascript function that is on the same html page. When I load this html page all on it's own,... -
peterent #2
Re: getURL() not working as expected
The call to 'http://localhost:8700/flex/Technical_Information.htm' is not
working? First try putting that as the event handler of a button and see what
happens when you press the button:
<mx:Button label="Test"
click="getURL('http://localhost:8700/flex/Technical_Information.htm')" />
Post any error messages you are getting. Make sure you can also reach this
same page in a browser without going through Flex.
peterent Guest
-
ruchir123 #3
Re: getURL() not working as expected
Hello Peter,
I have replaced the technical_information.htm with "usa.mxml" in the code
example i have pasted in original posting. Now something strange is happening.
If I invoke following URL from Internet Explorer it works just fine. It also
works fine from flex.
[url]http://localhost:8700/flex/usa.mxml[/url]
however if I invoke this one(mentioned below). It will show me an error. This
also does NOT work from flex.
[url]http://localhost:8700/flex/uk.mxml[/url]
There is absolutely no difference between two mxml file layout and design.
The error it showes for uk.mxml
=============================================
The page cannot be found
The page you are looking for might have been removed, had its name changed, or
is temporarily unavailable.
--------------------------------------------------------------------------------
Please try the following:
If you typed the page address in the Address bar, make sure that it is spelled
correctly.
Open the localhost:8700 home page, and then look for links to the information
you want.
Click the Back button to try another link.
Click Search to look for information on the Internet.
HTTP 404 - File not found
Internet Explorer
---------------
ruchir123 Guest
-
ruchir123 #4
Re: getURL() not working as expected
I forgot to mention that both mxml files are physically located in the same folder.
Thank you.
Ruchir
ruchir123 Guest
-
peterent #5
Re: getURL() not working as expected
The only reason you should get a 404 is that the file is not on the server. It may be in your working folder, but you probably forgot to push it to the server.
peterent Guest
-
ruchir123 #6
Re: getURL() not working as expected
Thanks Peter,
Actually all files were located under same folder, however, I did not "build"
mxml pages for uk.mxmi after designing it. I was simply calling it thru my
homepage. After I ran build process on the uk.mxml, it worked just fine.
Thank you very much for your help.
Ruchir
ruchir123 Guest



Reply With Quote

