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 3 of 3

Thread: Array Issue

  1. #1
    New Coder
    Join Date
    Jun 2012
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Array Issue

    Is anyone able to tell me why i am getting the following from the below script and how to fix it. Its all jumbled up :S

    I RUN
    Code:
    var newHTML2 = '<td><button onclick="changefield(\"'+obj[x]['unique_id']+'\")">Edit</button></td>';
    RENDERS
    Code:
    <button 3")"="" onclick="changefield(">Edit</button>

  2. #2
    New Coder
    Join Date
    Jun 2012
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts
    anyone ?

  3. #3
    New Coder
    Join Date
    Jun 2012
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts
    solved by doing the following:

    Code:
    var txt = obj[x]['unique_id']; 
              var newHTML2 = '<td align=\"center\"><img onclick=\"changefield('+txt+')\" src=\"http://localhost/ci/application/styles/system_users/images/engine.png\"></td>';


 

Posting Permissions

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