how to capture a particular value in dropdow attribute magento - magento

I have an attribute called "Tam" type dropdown
with several different values
need to display a custom image in list.phtml when the selected value is equal to "Regulável"
can anyone help me how to capture this specific value and display the image?
thank you

You need to use jquery code, it is simple way
you can get its value by
jQuery(this).value;
You also need to get image path by jQuery and you can replace image with jQuery.

Related

How to set Data Set Values in Master Page Footer

I am new to BIRT can you guys help me in this, my requirement is like, I have two fields PMNUM and CHANGEID, I need to show these two fields in master page footer based on third column value TYPE. If TYPE is PM I need to show PMNUM and if TYPE is CM I need to show CHANGEID.
I followed this https://www.youtube.com/watch?v=lw_k1qHY_gU&t=4s video to get PMNUM in the footer. But the problem here is if I hide PMNUM From the table, the PMNUM from the footer also hiding. Please guide me on how to solve this problem and share some guide for BIRT events.
You can add some script inside your table and assign PNUM and CHANGEID to global variables.
In the page footer reference to the global variables instead of the table's values that in your case may be hidden.

Sitecore page editor dropdown

I would kindly ask for your help :) From couple of days I am trying to achieve "linked" custom field in content editor and dropdown in page editor.
Basically I want to have dropdown in page editor and content editor which are responsible for a same thing.
In my c# code i have enums which represent directions. I created custom field which accepts assembly and class with overridden onload method and successfully populate dropdown values in the content editor. So far so good but i have no idea how to create dropdown which will represent the same functionality inside page editor.
So please give me any ideas...
Judging from your reply to my comment you need to think of the following: How is my field value being rendered onto a page?
If you are always using 1 control to do this then you just need to ensure that this control has 2 different rendering modes depending on the Context.PageMode
But as I understand it you want this dropdown to also appear when someone renders your custom field using a <sc:FieldRenderer>. In this case you'll need to look into the RenderField pipeline of Sitecore. There you find a processor called RenderWebEditing. Possibly through some manipulation here you can get your dropdown appear as you wish.

Flex add images to datagrid cell programmaticlaly

I have a flex application with a datagrid created dynamically. Also this datagrid is populated dynamically and some columns must show images.
The number of images in each cell is variable and depends on user selection.
I am not sure how I manage this. Should I assign an Item Renderer to those columns with a TileList and then add images to it when the user changes its selection? If so, please tell me how.
I can manage it using a ItemRenderer with a TileList. then I pass the result data as a itemrenderer parameter. Thanks!

Smarty to check select box value

I have two HTML Forms in a webpage. One having a select box. So i may want to check in second form if first form has selected some value and if it has, capture that value. I am using Smarty templates for these HTML form. Is there some workaround with this ? Thanks.

Add an icon instead of a text in a column

in JQGrid 3.8, is it possible to have an icon instead of text in a column ?
I don't think it's possible but if you have a trick, i'd be happy
There are many ways to add icons in the grid. First way is: the data which be placed in the column header (colNames) or inside of the cell data could be HTML data. So you can easy insert the <img> element in the grid. One more method is th use custom formatters. See here some demos. If the standard jQuery UI icons contain all the icons which you need I would recommend you to use there.

Resources