Jump to content

display text


I-AM-OBODO
Go to solution Solved by scootstah,

Recommended Posts

hi all

i dont know what it is called so i dont know what to goggle cos all my search result have not yielded desired result.

i have a table and space for initials. i want so that when i type on the form field it will display on the table. just like the example used on jquery modal form

 

thanks

Link to comment
Share on other sites

  • Solution

To add initials in multiple places you just need to select more elements.

var el = document.getElementById('initials');
This is selecting an element with an id of "initials". In my example, we have <div id="initials"></div>, so this is the element that will be selected. So you can either create more elements with different ID's, and use multiple document.getElementById() calls, or, you can use a different selector such as a class selector. In that case you would just have multiple elements with the same class, and your initials would be added to each one. Here's an example of that: http://jsfiddle.net/22p32vj2/1/
Link to comment
Share on other sites

To add initials in multiple places you just need to select more elements.

var el = document.getElementById('initials');
This is selecting an element with an id of "initials". In my example, we have <div id="initials"></div>, so this is the element that will be selected. So you can either create more elements with different ID's, and use multiple document.getElementById() calls, or, you can use a different selector such as a class selector. In that case you would just have multiple elements with the same class, and your initials would be added to each one. Here's an example of that: http://jsfiddle.net/22p32vj2/1/

 

 

Thanks a zillion dozen times :)

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.