Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 337
  • Last Modified:

jquery form field

I am passing information between form fields.
IE:
Information collected in this field:
 <input name="recordPropertyAddress1" id="recordPropertyAddress1" class="inputclass pageRequired" title="Street Address is required" maxlength="254" onblur="recordClientAddress1.value = this.value" />
will be outputted in this field:
<input name="recordClientAddress1" id="recordClientAddress1 " class="inputclass pageRequired" maxlength="254" title="Address is required" />

How could I combine the information from two fields and output it as text?
IE Collect the information from:
<input name="recordPropertyAddress1" id="recordPropertyAddress1" class="inputclass pageRequired" title="Street Address is required" maxlength="254" onblur="recordClientAddress1.value = this.value" />
and
<input name="recordPropertyAddress2" id="recordPropertyAddress2" class="inputclass pageRequired" title="City is required" maxlength="254" onblur="recordClientAddress1.value = this.value" />

and out put as "I see you live at "recordPropertyAddress1", "recordPropertyAddress2".
0
Neil_Bradley
Asked:
Neil_Bradley
  • 2
  • 2
1 Solution
 
leakim971PluritechnicianCommented:
>How could I combine the information from two fields and output it as text?

var text = $("#recordPropertyAddress1").val() + ", " + $("#recordPropertyAddress2").val();
alert(text);

Open in new window

0
 
Neil_BradleyWeb UX/UI DeveloperAuthor Commented:
Excellent, thank you for that.
Cheers,
N
0
 
leakim971PluritechnicianCommented:
You're welcome! Thanks for the points!
0
 
Neil_BradleyWeb UX/UI DeveloperAuthor Commented:
Maybe you are the perfect person to answer this question on a similar subject?
http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Jquery/Q_26966439.html
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now