Passing Variable To Popup Box
i have a bit complicated problem about passing variables in php. I have listed and nested items in html
- tag and near every item i have button which should edit name of
Solution 1:
I think the best option will be to use jQuery. Here's a working example, setting dynamically the path of the forms
$('.toggler').click(function(){
var path = $(this).attr('path');
$('#popupEdit').css('display','block');
$('.pathinput').val(path);
$('.path').text(path);
});
<scriptsrc="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script><buttonclass="toggler"path="example text">Click Me</button><buttonclass="toggler"path="example text 2">Click Me 2</button><buttonclass="toggler"path="example text 3">Click Me 2</button><divid="popupEdit"class="popupEdit"style="display: none"><pclass="path"></p><divclass="popupEdit-content"><formaction="rename.php"method="post"><inputtype="text"name="path"class="pathinput"value="PATHHERE" ><inputtype="text"name="new-name"placeholder="nowa nazwa"><inputtype="submit"value="Submit"class="popupEdit-submit"></form></div></div>
Post a Comment for "Passing Variable To Popup Box"