parameter-passing

ASP.NET MVC save data between controllers

Hi everyone, another ASP.NET MVC question. Assume the following scenario. You have three controllers: getFirstData getSecondData useFirstData The workflow of your site requires that the user first uses the getFirstData controller, and inputs some data (lets say an int) in the view. I then need to use the second controller (getSecon...

What is the string length when parameter passing in asm?

i am passing two strings from a c file to asm file as parameters. then i move these to ecx and edx from stack. how can i know exactly what their lengths are? like strlen(string) in c? push ebp mov ebp,esp mov ecx,[ebp+8] mov edx,[ebp+12] ...

Passing variable value form js function to rails view (dynamic select)

Hi, I'm using Ryan's solution to add and remove nested model fields dynamically through JavaScript using jQuery. There are 4 models: client, c_person; project, p_person. And one-to-many associations: client has many c_people and project has many p_people (these are people from client side but they belongs to project). Hope it isn't to...

Pass a value between views

I have a list of items of the same type (let's say guests) and i display them in a listview. By clicking on the line I would be able to edit the single element. All the elements have the same editing mask, so i would like to call the same page and pass a parameter. The only solution that i found it's: <a href="edit-page" onClick="setPar...

PHP Function with Optional Parameters

I've written a PHP function that can accepts 10 parameters, but only 2 are required. Sometimes, I want to define the eighth parameter, but I don't want to type in empty strings for each of the parameters until I reach the eighth. One idea I had was to pass an abstracted function with an array of parameters which passes it along to the r...

PhoneGap.exec() passing objects between JS and Obj-C

The only way I found to passing objects between the JS and Obj-C it's by encoding the JS object by using JSON.stringify() and pass the json string to PhoneGap.exec PhoneGap.exec('Alarm.update',JSON.stringify(list)); ... and rebuild the object in Obj-C: NSString *jsonStr = [arguments objectAtIndex:0]; jsonStr = [jsonStr stringByRe...

HTML onload - using variables as parameters

Hi, I want to use something like: <body onLoad="init('A sentence with "quoted text" as parameter')"> Unfortunately, this does work, as the quotes in the parameter are not treated properly. Escaping the quotes also does not work <body onLoad="init('A sentence with \"quoted text\" as parameter')"> (Above also does not work). How ...

passing data from javascript to php using Jquery.

Hi everyone. Maybe this question has been asked before but I am struggling in doing this. I have got a php file which does not include any piece of php code (might be in the future),it includes just javascript and some html. What I want to do is clicking a button in this php file to send some amount of data to another php file. put it ...

Pass request parameters through FacesContext

Hi! I moved from JSF 1.2 to JSF 2.0 and it seems I missed something during the switch. I have following scenario: There is a button on one page with actionListener set to one managed bean's method which adds an object to request by calling FacesContext.getCurrentInstance().getExternalContext().getRequestMap().put("foo", fooObject); Na...

Calling the clickHandler method and passing a value.

Hello, I have the following code for a spinner: public class MyOnItemSelectedListener implements OnItemSelectedListener { public void onItemSelected(AdapterView<?> parent, View view, int pos, long id) { String TABLE_NAME = parent.getItemAtPosition(pos).toString(); int spinnerYearsPos = parent.getSelectedItemPosi...

Pass Parameter to thread problem.

hi. In a datagridview I have an IP address field. when I click on check status button I make thread for each row in datagridview and then call a remote object on the host on that IP and get some information and set another datagridview field as thath info. but there is a problem. the info is wrongly set on datagridview. why? privat...

REST GET verb with parameters

Hello my fellow stackers I'm sitting reading on some REST with my fellow teammates, we are writing a RoR application that is going to expose some of its functionality to the rest of the world. My task on this team is to make a ressource that exposes journal reports. If you call http://root.com/journalreports You should get all t...

python: too many parameters provided

could anyone please explain what's wrong with it ? am I doing something wrong ? >>> class qw: ... def f2x(par1, par2, par3): ... print par1, par2, par3 ... >>> obj = qw() >>> obj.f2x("123", 13, "wert") Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: f2x() takes exactly 3 arguments (...

[jquery] How to pass arguments to an event handler?

var MyObject = { init: function () { this.items = $('#menu a'); for (var i = 0; i < this.items.length; i++) { $(this.items[i]).bind('click', this.doSomething); } }, doSomething: function (index) { alert(this.items[index].innerHTML); // alerts: One, Two, Three } }; I ...