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 7592955
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T21:02:28+00:00 2026-05-30T21:02:28+00:00

i am trying calculate the amount but having troble with jQuery .. can you

  • 0

i am trying calculate the amount but having troble with jQuery .. can you guys please tell me whats wrong with my codes.

my Javascript and jQuery codes are:

i have change this as:

$(document).ready(function() {
    $('.home_banner').cycle({
        fx: 'fade'
    });
    $("#tabs").tabs();
});

and calculator codes as:

var u_rate   = new Array();
    u_rate[0]    = new Array();
    u_rate[0][0] = 1.022;
    u_rate[0][1] = 0.75; 

    u_rate[1]    = new Array();
    u_rate[1][0] = 1.034;
    u_rate[1][1] = 0.78;

calc();

function calc(){
    var result = '';
    var id = '';
        id = 'u'; 
        curr = u_rate;
    var curin_id = jquery("#"+id+"currency_in").attr("selectedIndex");
    var curout_id = jquery("#"+id+"currency_out").attr("selectedIndex");

    var value_float = parseFloat(jquery("#"+id+"value").val());

    if(value_float>0){
        result=value_float*curr[curin_id][curout_id];
        result=Math.round(result*100)/100;
    }
    jquery("#"+id+"result").val(result);
    return true;
}

but still getting no response .. please check this and let me know

and the html is

please check on ukash2gold.com

please friends let me know how to resolve the issue ..

u will able to see the form under the tab of [Ukash to LR]

  • 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-05-30T21:02:29+00:00Added an answer on May 30, 2026 at 9:02 pm

    typeof jQuery yields "function" but typeof $ yields "undefined". Are you loading jQuery in noConflict mode?


    Edit 1

    Yes you are; your slideshow code starts off like this:

    var $jnav=jQuery.noConflict();
    

    See noConflict.


    Edit 2

    As far as I can tell, you’re not using any other framework that uses the $ variable. In that case, you can safely remove noConflict from your slideshow:

    <script type="text/javascript">
    $(function() {
        $('.home_banner').cycle({
            fx: 'fade' // choose your transition type, ex: fade, scrollUp, shuffle, etc...
        });
        $("#tabs").tabs();
    });
    </script>
    

    If you’re using another framework somewhere else on the site, and need to stick to running jQuery in noConflict mode, you’ll have to modify your jQuery code to use jQuery rather than the $ shorthand.

    jQuery('#'+id+'result').val(result);
    

    … etc.


    Edit 3

    Now you’re seeing the error Uncaught TypeError: Cannot read property 'undefined' of undefined at this line:

    result=value_float*curr[curin_id][curout_id];
    

    What this means is, in your case, that curin_id and curout_id are both undefined. Therefore you’re trying to access a property 'undefined' (curout_id) at the object 'undefined' (curr[curin_id] which will yield undefined since curin_id is in itself undefined).

    The cause for this is the following code:

    var curin_id = $("#"+id+"currency_in").attr("selectedIndex");
    var curout_id = $("#"+id+"currency_out").attr("selectedIndex");
    

    selectedIndex is not an attribute of the select but a property of it. Although properties are native JavaScript constructions, you can read about them in the jQuery documentation.

    A simple fix in your case would be to change from attr() to prop():

    var curin_id = $("#"+id+"currency_in").prop("selectedIndex");
    var curout_id = $("#"+id+"currency_out").prop("selectedIndex");
    

    Another solution would be to look at the index of the selected element, within its parent:

    var curin_id = $('#'+id+'currency_in option:selected').index();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to calculate new velocities for 2 colliding balls, but can't really do
I'm trying to calculate the total amount won for each user_name in the For
I'm trying to calculate the total sales of a product in a month, but
I have a javascript function to calculate total amount : <script> function calculate(v) {
I'm trying to calculate churn using one mysql query... I can do this in
am trying to calculate mean and variance using 3X3 window over image(hXw) in opencv...here
I'm trying to calculate correlations in Perl. I found out how to calculate correlations
I am trying to calculate gamescores for a bunch over users and I haven't
I'm trying to calculate the number of success cases within a recursive function in
I'm trying to calculate time blocks from given date range. Here's my attempt: <?php

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.