Jump to content

LRG

Members
  • Posts

    4
  • Joined

  • Last visited

Profile Information

  • Location
    United States

LRG's Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. choice= was synonymous with n=, sorry I forgot to change it. A count in the resulting URL wasn't really necessary by my initial means. Thank you both for your help
  2. Really, the "choice" part of the URL should be "n". I've updated it here: https://jsfiddle.net/88sxy0jg/16/ n=(the numerically first value selected)&n=(the numerically second value selected) and so on. For example, if boxes with the values 2, 3, and 4, respectively, are chosen, then the resulting URL would be http://url.com/results?n=2&n=3&n=4 (using the updated script). All values selected should be represented in the URL with n=, not just the highest. Before it was "choice" but I changed it to "n" for simplicity.
  3. Thank you for answering The "&n="s in the resulting URLs are simply to delineate the terms, they're not really needed. I'll explain below: Rule 1: The number of boxes selected corresponds to the first part of the specific URL used. In this case, 1 box selected will bring the user to http://example.com/results?choice=. If 2 boxes are selected, the user will be brought to http://domain.com/results?choice=. If 3 boxes are selected, the user will be brought to http://url.com/results?choice=. Rule 2: The value of the boxes selected corresponds to the second part of the specific URL used. The second part of the URL consists of the value of the boxes selected. If the user selects 2 boxes with the values 2 and 3, then he will be redirected to http://domain.com/results?choice=2&n=3. Again, the "&n=" is just a way of separating the values. Please let me know if any further clarification is needed
  4. I posted this thread on a similar forum, however, it failed to receive an answer, so I'll ask it here instead. On the other forum, it got around 6 000 views, while other threads created around the same time got around two or three hundred views. I can think of three reasons why it would receive so many views yet no responses: it was incredibly easy, and no one wanted to answer; it was hard, and no one knew the answer; or, its answer required a lengthy explanation that no one had the time to give. Regardless, it's still a question that I can't answer, so here's the original: Here is the code I currently have: https://jsfiddle.net/88sxy0jg/15/ Basically, when I select 2 of the boxes, the alert for the second URL pops up - which is good. However, in the URL, it will end with "false&n= (etc.)" How do I get the value for when checked=1 in the second URL instead of "false"? The similar issue goes for when checked=3 and so on, should I add more checkboxes. Knowing me, I'm probably overlooking some minor detail.
×
×
  • Create New...