Hi,
i want to have a button that runs a file that opens a box to add images, so i was able to do that. however i want to be able to add a second image when i click the button again, but that doesnt work.
code:
<button type='button' id='addTextButton'>Add a Text Box</button>
<br>
<button type='button' id='addImageButton'>Add an Image</button>
<br>
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/upload_script.js"></script>
<script>
$(document).ready(function(){
$("#addImageButton").click(function(){
$("#imgsandtxt").load("functions/uploadimageview.html");
});
$("#addTextButton").click(function(){
$("#imgsandtxt").load("functions/addTextView.html");
});
});
</script>
<div id='imgsandtxt'></div>
I think the problem is because of the div since thats where my html is going and when i click the button again it replaces the old html with the new one instead of making a new one. i guess what im asking is how do i make it make a new div and put the html into that whenever i click the button