SolvedPrivate

Change values of dropdown without comprmising fucntionality

Posted on 2015-02-06
10
17 Views
Last Modified: 2016-05-08
This is a follow-up to the following question:
http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28525464.html

I got the radio buttons to convert to a dropdown, but the problem is that instead of displaying for our staff the backing that was chosen, it displays 0, 1, 3, or 4. If I alter those numbers, I lose functionality.

THE PAGE:
http://www.qualitywovenlabels.com/auto-quote-woven.htm
THE FUNCTIONALITY:
http://www.qualitywovenlabels.com/js/autoCode.js
0
Comment
Question by:underrugswept
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 4
10 Comments
 
LVL 44

Expert Comment

by:Rainer Jeschor
ID: 40593742
Hi,
could you please elaborate on
displaying for our staff
Where is your staff seeing this?
From the Javascript I can see, that the select box should set the hidden fields named product_id and product_name to the corresponding values.
Thanks.
Rainer
0
 
LVL 1

Author Comment

by:underrugswept
ID: 40593758
OK, that's interesting. Apparently it's working on that site, but not on this:
http://customwovenlabels.com/quote-woven.html
http://customwovenlabels.com/js/autoCode.js
(same setup)

What am I doing on Quality Woven Labels that's making it work that I'm not doing on this one?


(In light of this. I don't think elaborating on "displaying for our staff" is necessary, but let me know if it turns out to be)
0
 
LVL 44

Expert Comment

by:Rainer Jeschor
ID: 40593797
Hi,
the first but very important thing is that the html page is missing the script reference to jQuery.
Could you please add this first?
There are a bunch of scripting errors due to the missing reference.
HTH
Rainer
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 1

Author Comment

by:underrugswept
ID: 40593811
Nothing in quote-woven.html is using jQuery, and that's why I left it out. And when I put it in, it causes conflicts and makes my price calculations stop working. But I put it in. You can refresh the page.
0
 
LVL 44

Expert Comment

by:Rainer Jeschor
ID: 40593833
Thanks.
You referenced bootstrap which requires jQuery.
As well as superfish also complains about missing jQuery.
Could you please put the jquery references on top  before loading any other script like superfish.js?
Thanks.
Error loading scripts
0
 
LVL 1

Author Comment

by:underrugswept
ID: 40593855
Done. Sorry for the headache.
0
 
LVL 44

Accepted Solution

by:
Rainer Jeschor earned 500 total points
ID: 40593987
Hi,
thanks - and nope, no headache - just web dev as usual :-)

It should work now as I could get the correct values from the hidden form elements like product_id and product_name.
But there are still a lot of Javascript errors as e.g. the emptyCart function tries to set
$('patches_percentage_radio_2').checked = true;

Open in new window

but this field does not exist on the page.
As it seems that you use the autoCode.js on multiple but different pages, perhaps it may help to split this file into two files.
One file containing all the patch array information which can be included in all html files as well as a dedicated JS file with the page related logic.
HTH
Rainer
0
 
LVL 1

Author Comment

by:underrugswept
ID: 40594012
Yeah, I know the whole thing is an utter and complete mess. In the near future we're going to get it more updated and modernized.


I'm trying to decipher what your solution actually is. Am I supposed to go into autoCode.js and un-comment-out that line of code?
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
original content 7 121
Keyup listener getting fired on initial page load 1 52
ExcelWebAddIn Connect to SQL database (Javascript or VB.net) 7 53
ReadyAPI 1.9.0 2 43
Because your company can’t afford for you to make SEO mistakes, you’ll want to ensure you’re taking the right steps each and every time you post a new piece of content. This list of optimization do’s and don’ts can help you become an SEO wizard.
When the s#!t hits the fan, you don’t have time to look up who’s on call, draft emails, call collaborators, or send text messages. An instant chat window is definitely the way to go, especially one like HipChat. HipChat is a true business app. An…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question