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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T22:12:49+00:00 2026-05-15T22:12:49+00:00

I have the following in javascript: var entriesString = ”; $$(‘select[id=shopId]’).each(function(elem, i){ shops[i] =

  • 0

I have the following in javascript:

var entriesString = '';
        $$('select[id=shopId]').each(function(elem, i){
            shops[i] = elem.value;
            entries[i] = new Array();

            $$('input[id=entry'+i+']').each(function(elem, c){
                if(elem.value != '') entries[i][c] = elem.value.replace(".", "").replace(",", "."); else entries[i][c] = '0.0'
            });
            entriesString += '&entry'+i+'=' + entries[i];
            });

Now I’m new to JS and therefore do not know what the first $$('select[id=shopId]') part means.
It must be some sort of array or collection, due to the .each part it is followed by.
In that loop is again a nested loop that uses the loop variable i in its head.
But again, I don’t know what exactly does %%('input[...]') mean. What kind of syntax is this?
Also, where does the data.

This is what entryString looks like for example:

&entry0=65.8,75.5,72.9,67.9,51.1,8.2,47.9&entry1=55.9,33.5,33.8,35.2,26.8,7.0,25.8

Thanks a lot or your help!

  • 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-15T22:12:50+00:00Added an answer on May 15, 2026 at 10:12 pm

    your code uses the prototype JS framework. $$('ELEMENTNAME') instanciates all DOM element with ELEMENTNAME (so i.e. all input fields) and returns them as array of objects.

    with id==xy it returns that one with id xy

    <input type="blah" id="xy" value="123" />
    

    will be found

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So I have the following JavaScript: <script language=JavaScript> function reload(form){ var val=form.profile.options[form.profile.options.selectedIndex].value; self.location='?profile=' +
I have the following Javascript code: function checkIfValid(){ var form = document.createuserform; if(form.fName.value ==
I have the following JavaScript in my site : $(function() { var $cells =
I have the following JQuery code: <script type=text/javascript> $(document).ready(function () { var $containerHeight =
I have the following Javascript code: var idJS; $('.disp').click(function () { idJS = $(this).attr(id);
I have following javascript class: var ImageGallery = function(arr) { var ImgArr = arr;
I have the following javascript : var MyObject = (function() { function Setup(args) {
I have the following JavaScript code: var cILo=true; var img1=images/title-2a.png; var img2=images/title-2b.png; function loadblinker()
I have the following JavaScript code: var xmlHttpReq = getXmlHttpObject(); xmlHttpReq.onreadystatechange=function(){ if (xmlHttpReq.readyState ==
I have the following javascript code. var Test = function(){ $(#+elementId).click(function(){ // How to

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.