Hi All
In the past I made a simple javascript (using jQuery functions) to hide/show some fields in user registration/edit from: this script hides some fields based on the first user form radio button value.
It hides/shows tables and fields based on their id (I customized the VM edit_address_userfields.php template to add id to tables).
After upgrading from 3.0.16 to 3.0.18.6 I have a problem in displaying Country and City dropdowns: the VM script is no more able to assign them their dynamic width.
Is there a way to understand which VM recent change is causing this??? I can't locate the script currently assigning the dynamic width to the dropdowns.
You can see the 3.0.16 version working at http://toolware.it/it/registrazione-clienti-rivenditori.html : clicking on one of the radiobutton values 'Mi iscrivo come CLIENTE PRIVATO (NON HO una PARTITA IVA)' or 'Mi iscrivo come SOCIETÀ/Libero Professionista (HO una PARTITA IVA)' or 'Mi iscrivo come RIVENDITORE' the script toggles some fields as desired. The same script dosn't work anymore in VM 3.0.18.6, so I presume something changed somewhere...
It seems the actual VM version can't assign dinamyc width to elements having an id and/or being hidden, but the previous was working.
Thank you in advance for any hint.
Regards
are u now "Using Chosen" in the frontend and before u weren't?
I have simply upgraded to VM 3.0.18, no other changes: the table containing Country and City dropdowns are set to hidden when loading the page, and then set to show when checking the radiobutton, as before.
But before the dropdowns width were correctly assigned (calculated on the dropdown field content), and now are set to 0
After upgrading I get for example this:
<div id="virtuemart_country_id_field_chzn" class="chzn-container chzn-container-single" style="width: 0px;">
before uprading I was getting this:
<div id="virtuemart_country_id_field_chzn" class="chzn-container chzn-container-single" style="width: 351px;">
As you can see, before upgrading the width was correctly assigned to the <div>. And it was also correctly changing when choosing another dropdown value, according with the choosen dropdown value string lenght
maybe the chosen version has changed .. or chosen can't detect the width if initially set to display none?
test by displaying initially
Already tested when the table is initially set to display, and it works. It doesn't work anymore when the table start as hidden. Any hint on where to look to find what has changed?
Previuos VM version was working also when table was hidden
http://dev.virtuemart.net/projects/virtuemart/repository
but with a quick look I don't see anything that would affect what you mention
Yes, I made the same look for: this is why I'm asking for any hint... maybe Milbo could please help me, when having spare time? Thanks in advance. Regards
In the meantime can u not just target the width with a css !important if the width is the only problem?
I would, but the width it embedded and set dynamically: it's not assigned to the intial dropdown (that is actually hidden by VM default mode) created by php template, but to an overlapped dropdown element probably inserted by a script, so it's impossible for me to set it in any manner without locating the script originating it (due to my limited specific knowledge)
To get the same results I have sorrounded each table with a div, zeroing its height. It seems to have solved the issue.
Thank you anyway for helping
Strange thing. Step. I have no clue, why it changed.