Results 1 to 2 of 2

Thread: how i can save all field that have created by custom code

  1. #1
    2nox is offline Member
    Join Date
    Feb 2009
    Location
    Indonesia
    Posts
    17

    Default how i can save all field that have created by custom code

    hi all

    i am hoping u can help me. i have created some field by custome code, but i can't save all field. how can i do that?

    This is the examples code
    //i adding this code in custom/modules/my modules/metadata/editviewdefs.php

    4 =>
    array (
    0 =>
    array (
    'name' => 'new_field',
    'label' => 'LBL_NEW_FIELD',
    'customCode' => '<table width="100%" border="0" cellspacing="0" cellpadding="0" id="productLine"><tr><td>jumlah</td><td>harga satuan</td><td>total</td><tr></tr></table><input type="button" value="Tambah" id="addProductLine" class="button" onclick="showfield();" />',
    ),

    //then i create function javascript

    function showfield()
    {
    //alert(ln);
    // var btn=document.getElementById('addbutton');
    //btn.disabled='true';
    var x=document.getElementById('productLine').insertRow (-1);
    var y=x.insertCell(0);
    var a=x.insertCell(1);
    var b=x.insertCell(2);
    var c=x.insertCell(3);
    y.className="dataField";
    a.className="dataField";
    b.className="dataField";
    c.className="dataField";
    y.innerHTML="<input type='text' id='text" + ln + "' name='text' value=''>";
    a.innerHTML="<input type='text' id='texta" + ln + "' name='text1' value='' onblur='penjumlahan_field("+ ln +");>";
    b.innerHTML="<input type='text' id='textb" + ln + "' name='text2' value =''>";
    c.innerHTML="<input type='button' value='Delete item' class='button' onclick='cancel(this)'>";

    ln++;
    document.getElementById('addProductLine').onclick = function() {
    showfield();
    }


    }

    Best Regard

  2. #2
    vishwasrao's Avatar
    vishwasrao is offline A Prolific Poster
    Join Date
    Sep 2008
    Location
    Pune,Maharashtra,India
    Posts
    385

    Smile Re: how i can save all field that have created by custom code

    Hi ,
    I think Enhanced Studio will help u because it provide 'code' datatype .
    May this help u.
    Vishwasrao Salunkhe
    vishwasrao.salunkhe@gmail.com
    Fan Of Sachin Tendulkar
    Operating System :- Windows XP
    PHP Version:- 5.3
    Apache :-2.2.11
    MYSQL :-5.1.36

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Problem with Javascript on Save Button custom code
    By swhitlow in forum Developer Help
    Replies: 7
    Last Post: 2011-02-16, 06:25 PM
  2. custom function call from custom code field in metadata
    By josh.sweeney in forum Developer Help
    Replies: 9
    Last Post: 2010-02-09, 09:23 PM
  3. Code customizations to custom modules created by module builder
    By SanderMarechal in forum Developer Help
    Replies: 8
    Last Post: 2009-03-20, 02:40 PM
  4. Custom code for a custom field in default module
    By kodikarthi in forum Developer Help
    Replies: 7
    Last Post: 2009-02-19, 04:25 PM
  5. How to save custom code in custom module
    By rraushan2007 in forum Developer Help
    Replies: 5
    Last Post: 2008-09-25, 12:13 PM

Bookmarks

Posting Permissions

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