javascript - Passing two values from child page to parent page -


i have script on child page should pass variable , image parent page.

<script type="text/javascript">  //<![cdata[  function choose(newvalue) {       parent.document.getelementbyid(location.search.substring(1)).value = newvalue;  }    jquery(window).load(function(){  jquery(".td-image-finiture").on("click", function(){      var finitura = jquery(this).children("img").attr("src");        parent.document.getelementbyid(location.search.substring(1)).src = finitura;  });  });    //]]>  </script>

on parent page have code:

<a class="cboxelement" href="<?php echo mage::geturl('', array('_secure' => mage::app()->getstore()->iscurrentlysecure())) . $_option->getdescription() ?>?options_<?php echo $_option->getid() ?>_text"><?php echo $this->__('choose color') ?></a> <input id="options_<?php echo $_option->getid() ?>_text" /> <img id="options_<?php echo $_option->getid() ?>_img" src=""/> 

at moment cannot pass bot values newvalue , finitura, it's 1 @ time, should change?


Comments

Popular posts from this blog

javascript - Clear button on addentry page doesn't work -

c# - Selenium Authentication Popup preventing driver close or quit -

tensorflow when input_data MNIST_data , zlib.error: Error -3 while decompressing: invalid block type -