Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8989673
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T22:19:10+00:00 2026-06-15T22:19:10+00:00

Here is my code in JavaScript and I want to create innerhtml button that

  • 0

Here is my code in JavaScript and I want to create innerhtml button that will fill some hidden fields in my html form and I have problem maybe with the quotes, when I try to fill the AirportsForm.kod variable…

function EditTableCell(a)
{
    var Myp= document.getElementById(a);
    var nam=Myp.textContent;
    var kod=Myp.id;
    alert(kod);
    var newHTML='<p id="'+a+'"><input size="35" type="text" name="edit'+a+'" id="edit'+a+'" value="'+nam+'" /><input type="button" value="Change" onclick="document.AirportsForm.kod.value='+"'a'"+'.value;document.AirportsForm.promena.value=document.AirportsForm.edit'+a+'.value;document.AirportsForm.submit();"/></p>';
}

here is the html: Its in the form AirportsForm

<input type="hidden" name="promena" id="promena" value="" />
<input type="hidden" name="kod" id="kod" value="" />

And in Php, I do $variable=$_POST["kod"] and for other hidden element.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T22:19:11+00:00Added an answer on June 15, 2026 at 10:19 pm

    Here i finished it for you and this way works, because u get an htmlObject element or input element here you should do it object.id or value or whatever u want to get and than use it later…

    function EditTableCell(a)
    {

    var Myp= document.getElementById(a);
    var nam=Myp.textContent;
    var newHTML='<p id="'+a+'"><input size="35" type="text" name="edit'+a+'" id="edit'+a+'" value="'+nam+'" /><input id="'+a+'" type="button" value="Change" onclick="document.AirportsForm.promena.value=document.AirportsForm.edit'+a+'.value;return subb(this);"/></p>';
    Myp.innerHTML = newHTML;
    Myp.onclick=null;
    }
    function subb(b)
     {
      document.AirportsForm.kod.value=b.id; 
        document.AirportsForm.submit();
     }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have create a HTML page with some JavaScript code. Here is the code
Here is some code on the javascript side for form-based uploads: iframe.setAttribute('src', 'javascript:false;'); I'm
I want to execute a javascript function in a c# code. Here is what
Here is the javascript code I use to create the array and send it
I run this code here <html> <script type=text/javascript src=lib/jquery-ui-1.8.21.custom.min.js></script> <script src=http://127.0.0.1:5984/_utils/script/jquery.couch.js></script> <!--<script type=text/javascript src=lib/jquery-1.7.2.js></script>-->
Trying to truncate some code here and running into a problem: <script type=text/javascript> $(function()
I'm having some trouble with the jQuery hover method. Here's the relevant JavaScript code:
i want to create a dynamic generated form using javascript, everything works fine, until
Hi all Currently I have a website that has a button and some javascript
I want to create a simple bit of JS code that creates an image

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.