I have some coding and already pushed this into a variable. I would like to remove it and reinsert another value. Please note that I am programming a lot of the coding with perl. I would like to remove menu_mode value. Any tips would be a great since javascript/jquery are a new language to me.
print qq|
\$("#extractparam").click(function () {
\$("#grapharea").html(" ");|;
foreach my $num (1 .. $count)
{
if ($num eq 1)
{
print STDOUT qq|var params = \$("#volt$num").serializeArray();|;
} else
{
print STDOUT qq|var volt$num = \$("#volt$num").serializeArray();|;
print STDOUT qq|params = \$.merge(params, volt$num);|;
}
}
print qq| params.push({ name: 'menu_mode', value: '3C-extractparameters' });
\$.get("./scripts/banana_extract.cgi", params, function(data){ \$("#paramselection").html(data) });
// would like to remove the menu_mode value
params.push({ name: 'menu_mode', value: '3D-extractparameters' });
\$.get("./scripts/banana_extract.cgi", params, function(data){ \$("#graphoptionselection").html(data) });
\$("#extractparam").removeAttr('style');
\$("#Execute_Button").css("background-color","lightblue");
});
JSON::Any
for example). Manipulate the data with Perl before doing that. Manipulate the data with JavaScript after that. Don't manipulate the JavaScript logic with Perl - that way leads to code that is hard to read and maintain.