Insert variables from script into HTTPService url
I'm trying to insert values from script into a HTTPService
url. How do I go about doing this? I tried the code below, but it
gives an error. Can anybody help?
<mx:HTTPService
id="httpCall"
url="
http://api.service.com/user/{userName}/list?count={apiCount}&offset={(apiOffset)}&sort={ap iSort}&appkey=1234"
resultFormat="e4x"
result="callHandler(event);"
fault="httpFaultHandler(event);"
showBusyCursor="true"
/>
<mx:Script>
<![CDATA[
import mx.controls.Alert;
import mx.rpc.events.FaultEvent;
import mx.rpc.events.ResultEvent;
[Bindable]
private var userName:String = "myName";
private var apiCount:uint = 10;
private var apiOffset:uint = 0;
private var apiSort:String = "desc";
Set the HTTPService properties in an AS function.
<mx:HTTPService id="httpCall" resultFormat="e4x" ...
result="callHandler(event);" ...../>
private function getUserData():void
var sURL:String = "
http://api.service.com/user/"
_ userName + "/list:;
var oRequest:Object = {count:apiCount,offset:apiOffset,
sort:apiSort, appkey:"1234" }
httpCall.url = sURL;
httpCall.send(oRequest);
Tracy
Similar Messages
-
Unable to insert photos from iPhoto into a Word document. File "iPhoto Library" is greyed out and won't let me choose it.
Choose it from where? See this user tip by Terence Devlin for how to access photos for use outside of iPhoto: How to Access Files in iPhoto
Have you tried dragging the photo from the iPHoto window into the open Word document window?
OT -
Applescript "go to" command or pull variables from script?
Is there a "go to line" command in Applescript? I want to be able to create a dialog box to jump back to the previous box if a mistake was made. I don't want to do a repeat because that will cause multipule chained repeats and it won't work. I tried creating seperate scripts and that works fine for jumping around within the program. But the variables get lost when a new script is ran. is there a way to bring variables from other scripts into one script?
This is what I have right now. as you can see there are 3 variables that carry the needed info. U
ltimatley I'd like to have about 8 variables, all with different info.
I can do a repeat for each one until something is entered, but I cant do a back command for each entry.
That's the purpose for the "run 'script'" line in each section. I'd have to do a repeat inside of a repeat and then overlapping repeats.
It won't let me do overlapping repeats. what's the solution?
run script fn
script fn
set first_name to ""
set fName to display dialog "first name" default answer "" buttons {"cancel", "next"} default button "next"
set first_name to text returned of fName
if first_name = "" then
run fn
end if
end script
-- Last Name
run script ln
script ln
set last_name to ""
set lName to display dialog "last name" default answer "" buttons {"back", "cancel", "next"} default button "next"
if button returned of lName = "next" then
set last_name to text returned of lName
else if button returned of lName = "back" then
run fn
end if
if last_name = "" then
run ln
end if
end script
-- street number
run script sn
script sn
set s_num to ""
set sNum to display dialog "street number" default answer "" buttons {"back", "cancel", "next"} default button "next"
if button returned of sNum = "next" then
set s_num to text returned of sNum
else if button returned of sNum = "back" then
run ln
end if
if s_num = "" then
run sn
end if
end script
-- ready steady write!
display dialog first_name & last_name & s_num -
Loading Variables from ASP into Flash
I can find plenty of tutorials detailing how to load
variables from a defined asp page into Flash, but here's my
dilemma...
I have an asp page that is reading a URL with a unique
identifier in it (www.sampleURL.com?id=123456), and then turns the
id number from the URL into a variable. On the same page then, sits
my swf where I need to use LoadVars to pull in that ASP variable
via Actionscript. If I don't have a static asp page to pull the
variables in from and I want to pass the variable within the same
asp page the swf is located on, how do I do it? Many thanks in
advance..."bonzomn65" <[email protected]> wrote in
message
news:ej0630$pjh$[email protected]..
>I can find plenty of tutorials detailing how to load
variables from a
>defined
> asp page into Flash, but here's my dilemma...
>
> I have an asp page that is reading a URL with a unique
identifier in it
> (www.sampleURL.com?id=123456), and then turns the id
number from the URL
> into a
> variable. On the same page then, sits my swf where I
need to use LoadVars
> to
> pull in that ASP variable via Actionscript. If I don't
have a static asp
> page
> to pull the variables in from and I want to pass the
variable within the
> same
> asp page the swf is located on, how do I do it? Many
thanks in advance...
>
You don't need LoadVars for this at all. You can just pass
the variable to
your Flash movie by specifying a query string when you are
calling the
movie.
If you are using the straight object, embed method then it
would look
something like this:
<param name="movie" value="movie.swf?id=11111">
<embed src="movie.swf?id=11111" ... >
If you are using the ActiveContent JavaScript for your movie
then you just
leave off the .swf... so
"name", "movie?id=11111"
Then, in flash you can access the value of id from the _root,
like
var idInFlash:Number = _root.id;
Of course in the above example you would replace 11111 with
the proper
syntax for printing a variable's value in ASP. -
Scripting - Passing and Enterprise variable from script to script
Hello all,
We are using UCCX 7.0_SR5
I am looking to be able to pass a captured variable from one script to another.
We use a message in queue where a caller waiting in queue can choose to leave a message and then that message is queued back into the sytem for the next available agent. When that agent recieves the message in queue they basically call back out to the customer leaving the message.
We capture a variable in the first script when they decide to leave a message. The variable holds the call back number that they enter into the system. There is a second script that presents these message in queue calls to the agents. We would like to pass that variable that holds the number enterend by the customer to the second script so that that number appears on CAD in the enterprise data fields. The reason behind this is so the agent has a number to call back in the event they don't reach anyone when the system calls back out and the message left by the customer does not contain a call back number.
How can I pass that variable from one script to another so it can be presented in CAD for the agents?
Thanks for any help and let me know if you need any further information.You would use a "Get Call Contact Info" step to set your callerID variable, where the "Calling Number" attribute is set to your callerID variable.
-
Inserting data from Textarea into database
I am collecting data from a html form which has textarea and processing it through servlet.
If I enter text in textarea without breaks(without pressing enter tab) it is being collected and correctly put into database.
If I enter text with breaks (with pressing enter tabs for entering in separate lines) it is being collected correctly but only one line goes into database.
How to insert entire text from textarea into database.
bye
Kaushikproblem is not yet solved.
i am able to print in the sql query and is displayomg all the chars. but missing while executing the statement.
mysql - 3.23, driver is org.mm..mysql driver
Can u please look at this another problem:
I have a keyword and need to search against a table containing 100 fileds.
select * from table where keyword like '%"+keyword+"%'
searches only in one field. If I want the search to be performed against all the fields in the table, Is there any solution.
What I am doing at present is putting all the fields data in a new field and performing like operation on that field.
but this is very slow.
thanks and regards
Kaushik -
Inserting values from sql into a JTable
Good day all,
Please I need someone's assistance as regard inserting data retrieved from JavaDB into a JTable I created in NetBeanns6.5.
I have to click on a ViewData Button in order to display data in the JTable below.
Please I need a simple example to demostrate it.
Also, how can I resize the column of my JTable so that I can see fully what is retrieved from the database, cos I have one that retrieves but the column is not wide enuogh to accommodate the data.(I did this outside NetBeans)
Thanks
Alam Ikenna Winner.First, learn to use PreparedStatements. Then we can talk further.
-
Load variables from XML into Flash
I was wondering how to load variables from an XML document to
a Flash file? I am familiar with the code to do it for a text file,
but was wondering how to do it for XML.
Many thanks in advance!
JJThanks for the recommendation on the site. What I am trying
to do is load varaibles from an XML file into text boxes in my
flash movie.
Here is my loading:
var my_xml = new XML();
my_xml.ignoreWhite = true;
my_xml.onLoad = function(success){
if (success) {
gotoAndStop("slide01");
my_xml.load("narration.xml");
this is what I have on my frame with the text boxes (the text
boxes are also have the variable name in the variable area)
var narration = my_xml.picture01;
var my_title = my_xml.my_title;
var my_date = my_xml.my_date;
should I do my_date.text = my_xml.my_date; instead?
my xml doc looks like this
<?xml version="1.0" encoding="iso-8859-1"?>
<picture01>This is the text for picture
01</picture01>
<picture02>This is the text for picture
02</picture02>
<my_title>Las Vegas</my_title>
<my_date>October</my_date>
Any help on this would be GREATLY appreciated!
Text
my_date.text = my_xml.my_date; -
How to insert data from file into matlab script node
I have interfaced input data from file to be processed using matlab script node. But the problem is that I could not capture the multiple data into matlab script node and to convert it into matrix. Further to this I need to process the data by plotting graphs from it. Thank you in advance for the advice
Zarina,
To clarify your problem, you have a script node contaning your Matlab code. Are you then using the standard LV functions to load in your data from a file and pass it into the script node?
Regards
Tristan -
Insert control text property inside httpservice url
I am trying to insert a DateField.text property inside of the
url field for HTTPService in the script portion. I have
successfully tested with setting the url field with a location and
calling the .send() for results with a button. How do I base the
url off of a variable? Here is my code I am using to call the
HTTPService and this works if I set the full line.
public function changeDate():void {
srv.url = "
http://mydomain.com/temp/2008-03-21.xml";
srv.send();
I am trying to pull the text property from a DateField with
an id of dF. This fails though.What do I need to correct?
public function changeDate():void {
srv.url = "'
http://mydomain.com/temp/' +
{dF.text} + '.xml'";
srv.send();Ok, thank you for the help. I got it working!
Here was the final function.
public function changeDate():void {
srv.url = "
http://mydomain.com/temp/" +
dF.text + ".xml";
srv.send();
} -
How to insert data from file into long raw field using utl_file?
I try to insert binary data from a file (under AIX 4.3.3) into a LONG
RAW field (Oracle 8.1.6).
First, I retrieve the data from the file like this:
DECLARE
FileHandle = UTL_FILE.FILE_TYPE;
myVariable LONG RAW;
FileHandle := UTL_FILE.FOPEN ;('prj/oracle/admin/MARTIJN/udump',
'MyFile.ATT', 'R');
UTL_FILE.GET_LINE (FileHandle, myVariable);
UTL_FILE.FCLOSE(FileHandle);
INSERT INTO myTable(DUMMYFIELD) VALUES(myVariable);
Where DUMMYFIELD of table myTable is of type LONG RAW.
The GET_LINE statement crashes on Oracle Error ORA-6502: Numeric of
Value error: hex to raw conversion error.
What do I do wrong?
Do I use the right method to retrieve information from a file and put
it into a long raw field, should I try it another way?
Any help greatly appreciated,
Martijn RutteZarina,
To clarify your problem, you have a script node contaning your Matlab code. Are you then using the standard LV functions to load in your data from a file and pass it into the script node?
Regards
Tristan -
How to insert data from site into DB?
Hi
Does anyone know how to insert data into a database from a
website?
I have created a Registration form for users to register to
my web site. With this I would like the data they have entered to
be stored in a MySQL database. I have created the a form and used
the record insertion form wizard.
When they have registered, I need to be able to check their
username every time they log in.
If anyone could help, it would be greatly appreciated,
thanks Lou.LoobieLouLou wrote:
> When I inserted a form, I enetered a name and the method
was POST, but it also needed an action.
> How do I write in java script that it needs to be
inserted into the database?
You can't do it with JavaScript. You need to use a
server-side language
like ASP, ASP.NET, ColdFusion, or PHP. Dreamweaver automates
a lot of
the process for you, but you need to choose your server model
first.
It sounds as though you are completely new to this. First ask
your
hosting company whether it supports a server-side language,
and if so,
which one. Then open Dreamweaver help (F1) and read the
section titled
"Preparing to Build Dynamic Sites".
Working with server-side languages and databases isn't
difficult, but
it's not something you can pick up in five minutes or be
shown how to do
in a couple of forum posts.
If you can't make up your mind which server-side language to
use,
ASP.NET is the most difficult of the four I mentioned. ASP is
popular,
but is no longer actively developed, so will eventually die
out
(although it will take many years to do so). ColdFusion and
PHP are
relatively easy to learn. I prefer PHP, but all of them do
basically the
same thing. However, you must choose one; they cannot be
mixed.
David Powers, Adobe Community Expert
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
Author, "PHP Solutions" (friends of ED)
http://foundationphp.com/ -
Applescript to insert graphic from file into Pages document
I am trying to insert a picture from a file into Pages using Applescript, i.e. I am trying to do via script the same thing as the Menu command " Insert" followed by "Choose...".
I have tried the following Applescript and variants of it but it does not work:
set theFile to "xxx_HD:Users:xxx:Desktop:PagesScripts:picture.pct"
tell application "Pages"
tell document 1
tell body text
set thePar to make new paragraph at end
set contents of thePar to make attachment theFile
end tell
end tell
end tell
I am not even sure that " make attachment" is the right command to use to insert a graphic from a file. I have not found any information anywhere on this. Can someone help please?Pages '09 should still be in your Applications/iWork folder.
What do you like in the "new look"?
Peter -
Insert item from library into text
I am wondering if anyone knows how to insert an item from a library into a text or graphics frame programmatically? Are items in the library referenced by their names or do they have unique IDs
I have a custom bullet that I have not yet converted to a font and I don't want to have to manually insert the bullet into each line of text I want. I have a tag where the bullet should go and I just want to replace the tag with the bullet.
I know this is pretty strange but I am sure someone has experience with this.
Thanks in advanceChoose it from where? See this user tip by Terence Devlin for how to access photos for use outside of iPhoto: How to Access Files in iPhoto
Have you tried dragging the photo from the iPHoto window into the open Word document window?
OT -
Passing variable from php into flash, help please
Here are what I'm having:
<?PHP
$testVal = "This is a test";
$test = urlencode($testVal);
$out = "test=". $testVal;
echo $out;
?>
// and this is my flash file
function getData() {
// Prepare request
var urlReq:URLRequest=new URLRequest("http://localhost/test.php");
urlReq.method=URLRequestMethod.GET;
var loader:URLLoader = new URLLoader();
loader.dataFormat=URLLoaderDataFormat.VARIABLES;
loader.addEventListener(Event.COMPLETE, completeHandler);
loader.load(urlReq);
function completeHandler(evt:Event) {
var vars:URLVariables = URLVariables(evt.target.data);
trace(" TEST = ", vars.test);
trace(" TEST = ", unescape(vars.toString()));
// and below is the ouput
TEST = undefined
TEST = test=This is a test
I've tried with several different ways to get ONLY the value of the variable - that means I only want to have "This is a test" returned, but I either got "undefined" or the whole thing "test=This is a test", instead.
I'm new to Flash and PHP. Please help.
ThanksThere's no need to write any fake variables out, Flash does not need that. OK, here's a simple PHP script like yours - I called it test.php
<?PHP
$testVal = "This is a test";
$out = "test=". $testVal;
echo $out;
?>
And the AS to call it:
var myLoader:URLLoader = new URLLoader();
myLoader.dataFormat = URLLoaderDataFormat.VARIABLES;
myLoader.load(new URLRequest("http://www.mydomain.com/test.php"));
myLoader.addEventListener(Event.COMPLETE, dataLoaded, false, 0, true);
function dataLoaded(e:Event){
trace( e.target.data.test);
You will see 'This is a test' traced to the output window.
HTH
Maybe you are looking for
-
I have a SharePoint 2013 environment with 1 AD Server, 1 DB Server and 1 APP Server, with 13 Web Applications running under the SharePoint. Recently I rebuilted the application because of some infrasctrucutre problems, and I was able to solve all of
-
Updates tab in Mac App Store stopped working.
I don't have time to test all of these to find out for sure which one it may be, so I thought I'd post it here in case someone might already know the answer. I disabled and removed a bunch of features from my iMac running Mountain Lion 10.8.5 and one
-
Times ten error while creating table via SAS
Error attempting to CREATE a DBMS table. ERROR: CLI execute error: [TimesTen][TimesTen 7.0.3.0.0 ODBC Driver][TimesTen]TT2918: Precision of number type is out of range [1,38] -- file "ptSqlY.y", lineno 4006, procedure "coltype : NUMBERSQ LPARE
-
Dump while running in FG mode at different places
We are running a Z transaction which is related to some trading of shares. It is handling huge data. when run in fore ground, its throwing dump at different places each time, its run. For ex: CL_OS_CA_COMMON->Method SM_UPDATE_SUBSCRIPTIONS In a diffe
-
New ipod won't restore from icloud
If I set up my ipod as new, can I still restore from icloud? I purchased a new ipod touch yesterday, and in the course of setting it up, it will not restore from icloud, so I thought I might be able to set it up as new and still restore from icloud o