0

Hi!
Look.
I have such sequence
A few divs with different names which are generated automatically <div id="<?php echo $oneid;>"> then I have inside each this div input fields and
button with next attributes

<a  id="buttonid" class="button"><span><?php echo $button; ?></span></a>
     </div>

And below I have javascript which is applying only to one certain div class with name active so I have to make div with any id work when button was pressed.

<script type="text/javascript"><!--
$('#buttonid').bind('click', function() {
    	$.ajax({
		url: 'index.php?route=path/to/update',
		type: 'post',
		data: $('.active input[type=\'text\'], .active input[type=\'hidden\'], .active input[type=\'radio\']:checked, .active input[type=\'checkbox\']:checked, .active select, .active textarea') ............

This is the question how to make work this script after user press any $button?
When on page is only one div it works fine.
Next way doesnt work <a onclick="document.getElementById('<?php echo $oneid;?>').setAttribute('class', 'active');" id="buttonid" class="button"><span><?php echo $button; ?></span></a> Any ideas?

2
Contributors
1
Reply
2
Views
6 Years
Discussion Span
Last Post by stbuchok
0

Can you please try to explain this a little clearer?

Also can you show all of the code for the button click.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.