tags:

views:

29

answers:

3

HIi friends,

i working on a IPhone Web App as its kinda new to me, have studied some basics of JQuery,

i want to get the form value in one view and to return to next view,i have tried this one,

$("button:#Get").click(function () {

$('#msg').html($('input:textbox').val());

});

it works with JQuery but not in JQTouch.

Any Ideas People,

Thank u,

A: 

This is just a guess:

$("#Get").click(function() {
  $('#msg').html( $('#specificInputfield').val() );
});

I think you need to specify which value of which input field you want to select, because your current selector will select all text input fields.

Harmen
Thanks but,i have tried to pass specific textBox value even it not works,i want u notice that i m using JQTouch?
Karthikeyan
A: 

jQTouch isn't essentially very different from a normal jQuery Js-based app. If you can set ID's on your form elements you can access them the usual way.

Demonstration:

  1. Go to the demo at http://www.jqtouch.com/preview/demos/main with a WebKit based desktop browser, click "User Interface' -> 'Forms' and open up your developer tools.

  2. Type something into the topmost text field. Now go to the console in the developer tools and write $('#some_name'). You should see a normal jQuery node.

  3. Type $('#some_name').val(). You will see the text you typed in (2).

Try some more experiments, you'll see that it works much the same as a normal jQuery-based web app.

Jacob Oscarson