Solved

jquery change input box value

Posted on 2010-08-30
5
820 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
Comment Utility
This does not work for me.

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

Expert Comment

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

Author Comment

by:Solutionabc
Comment Utility
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
Comment Utility
$('.orderQty.selected input[title=Order Number]').val();
0
 
LVL 6

Expert Comment

by:hehdaddy
Comment Utility
Simple:

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

Cheers!
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Requirements JQuery 1.6+ HTML CSS Introduction This article was inspired by an EE question (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28372511.html) on how to make a page show some balloons animate up a page…
Introduction A frequently asked question goes something like this:  "I am running a long process in the background and I want to alert my client when the process finishes.  How can I send a message to the browser?"  Unfortunately, the short answer …
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery including how to code hide show and toggles. 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…

743 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now