Id Card Editing

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • divyac
    New Member
    • Aug 2008
    • 40

    Id Card Editing

    I am doing an id card project using php/mysql and also i have many id card templates.If i click on any template,that particular id card should become editable and one should be able to change the personal details over the template.i must have text boxes specifying different fields on a side and if one enters the data in the text boxes that should be affected in the template id card..How is it possible.??Is there any tool to do this?or is it enough to do with javascript or ajax or flash actionscript?
    Refer:www.photo-badge.com
  • Atli
    Recognized Expert Expert
    • Nov 2006
    • 5062

    #2
    Hi.

    Both JavaScript and Flash are capable of doing that.
    Personally, I would go with JavaScript, because it doesn't require a 3'rd party plugin (the Flash player).

    To do this with JavaScript, all you would have to do is set up your template in HTML, put input boxes somewhere (for the user to fill out), and have JavaScript mirror the changes to the input box on the template.

    For example:
    [code=html]
    <script type="text/javascript">
    function updateTemplate( pTarget, pNewValue) {
    var targetElem = document.getEle mentById(pTarge t);
    if(targetElem == null) { return false; }
    targetElem.inne rHTML = pNewValue;
    }
    </script>
    <div id="Template">
    <span id="tpl_Name">J ohn Doe</span><br />
    <span id="tpl_Title"> Janitor</span>
    </div>
    <div id="UserInput" >
    Name: <input type="text" onkeyup="update Template('tpl_N ame', this.value);" /><br />
    Title: <input type="text" onkeyup="update Template('tpl_T itle', this.value);" /><br />
    </div>
    [/code]
    See what I mean?

    Comment

    • LetHimCook
      New Member
      • May 2023
      • 1

      #3
      Any updates on your project? I'm doing a project in the same niche. Maybe we can collaborate?

      Comment

      • gerargliuchnagl
        New Member
        • May 2023
        • 1

        #4
        Thanks for sharing your project. I'm new here and just stumbled upon your post. As for your question, it's definitely possible to create an editable ID card template using PHP/MySQL and some client-side scripting languages like JavaScript or AJAX. You can create text boxes for different fields and use JavaScript to update the corresponding fields on the template in real time.

        Comment

        Working...