Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
SolvedPrivate

Change values of dropdown without comprmising fucntionality

Posted on 2015-02-06
10
Medium Priority
?
23 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
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
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 2000 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

Looking for a new Web Host?

Lunarpages' assortment of hosting products and solutions ensure a perfect fit for anyone looking to get their vision or products to market. Our award winning customer support and 30-day money back guarantee show the pride we take in being the industry's premier MSP.

Question has a verified solution.

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

When it comes to write a Context Sensitive Help (an online help that is obtained from a specific point in state of software to provide help with that state) ,  first we need to make the file that contains all topics, which are given exclusive IDs. …
When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
The viewer will learn how to count occurrences of each item in an array.
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).
Suggested Courses

610 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