×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Jun 2011
    Posts
    19

    how to convert javascript code in j2me?

    hi,
    i'm working in j2me for Symbian development then i want combo box then
    i have a Java script code is in this below then how to convert this in j2me.
    please help me.


    <html>
    <h2>ComboBox</h2>
    <script language="javascript">
    var arr = new Array();
    arr[0] = new Array("-select-");
    arr[1] = new Array("Maharashtra","Karnataka","Andhra Pradesh","Tamil Nadu");
    arr[2] = new Array("Carinthia"," Styria");
    arr[3] = new Array("Florida","New York","Maryland");
    arr[4] = new Array("Queensland","Victoria","Tasmania","New South Wales");

    function change(combo1){
    var comboValue = combo1.value;
    document.forms["form"].elements["combo2"].options.length=0;
    for (var i=0;i<arr[comboValue].length;i++){
    var option = document.createElement("option");
    option.setAttribute('value',i+1);
    option.innerHTML = arr[comboValue][i];
    document.forms["form"].elements["combo2"].appendChild(option);
    }
    }
    </script>
    <form name="form" method="post"><select name="combo1" onchange="change(this);">
    <option value="0">-Select-</option>
    <option value="1">India</option>
    <option value="2">Austria</option>
    <option value="3">USA</option>
    <option value="4">Australia</option>
    </option>
    </select><br />
    <select name="combo2">
    </select>
    </form>
    </html>

  2. #2
    Super Contributor
    Join Date
    Nov 2003
    Location
    Bangalore , India
    Posts
    4,429

    Re: how to convert javascript code in j2me?

    There is no automated way to convery Java Script to JavaME. You have to manually convert the code.

    Also please post the thread in correct section to get faster answers.

    Regards
    Gopal

Similar Threads

  1. How to emit signal from javascript code
    By ram4soft in forum Qt
    Replies: 2
    Last Post: 2011-04-17, 14:31
  2. How to convert .mbm to .bmp in code?
    By sundy10 in forum Symbian
    Replies: 4
    Last Post: 2010-01-15, 10:54
  3. How to use J2ME polish code in existing J2ME app.
    By raselbd in forum Mobile Java General
    Replies: 2
    Last Post: 2008-08-26, 14:30
  4. How to convert a JPEG image to a PNG image using J2ME Code
    By hussain_afs in forum Mobile Java Media (Graphics & Sounds)
    Replies: 1
    Last Post: 2007-12-31, 16:48
  5. Replies: 1
    Last Post: 2005-03-23, 11:46

Posting Permissions

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