?
Solved

jquery change input box value

Posted on 2010-08-30
5
Medium Priority
?
830 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 2000 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

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them.

Question has a verified solution.

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

Introduction JSON is an acronym for JavaScript Object Notation.  It is a text-string data transport mechanism, capable of representing simple or complex data structures in a consistent and easy-to-read manner.  Similar in concept to XML, but more e…
JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
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)
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…
Suggested Courses

762 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