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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T17:58:19+00:00 2026-06-06T17:58:19+00:00

Something really odd going on here, and I have gone round in circles trying

  • 0

Something really odd going on here, and I have gone round in circles trying to figure out what is going on…I have a couple of input boxes, with onchange events firing for them, the event being loaded with a JS function that takes the value ( name of another item ) and actions the function accordingly. Only thing is, when the value of the string arrives at the other function, it has somehow been assigned a numeric value, specifically that of the input box.

My php that helps build the form:

$filterfield = '"p_delweek"';
print "<span class='filter'>Del Week<input class='menulink spin-button' id='weekno' type='text' value='".$weekno."' onKeyUp='doFilter($filterfield)' onChange='doFilter($filterfield)' data-filtered='0'/><input type='button' value='Clear' onClick='doUnfilter()'></span>";
$filterfield = '"p_seedweek"';
print "<span class='filter'>Sow Week<input class='menulink spin-button' id='sowweekno' type='text' value='".$weekno."' onKeyUp='doFilter($filterfield)' onChange='doFilter($filterfield)' data-filtered='0'/><input type='button' value='Clear' onClick='doUnfilter()'></span>";

Resulting HTML in source:

<span class="filter">Del Week<input style="width: 50px; height: 22px;" class="menulink spin-button smartspinner" id="weekno" value="26" onkeyup='doFilter("p_delweek")' onchange='doFilter("p_delweek")' data-filtered="0" type="text"><input value="Clear" onclick="doUnfilter()" type="button"></span><span class="filter">Sow Week<input style="width: 50px; height: 22px;" class="menulink spin-button smartspinner" id="sowweekno" value="26" onkeyup='doFilter("p_seedweek")' onchange='doFilter("p_seedweek")' data-filtered="0" type="text"><input value="Clear" onclick="doUnfilter()" type="button"></span>

Javascript function that is called:

function doFilter(filterfield) {
    console.log("DoFilter:"+filterfield);

    var filterInfo=[
        {
            fieldName : filterfield,
            logic : "equal",
            value : Sigma.Util.getValue("weekno")
        }
    ]

    // the next lines action the filtering
    var grid=Sigma.$grid("myGrid1");
    console.log("filterinfo="+filterInfo);
    var rowNOs=grid.applyFilter(filterInfo); 
}

It all goes fine until we get to the console.log(“DoFilter:”+filterfield) , which results in DoFilter:25; 25 happens to be the value of the input box.

How is it grabbing that value? How to pass the real one?

  • 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-06T17:58:21+00:00Added an answer on June 6, 2026 at 5:58 pm

    TBH — I’m not sure if I got what you’re after. However, if you must call a function inline (I recommend that you don’t), you can pass a reference to the input field as parameter and make it available in the methods’s body:

    <input onchange="doFilter('p_delweek', this)" type="text">
    

    ​

    function doFilter(filterfield, field) {
        console.log(filterfield);
        // field is a reference to the input field, hence
        console.log(field.value);
        // will print the current value for this field
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Something really strange is going on here. I bought a new Mac last week,
I have just noticed something really odd, which I believe might be a small
Having an odd problem with a MySQL query, I can't really figure out how
Probably something really simple, but I'm having some real trouble with it. I have
Must be missing something really obvious here but how do you change the size
I must be missing something really obvious. I'm quite new to C# but have
I think I'm missing something really obvious here... must be... but for some reason
I'm having a bad couple of days for odd behaviour. I have a std::string
I'm pretty certain I'm missing something really obvious here but this seems quite bizarre.
Not really sure whats going on here, whether Im just being a fool or

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.