aspose file tools*
The moose likes Flex and the fly likes Issue while Posting data using navigateToURL Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Frameworks » Flex
Bookmark "Issue while Posting data using navigateToURL" Watch "Issue while Posting data using navigateToURL" New topic
Author

Issue while Posting data using navigateToURL

Jhakda Velu
Ranch Hand

Joined: Feb 26, 2008
Posts: 166
Hi
I have to open a link in a new window on click of a button. I used the navigateToURL method in conjunction with URLRequest() and URLVariables in the following manner:

where mywebsite is the link that i wish to open, by passing the params.'data' is the object holding the necessary details.
I had put alerts to check data getting passed

However, in my jsp, when i try to extract the parameters using

etc, i get it as null, ie, i am unable to retrieve the parameters.

What could have gone wrong?
The same code works in my local.

However, if i pass the same by appending the params to the URL, it works

http://mywebsite?c=8&empId=data.EmpId etc

The swf is hosted in a non secure application and we are trying to open the link which is in a secure environment.
I have alerted the params being passed and it is as expected.

Any pointers as to why its not working will be appreciated.

Thanks in advance
Jhakda


If I become filthy rich, I'll sponsor research for painless dental treatment at Harvard Medical School. Thats why,I'm learning Java.I have 32 teeth, 22 are man made.
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

Is this an ActionScript question?


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Jhakda Velu
Ranch Hand

Joined: Feb 26, 2008
Posts: 166
Yes, it is.
I should have mentioned.

Jhakda
Satish Kore
Author
Ranch Hand

Joined: Feb 10, 2004
Posts: 43
I don't see any obvious reason on why your parameters are not forwarded to the secured page. However I tried this scenario on my setup and here is what I found out.

If you are using self-signed certificate then Internet Explorer will show you warning page that it does not trust the certificate and this warning is shown before actually invoking your secure URL. At this point IE actually has lost all the parameters that you have passed in your POST request. Firefox seems to be smart since it reposts the request once you confirm the certificate warning message and hence it works on Firefox. But IE8 does not repost the request for some reason.

So once you confirm the certificate warning just hit refresh on your Flex application IE window again and it should work this time, test it.

I don't have any solution to this but workaround is to trust and install the certificate into your browser permanently and it should solve your problem for now.

Thanks,

Satish Kore
"Flex 3 with Java" @ packtpub.com and amazon.com
Jhakda Velu
Ranch Hand

Joined: Feb 26, 2008
Posts: 166
Hi
Thanks for responding.
Satish, you are right, IE looses the parameters that are set. The app was redirecting to the login page.
Thanks for your time

Regards
Jhakda
Kingsley Long
Greenhorn

Joined: Apr 24, 2012
Posts: 1
try navigateToURL(url,"_self");
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Issue while Posting data using navigateToURL