I have one php file named sample.php
, which includes the following code:
$abc = new DOTNET("FirstDotNet, Version=1.0.0.0, Culture=neutral, PublicKeyToken=xxxxxxxxxxxxx", "FirstDotNet.Class1");
echo $abc->Connect();
echo $abc->PrintItem();
echo "<img src=\"image.png\" onclick=\"\" />";
What I want is:
- Run first two row codes in the beginning of page load (this is ok as usual)
- Don't allow the third line code in the beginning of the page load.
- Allow to the third line of code to run when I click the image.
Those actions must be on the same php
page, not with form posting or with the help of another php file.
Is this possible? How I can trigger the third row of code after the page is loaded?