Skip to content
David Kittell
David Kittell

Application & System: Development / Integration / Orchestration

  • Services
    • Application Development
    • Online Application Integration
  • Code
  • Online Tools
  • Tech Support
David Kittell

Application & System: Development / Integration / Orchestration

CopyText Via ID

Posted on June 12, 2013October 26, 2015 By David Kittell

This function is to copy text or other HTML elements from one ID to another ID

function copytext(source_id, dest_id) {
     var s = document.getElementById(source_id);
     var d = document.getElementById(dest_id);
     d.value = s.innerHTML;
}
Originally Posted on June 12, 2013
Last Updated on October 26, 2015
All information on this site is shared with the intention to help. Before any source code or program is ran on a production (non-development) system it is suggested you test it and fully understand what it is doing not just what it appears it is doing. I accept no responsibility for any damage you may do with this code.

Related

Code JavaScript

Post navigation

Previous post
Next post

Related Posts

Ubuntu – Squid Proxy Setup

Posted on January 18, 2016January 18, 2016

sudo apt-get –assume-yes remove –purge squid squid3 && sudo apt-get –assume-yes autoremove && rm -r /etc/squid && rm -r /etc/squid3 && rm -r /var/spool/squid sudo apt-get –assume-yes -f install squid3 cd /etc/squid3/ sudo cp /etc/squid3/squid.conf /etc/squid3/squid.conf.original sudo cat squid.conf.original | egrep -v -e ‘^[[:blank:]]*#|^$’ > squid.conf sudo chmod a-w /etc/squid3/squid.conf.original…

Read More

Unix Time Conversion

Posted on October 23, 2013October 26, 2015

When integrating various systems you sometimes need to convert DateTime values to an Integer, the code samples below will be helpful Public Function UnixToDateTime(ByVal strUnixTime As String) As Date UnixToDateTime = DateAdd(DateInterval.Second, Val(strUnixTime), #1/1/1970#) End Function Public Function DateTimeToUnix(ByVal dteDate As Date) As String DateTimeToUnix = System.Convert.ToInt64((dteDate – New DateTime(1970,…

Read More

MSSQL Format U.S. Phone Number

Posted on October 13, 2014October 26, 2015

SELECT CASE LEN(phone) WHEN 11 THEN LEFT(phone, 1) + STUFF(STUFF(STUFF(phone, 1, 1, ‘ (‘), 6, 0, ‘) ‘), 11, 0, ‘-‘) WHEN 10 THEN STUFF(STUFF(STUFF(phone, 1, 0, ‘ (‘), 6, 0, ‘) ‘), 11, 0, ‘-‘) WHEN 7 THEN STUFF(phone, 4, 0, ‘-‘) ELSE ‘Invalid phone’ END AS ‘Formatted Phone’…

Read More

Code

Top Posts & Pages

  • PowerShell - Rename Pictures to Image Taken
  • Front Page
  • C# - Start/Stop/Restart Services
  • MacPorts / HomeBrew - Rip CD tracks from terminal
  • PowerShell - Show File Extensions

Recent Posts

  • Javascript – Digital Clock with Style
  • BASH – Web Ping Log
  • BASH – Picture / Video File Name Manipulation
  • Mac OSX Terminal – Create SSH Key
  • Bash – Rename Picture

Top Posts

  • PowerShell - Rename Pictures to Image Taken
  • C# - Start/Stop/Restart Services
  • MacPorts / HomeBrew - Rip CD tracks from terminal
  • PowerShell - Show File Extensions
  • Open On Screen Keyboard (OSK)
  • SQLite - Auto-Increment / Auto Generate GUID
©2025 David Kittell | WordPress Theme by SuperbThemes