Software Archive
Read-only legacy content
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
17060 Discussions

variable to text view

zeroman_z_
Beginner
443 Views

how can i get variable x  to text view ?

x is changing timer

timer display >>>

 

0 Kudos
1 Reply
Ad
New Contributor III
443 Views

Drag a text field into your form and give it an ID: e.g. txtField

In HTML code you wil get something like this:

<div class="widget uib_w_206 d-margins" data-uib="media/text" data-ver="0" id="txtField">
    <div class="widget-container left-receptacle"></div>
    <div class="widget-container right-receptacle"></div>
    <div>
        <p>&nbsp;</p>
    </div>
</div>

With JQuery Code you can change the text like this:

        var timer = 0;
        setInterval(function() {                         
                        $("#txtField").text(timer++);                     
                   }, 1000);

P.S. Assuming you are working with JQuery

0 Kudos
Reply