Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    May 2005
    Location
    Utah
    Posts
    65
    Thanks
    6
    Thanked 0 Times in 0 Posts

    Instantly display textbox value

    I have some SGV code that will outline text for me. The user will input text into a regular textbox. I want the text to display instantly (with each keystroke) on another part of the screen.
    Code:
    <input name="" type="text" onkeypress="" id="jerseyname"/>
    <svg xml:lang="en" xmlns="http://www.w3.org/2000/svg" version="1.2" viewBox="0,0 800,1250" width="800" height="1250">
    	<title>Demo</title>
    	<style>
    		text { font-size: 3rem; font-family: Impact, sans-serif; }
    		text:{ stroke: blue; stroke-width: 5; } 
           
    	</style>
    	<text x="50" y="80" >Help ME!!</text>
       </svg>
    I know Javascript will display instantly with onkeypress, but I'm new to coding and I'm not sure how to put it together. Thanks
    Last edited by Local Hero; 02-23-2014 at 04:18 PM.

  • #2
    Senior Coder jmrker's Avatar
    Join Date
    Aug 2006
    Location
    FL
    Posts
    3,092
    Thanks
    38
    Thanked 498 Times in 492 Posts
    You might be able to display instantly with one of the keypress events,
    but you will need to REDRAW the SVG image with each entry.

    Depending upon your display content, it might get pretty slow.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •