Home Tutorials Forums Articles Blogs Movies Library Employment Press

Go Back   ActionScript.org Forums > Flex > Flex 2, 3 & 4

Reply
 
Thread Tools Rate Thread Display Modes
Old 04-24-2007, 07:50 PM   #1
MadamZuZu
Xrum!
 
Join Date: Apr 2007
Posts: 68
Default Calling a URL

hi

this is a very stupid newby question.

i can't figure out how to call a url on a click on a button, i understand that i need to have httpservices... so i have htis:

<mx:HTTPService id="sanData"
url="{myURL}"/>

but, what do i put for "onclick"?

Thanks!
MadamZuZu is offline   Reply With Quote
Old 04-24-2007, 08:02 PM   #2
MadamZuZu
Xrum!
 
Join Date: Apr 2007
Posts: 68
Default

this is what i'm doing:
Code:
<mx:Script>
<![CDATA[
  public function submitForm():void
  {
  	formSender.send();
   }
]]>
</mx:Script>

	<mx:HTTPService id="formSender" 		url="http://google.com"/>
and this is what im getting:

[RPC Fault faultString="Error #1090: XML parser failure: element is malformed." faultCode="Client.CouldNotDecode" faultDetail="null"]
at mx.rpc.http::HTTPService/http://www.adobe.com/2006/flex/mx/internal:rocessResult()
at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::resultHandler()
at mx.rpc::Responder/result()
at mx.rpc::AsyncRequest/acknowledge()
at :irectHTTPMessageResponder/completeHandler()
at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunctio n()
at flash.events::EventDispatcher/dispatchEvent()
at flash.net::URLLoader/flash.net:URLLoader:nComplete()
MadamZuZu is offline   Reply With Quote
Old 04-24-2007, 09:21 PM   #3
dr_zeus
Feathers
 
dr_zeus's Avatar
 
Join Date: Mar 2005
Location: Silicon Valley
Posts: 1,999
Default

Do you want the browser to load google.com? If this is the case, you don't want to use HTTPService. Instead, you want to use the navigateToURL function. The HTTPService is meant to load the actual content from an URL, such as XML data, into a Flex application.
__________________
Josh Tynjala | Feathers

Last edited by dr_zeus; 04-24-2007 at 09:23 PM.
dr_zeus is offline   Reply With Quote
Old 04-25-2007, 01:07 AM   #4
MadamZuZu
Xrum!
 
Join Date: Apr 2007
Posts: 68
Default

perfect! thank you
MadamZuZu is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Loading URL onto a button that is loaded through Loader component with XML amfx Components 0 04-09-2007 10:54 PM
Changing HTTPService url at runtime? abeall Flex 2, 3 & 4 1 04-02-2007 04:30 PM
Testing URL mzjosh ActionScript 2.0 5 03-28-2007 06:49 PM
SetInterval & calling functions simonboris ActionScript 1.0 (and below) 15 12-18-2003 03:20 PM
Calling functions btw levels RealBBoy ActionScript 1.0 (and below) 9 10-23-2001 02:21 PM


All times are GMT. The time now is 03:25 AM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.