exsisting URL parameters to flash as3 - actionscript-3

How can i get a url value without showing parameter string
sitename.com/example.swf?var1=[regionvar]
Swf used inside a virtual grid and above url string using var1=[regionvar]
does output the region instance number using this code
regionvar:String = loaderInfo.loaderURL;
text1.text = regionvar.toString()
the above returns
sitename.com/example.swf?var1=12345678
What i need is the value without including the parameter string in the url
sitename.com/example.swf
Being able to check the value of the region without parameter string in url
is needed to check if swf is being used only in the proper region.
regionvar is preexisting variable in grid
Thank you for the help

Something like:
var UV:URLVariables = new URLVariables(loaderInfo.loaderURL.split("?")[1]);
trace(UV['var1']);
P.S. Also try this, it just could work:
trace(loaderInfo.parameters['var1']);

Related

I am trying to seperate the numbers to odd and even and then pass to to the url path using variable in jmeter

I have a get request from where I am taking all the id values , using json extractor I have extracted and named it id and used match number as -1
Now I want to pass this id variable into a post url paths
And this post requests are set inside a for each controller to run for required no of iterations
I have given for each controller values as
Input variable : id
Start index : 0
End index : ${id_matchNr}
Output var name : outid
Paths arelike
Post Path 1: https://demo.qwe.com/blue${outid}
Post Path 2:
https://demo.qwe.com/blue${outid}
I want to pass only even id numbers to path 1 and odd id numbers to path two
So I have used if controller and gave expression as
${outid}%2==0 to first path
And ${outid}%2!=0 to other if controller and placed the path 2 request
And checked the interpret condition
These two rqsts are in for each controller.
When I run the script I am getting a blank output for the post rqsts.
Can you please help me out
The function or variable you put in the If Controller must evaluate to true, only this way the If Controller will run its children. In your case you're providing just a string.
You need to wrap it into i.e. __jexl3() function like:
${__jexl3(${outid}%2==0,)}
this way it should work as expected.
More information: 6 Tips for JMeter If Controller Usage

Wanting to display a method return using HTML 5 data attribute

So I have a dynamic table in angular where im passing data in, then creating the table. I want to add some CSS in order to check the values then add some styling onto it. So if the value is a minus number, then display the data in red
I have used attribute data to check the actual data, which works fine until i call to typescript method to generate the data instead of hardcoding the data in, and this is where is goes wrong. So I want to call this method to get the data instead, and it just displays the method name instead of the method return
You can use the attribute binding of data instead of the interpolation if the data returned by the method is not a string - more details here
[attr.data]="getData(header, body)"

Bonita bmp 7 : bind JSON data to table

I'm a new in Bonita bpm. I receive data from my connector in the form as a json string.
There is like connector output param. I store this param like pool variable.
Then, i get this value with external api:
../API/bpm/activityVariable/{{taskId}}/response_rows[enter image description here][1]
I got json array like :
[{"reason":"reason","createdBy":"4","endDate":"2018-11-23T00:00:00+0000","persistenceId":"1","isApproved":"false","persistenceVersion":"0","startDate":"2018-11-15T00:00:00+0000","createtionDate":"2018-11-21T05:56:02+0000"},{"reason":"reason","createdBy":"4","endDate":"2018-11-23T00:00:00+0000","persistenceId":"2","isApproved":"false","persistenceVersion":"0","startDate":"2018-11-16T00:00:00+0000","createtionDate":"2018-11-21T06:01:26+0000"},{"reason":"test","createdBy":"4","endDate":"2018-11-16T00:00:00+0000","persistenceId":"3","isApproved":"false","persistenceVersion":"0","startDate":"2018-11-16T00:00:00+0000","createtionDate":"2018-11-21T07:26:57+0000"},{"reason":"reason","createdBy":"4","endDate":"2018-11-23T00:00:00+0000","persistenceId":"33","isApproved":"false","persistenceVersion":"0","startDate":"2018-11-22T00:00:00+0000","createtionDate":"2018-11-21T13:25:35+0000"},{"reason":"1111","createdBy":"4","endDate":"2018-11-17T00:00:00+0000","persistenceId":"34","isApproved":"false","persistenceVersion":"0","startDate":"2018-11-17T00:00:00+0000","createtionDate":"2018-11-21T13:26:58+0000"},{"reason":"rrr","createdBy":"4","endDate":"2018-11-30T00:00:00+0000","persistenceId":"35","isApproved":"false","persistenceVersion":"0","startDate":"2018-11-09T00:00:00+0000","createtionDate":"2018-11-21T13:29:37+0000"}]
I can create json variable from this json and set it as a data source.
I see that everything works fine. But when I set the data as External API variable nothing is displayed in the table.
I use the expression of my variable and not a constant (a small button in the content setting).
How can I show json array as a table ? Is it posiible ?
You can alternately save the API URL as a String Variable
return '../API/bpm/activityVariable/' + $data.taskId + '/response_rows[enter image description here][1]';
and use it as URL expression or variable.

HTML url passing multiple parameters

I'm trying to pass multiple parameters with an url. I have checked out almost every topic about it, but can't seem to find an answer. I have tried different ways, but it still doesn't work.
It is only sending the first parameter.
If I start with post_id - I can't get comment_id
If I start with comment_id - I can' get post_id
My idea of url:
http://localhost/index.php?post_id=3&comment_id=6
OR
http://localhost/index.php?post_id=3&comment_id=6
I try to use it later like this:
else if(isset($_GET['post_id']) & isset($_GET['comment_id'])){
$post_id = $_GET['post_id'];
$comment_id = $_GET['comment_id'];
$user_id = $this->UserModel->getUser();
$BlogPost = $this->BlogModel->getBlogPost($post_id);
$BlogComments = $this->BlogModel->getBlogCommentList($post_id);
$BlogComments = $this->BlogModel->deleteBlogComment($comment_id,$user_id);
include 'views/ViewBlogPost.php';
}
Your below URL Structure is perfactly true
http://localhost/index.php?post_id=3&comment_id=6
Logic to Pass data Through URL in your script is called as QueryString Which you can build in below way
NAME=VALUE - this is called Name Value Pair , you can Pass Multiple Name Value pair by appending with '&' only
e.g.
http://localhost/index.php?name_1=value_1&name_2=value_2
on server side you will retrive them by using GLOBAL $_GET e.g print_r($_GET); to view all the passed data.
individually you can access them by using
echo $_GET['name_1']; echo $_GET['name_2'];
Also i suggest you to check your GPSC setting in your php.ini to define the priorities between your Super Globals.

Adding query Parameters to Go Json Rest

I am using the library go-json-rest. I'm trying to recognize queries parameters in the code for example localhost:8080/reminders?hello=world I want to access {hello: world} . I have the following code:
//in another function
&rest.Route{"GET", "/reminders", i.GetAllReminders},
func (i *Impl) GetAllReminders(w rest.ResponseWriter, r *rest.Request) {
reminders := []Reminder{}
i.DB.Find(&reminders)
w.WriteJson(&reminders)
}
I know that r.PathParams holds the url parameters but I cannot seem to find how to the query parameters past the "?" in the url.
Given that go-json-rest is a thin wrapper on top of net/http, have you looked at that package's documentation? Specifically, the Request object has a field Form that contains a parsed map of query string values as well as POST data, that you can access as a url.Values (map[string][]string), or retrieve one in particular from FormValue.