Search
 
SCRIPT & CODE EXAMPLE
 

HTML

onclick call php function with parameters

<input type='button' name='Release' onclick="downloadFichier(param1, param2)" value='Click to Release'>
<script>
  function downloadFichier(param1, param2){

        $.ajax({
            type: 'POST',
            url: 'file_product.php',
            data: "param1=" + param1 + "&param2=" + param2,
            success: function(data) {
                $("p").text(data);
            }
        });
</script>
Comment

PREVIOUS NEXT
Code Example
Html :: html games for mobile 
Html :: bulma file upload 
Html :: CLI configuration File in terraform ? 
Html :: HTML <small Element 
Html :: what is participe passe 
Html :: navbar bootstrap 5 
Css :: how to alternate background colour in html div elements in css 
Css :: how to do a smooth transform scale 
Css :: stop text from wrapping 
Css :: css rotate 90 deg 
Css :: matinput remove underline 
Css :: css placeholder color 
Css :: smooth scroll to anchor 
Css :: vertically and horizontally center a fixed div 
Css :: stop selection css 
Css :: new line in url 
Css :: there is no tracking information for the current branch 
Css :: @media for mobile 
Css :: invert css 
Css :: css center vertically and horizontally 
Css :: css select all except first 
Css :: tint png white css 
Css :: text decoration none 
Css :: css fadeIn opacity transition 
Css :: how to stretch the background image in css 
Css :: css center text in div 
Css :: css make text not highlightable 
Css :: media queries on mobile 
Css :: css horizontal ul 
Css :: less calc 
ADD CONTENT
Topic
Content
Source link
Name
3+3 =