Solved

jquery change input box value

Posted on 2010-08-30
5
822 Views
Last Modified: 2013-11-11
hi,

 using jquery I am trying to set an input box value but I cannot seem to grab it properly.
 
I only know the title of the input box which is Order Number.

please tell me how to set a value for Order Number. (see code below)

thanks.
<td class="orderQty selected">
<span> inputbox</span>
<span> <input title="Order Number"/></span>
</td>

Open in new window

0
Comment
Question by:Solutionabc
5 Comments
 

Author Comment

by:Solutionabc
ID: 33562609
This does not work for me.

$(".orderQty selected span input [title = Order Number]").val(order);
0
 
LVL 58

Expert Comment

by:cyberkiwi
ID: 33562651
$(".orderQty input[title='Order Number']")
0
 

Author Comment

by:Solutionabc
ID: 33562720
I need the class="orderQty selected". Because I am only applying it to certain td's. when the page loads all of them are called orderQty and I cannot apply it to all 150 items because of loading time.

I can only use class "orderQty selected".
0
 
LVL 14

Accepted Solution

by:
Designbyonyx earned 500 total points
ID: 33563103
$('.orderQty.selected input[title=Order Number]').val();
0
 
LVL 6

Expert Comment

by:hehdaddy
ID: 33564164
Simple:

$("input[title='Order Number']").val("my value");

Cheers!
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Knockoutjs (Knockout) is a JavaScript framework (Model View ViewModel or MVVM framework).   The main ideology behind Knockout is to control from JavaScript how a page looks whilst creating an engaging user experience in the least …
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question