DotDragnet
May 24, 2012, 07:20:18 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: follow us on twitter @dotdragnet
 
   Home   Help Search Login Register  
Pages: [1]   Go Down
  Print  
Author Topic: Filling in multiple text boxes  (Read 331 times)
robbie
Sr. Member
****
Posts: 343



View Profile Awards
« on: September 24, 2011, 10:40:04 AM »

I've got three text boxes relating to three separate searches (on three separate sites). I'd like the user to be able to fill in one, and the text to automatically be inputted into the other two.

How do I do this?

Thanks
Logged
samhs
Administrator
Hero Member
*****
Posts: 1713



View Profile WWW Awards
« Reply #1 on: September 24, 2011, 11:50:13 AM »

jQuery - grab it from here http://www.jquery.com

Include it at the top of your page:
<script src="scripts/jquery.js"></script>

Then underneath:

<script>
$("#textbox1").change(function(){
  textinput = $(this).val();
  $("#textbox2").val(textinput);
  $("#textbox3").val(textinput);
});
</script>

HTH
Logged

Loose adj a not held together; not fastened or firmly fixed in place
Lose verb to misplace something. To fail to keep or obtain something, especially because of a mistake, carelessness, etc.
---
Blog: www.ohwrite.co.uk
Twitter: www.twitter.com/samhs
robbie
Sr. Member
****
Posts: 343



View Profile Awards
« Reply #2 on: September 25, 2011, 08:01:05 AM »

Sam, I was trying to give you a break and ask here instead, but you answered anyway! It's for the site you know and love.

Thanks smile
Logged
samhs
Administrator
Hero Member
*****
Posts: 1713



View Profile WWW Awards
« Reply #3 on: September 25, 2011, 11:22:24 AM »

Yeah - I figured as much smile
Logged

Loose adj a not held together; not fastened or firmly fixed in place
Lose verb to misplace something. To fail to keep or obtain something, especially because of a mistake, carelessness, etc.
---
Blog: www.ohwrite.co.uk
Twitter: www.twitter.com/samhs
Dom
Hero Member
*****
Posts: 1681


Taster of pasities. Clanger of both pots AND pans.


DominicNeagle
View Profile Awards
« Reply #4 on: September 26, 2011, 08:51:39 AM »

Sam, I was trying to give you a break and ask here instead, but you answered anyway! It's for the site you know and love.

Thanks smile

Sounds like some kind of secret club. You know how we feel about those round here.... we want in!
Logged

robbie
Sr. Member
****
Posts: 343



View Profile Awards
« Reply #5 on: September 26, 2011, 09:55:08 PM »

Trust me, you don't. Just a (dull) site I maintain that I dragged Sam into. Happened to be one of those jobs that didn't run as smoothly as initially hoped smile
Logged
Dom
Hero Member
*****
Posts: 1681


Taster of pasities. Clanger of both pots AND pans.


DominicNeagle
View Profile Awards
« Reply #6 on: September 27, 2011, 08:02:53 AM »

Well if you need it burning with fire, just give me a shout. We can "borrow" the petrol cans that Steve keeps behind his shed.
Logged

Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF | SMF © 2006-2008, Simple Machines Valid XHTML 1.0! Valid CSS!