Hide arrow in a DropDownList

I would like to hide the arrow and set the border to none for some DropDownLists before to print them and put them back after. Does anyone know how to do it in Javascript?
edi02Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

NiversoftCommented:
Unfortunately, the drop-down list is generated by the OS and is not possible to change it's style, including changing the border, the arrow, etc. Yes, I know, that's a shame.

You can only change the font family, size and color of the <option> objects

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
AnarchonCommented:
What Niversoft said...you're stuck with the OS's rendering.

You COULD, possibly, implement a "drop-down-like" element for rendering something with the desired properties, using CSS. Then, during the print phase, you'd swap that element for the actual drop-down, swapping back to the original after the printing. This would require:

-  development of the proper-appearing fake element
-  application of an id to some containing element such as a div or span
-  detection of the initiation of the printing
-  firing if an "on" event-handler to swap the fake element for the real one by changing the innerHTML for the containing element by id
-  detection of the end of the printing (for your purpose)
-  firing if an "on" event-handler to swap the real element for the fake one by changing the innerHTML for the containing element by id

If you want to this for ALL drop-downs generically, presuming a way to do it for ANY can be implemented, you could use a class and apply the swapping to all elements of the class. This is even less simple. All in all, this would be a fantasitically convoluted exercise in CSS and event management.

I'd recommend you accept Niversoft's answer. Lame tho' the appearance may be for your purpose, explain to your users that some stuff "just is."
edi02Author Commented:
Thanks Niversoft and Anarchon. My guess was the same after doing some research on Google but I said to myself - an expert opinion would be better.
I will stick with this.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
JavaScript

From novice to tech pro — start learning today.