News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Possibly Off Topic JS Question

Started by insightcreative, March 25, 2013, 11:31:25 AM

Previous topic - Next topic

insightcreative

Hi All

I have some custom fields for selecting the colour of a product, etc.  I have a link to a modal window that has swatches of the colours.

What I want is for people to be able to click on the colour in the modal window and for the colour on the parent page to be set.

I have changed a bit of code so that the form that contains the custom fields now has a name (name="myform")

The field in the custom fields form has a name of customPrice[1][30]

I open the modal window with the following code:

<a href="/embroidery-colours?tmpl=component&amp;ml=1" class="modalizer modalizer_link cboxElement" target="_blank" rel="{handler:'iframe',size:{x:'600',y:'300'}}">Click here</a>

In my modal window I have one image linked at the moment:

<a href="javascript:void(window.opener.myform.customPrice[1][30].value='2073')?ml=1"> <img width="25" height="25" src="/images/Colours/fuschia.gif" alt="fuschia" smartload="4"></a>

I know I could do this with an image custom field but I want to keep the product detail page as small as possible.

If anyone wants to see this in action, it's here:

http://mypersonalisedtowels.co.uk/luxury-range/luxury-embroidered-bath-towel-5-detail

If someone could help me with this, I'd be quite happy to pay a reasonable price.

Best regards
Andy