Adobe Dreamweaver Forums



Last 10 THreads :         Help with Dreamweaver CS4 (Last Post : admin - Replies : 1 - Views : 29 )           »          CreateODBCDate and cfqueryparam with cf_sql_date (Last Post : hannibalcanibal - Replies : 0 - Views : 1 )           »          Load bmp images in a flex app (Last Post : eholz1 - Replies : 0 - Views : 1 )           »          Problem with "Title" and DW CS4 (Last Post : Murray *ACE* - Replies : 1 - Views : 2 )           »          Snippet Pod Problems (Last Post : Pat@ffic - Replies : 2 - Views : 3 )           »          DDX generated PDF Table of Contents issue (Last Post : Flashm@n - Replies : 0 - Views : 1 )           »          Array of Queries (Last Post : ptrott - Replies : 3 - Views : 4 )           »          image alignment (Last Post : alexander glomba - Replies : 0 - Views : 1 )           »          Importing Iweb to Dreamweaver (Last Post : tllearner - Replies : 2 - Views : 3 )           »          How to I get an FLV Skin to display on external sites? (Last Post : QADesign - Replies : 0 - Views : 1 )           »         


User Info Statistics
Go Back   Adobe Dreamweaver Forums > Macromedia Software > Flex
 
Tags:



Reply
  #1 (permalink)  
Old 11-19-2008, 10:53 PM
Developer504
 
Posts: n/a
Diggs:
Default Passing data in paramaters

Ok I have this HTTPService, works fine. I have been passing hard-coded values
"A" and "B", but now I want to pass a value in a variable. I don't understand
the syntax though. I've tried a couple things with no luck. What is the
syntax (and where might I have been able to find it I couldn't find anything
like this on the help or web pages)

<mx:HTTPService id="SetPilot"
url="http://localhost/magic94scripts/mgrqcgi94.exe "
method="POST"
useProxy="false">
<mx:request>
<appname>NOBRAWeb</appname>
<prgname>SetPilot</prgname>
<arguments>param1, param2</arguments>
<param1>A</param1>
<param1>B</param1>
</mx:request>
</mx:HTTPService>



Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 11-19-2008, 11:03 PM
Amy Blankenship
 
Posts: n/a
Diggs:
Default Re: Passing data in paramaters


"Developer504" <webforumsuser@macromedia.com> wrote in message
news:gg25bp$5tv$1@forums.macromedia.com...
> Ok I have this HTTPService, works fine. I have been passing hard-coded
> values
> "A" and "B", but now I want to pass a value in a variable. I don't
> understand
> the syntax though. I've tried a couple things with no luck. What is the
> syntax (and where might I have been able to find it I couldn't find
> anything
> like this on the help or web pages)
>
> <mx:HTTPService id="SetPilot"
> url="http://localhost/magic94scripts/mgrqcgi94.exe "
> method="POST"
> useProxy="false">
> <mx:request>
> <appname>NOBRAWeb</appname>
> <prgname>SetPilot</prgname>
> <arguments>param1, param2</arguments>
> <param1>A</param1>
> <param1>B</param1>
> </mx:request>
> </mx:HTTPService>
>


<mx:HTTPService id="SetPilot"
url="http://localhost/magic94scripts/mgrqcgi94.exe "
method="POST"
useProxy="false">
<mx:request>
<appname>NOBRAWeb</appname>
<prgname>SetPilot</prgname>
<arguments>param1, param2</arguments>
<param1>{thing1}</param1>
<param1>{thing2}</param1>
</mx:request>
</mx:HTTPService>

Assuming thing1 and thing2 are bindable variables.


Reply With Quote
  #3 (permalink)  
Old 11-20-2008, 05:03 PM
Developer504
 
Posts: n/a
Diggs:
Default Re: Passing data in paramaters

Ok thanks Amy that was simple enough!

I have another question now though. I have this executing, it runs on an
on-click event. It is calling my external app, and writing data to it just
fine. But then after it does that I get an error message 1090 "XML Parser
element is malformed"

The difference between this and my other WS calls, is that in this case I am
only setting a value I don't want any data back from the external app. I am
then going to call another Flex program SWF file to run a report so it opens in
a new window.



Reply With Quote


  #4 (permalink)  
Old 11-20-2008, 05:43 PM
Amy Blankenship
 
Posts: n/a
Diggs:
Default Re: Passing data in paramaters


"Developer504" <webforumsuser@macromedia.com> wrote in message
news:gg453m$nav$1@forums.macromedia.com...
> Ok thanks Amy that was simple enough!
>
> I have another question now though. I have this executing, it runs on an
> on-click event. It is calling my external app, and writing data to it
> just
> fine. But then after it does that I get an error message 1090 "XML Parser
> element is malformed"


Possibly your back end page is sending back a response anyway.


Reply With Quote
  #5 (permalink)  
Old 11-20-2008, 06:07 PM
Developer504
 
Posts: n/a
Diggs:
Default Re: Passing data in paramaters

[/quote]Possibly your back end page is sending back a response anyway.
[/q]

Perhaps. I changed it so it sent something back (even though I don't need
anything back) and now it works without any errors so no big deal I guess.

D.



Reply With Quote
  #6 (permalink)  
Old 11-20-2008, 07:53 PM
Developer504
 
Posts: n/a
Diggs:
Default Re: Passing data in paramaters

Ok now I have another problem... a really strange one.

Flex seems to be doing some things out of order or something, it's sending the
wrong value.

I have this handler for my on-click event:

public function goUrlTFP(event:ChartItemEvent):void {
/* rptWebsite=ceDs.@rptUrl */
thing1=event.hitData.item.thing;
SetPilot.send();
rptWebsite="TurnData_PR.swf";
return navigateToURL(new URLRequest(rptWebsite))
}

Where "thing1" is a bindable variable used as the paramter being passed in my
HTMLmerge per above.

So that when the user clicks on one of the bars on my barChart, this is
supposed to do the following:

1) set the current value of the bar clicked on into 'thing1'
2) run the HTTPService call to write this value to my external App
3) navigate to the other SWF file which will interract with the external App
based on this value.

The problem is, instead of sending the value for the particular record the
client clicked on, it always sends the first record. But what is really
strange is, to debug this, I put a variable on the form to show what value was
in 'thing1', and it shows the correct value, (the value that they clicked on)

It seems like Flex is doing the call to the HTTPService before it has
set the variable, even though it's supposed to happen after based on the code I
wrote. Is this what is happening, and if so, what is the work-around for this?

D.

Reply With Quote


  #7 (permalink)  
Old 11-20-2008, 08:23 PM
Developer504
 
Posts: n/a
Diggs:
Default Re: Passing data in paramaters

Scratch that it was a problem with my external app, this is working perfect now.
Reply With Quote
  #8 (permalink)  
Old 11-20-2008, 08:42 PM
Amy Blankenship
 
Posts: n/a
Diggs:
Default Re: Passing data in paramaters


"Developer504" <webforumsuser@macromedia.com> wrote in message
news:gg4f38$6de$1@forums.macromedia.com...
> Ok now I have another problem... a really strange one.
>
> Flex seems to be doing some things out of order or something, it's sending
> the
> wrong value.
>
> I have this handler for my on-click event:
>
> public function goUrlTFP(event:ChartItemEvent):void {
> /* rptWebsite=ceDs.@rptUrl */
> thing1=event.hitData.item.thing;
> SetPilot.send();
> rptWebsite="TurnData_PR.swf";
> return navigateToURL(new URLRequest(rptWebsite))
> }
>
> Where "thing1" is a bindable variable used as the paramter being passed in
> my
> HTMLmerge per above.
>
> So that when the user clicks on one of the bars on my barChart, this is
> supposed to do the following:
>
> 1) set the current value of the bar clicked on into 'thing1'
> 2) run the HTTPService call to write this value to my external App
> 3) navigate to the other SWF file which will interract with the external
> App
> based on this value.
>
> The problem is, instead of sending the value for the particular record the
> client clicked on, it always sends the first record. But what is really
> strange is, to debug this, I put a variable on the form to show what value
> was
> in 'thing1', and it shows the correct value, (the value that they clicked
> on)
>
> It seems like Flex is doing the call to the HTTPService before it
> has
> set the variable, even though it's supposed to happen after based on the
> code I
> wrote. Is this what is happening, and if so, what is the work-around for
> this?


What is the data type of thing1?


Reply With Quote
  #9 (permalink)  
Old 11-20-2008, 09:13 PM
Developer504
 
Posts: n/a
Diggs:
Default Re: Passing data in paramaters

It was a string, but this is fixed now don't worry about it.
Reply With Quote


  #10 (permalink)  
Old 11-20-2008, 09:13 PM
Developer504
 
Posts: n/a
Diggs:
Default Re: Passing data in paramaters

It was a string, but this is fixed now don't worry about it.
Reply With Quote
Reply


Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



© Camley Interactive (camley.info) 2008 - all logos and images are copywrite their respective owners.
Proud member of the Camley Interactive Network
All times are GMT. The time now is 11:10 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.
Cheap Car Insurance - Compare Motor Insurance
Endsleigh Car Insurance Natwest Car Insurance
More Than Car Insurance Norwich Union Car Insurance
Prudential Car Insurance Zurich Car Insurance
Inactive Reminders By Mished.co.uk