Trapping multiple button elements on a webpage
Posted: Mon Jan 24, 2011 8:37 am
I am trying to design a webpage that contains multiple buttons. These buttons are not submit or cancel buttons, but rather buttons that I would like to tie specific actions to in the MyDoPost() routine. Could you help me determine how to accomplish this?
HTML Page Code Snippet:
------------------------------
<p>
<button name="B1">1</button>
<button name="B2">2</button>
<button name="B3">3</button>
</p>
NetBurner Code Snippet:
-----------------------------
int MyDoPost(int sock, char *url, char *pData1, char *rxBuffer)
{
//Determine which page issued the submit and process accordingly
sprintf(buffer, "%s", url);
if(strncmp(buffer, "/INDEX.htm", 9)=0)
{
}
}
Thank You
HTML Page Code Snippet:
------------------------------
<p>
<button name="B1">1</button>
<button name="B2">2</button>
<button name="B3">3</button>
</p>
NetBurner Code Snippet:
-----------------------------
int MyDoPost(int sock, char *url, char *pData1, char *rxBuffer)
{
//Determine which page issued the submit and process accordingly
sprintf(buffer, "%s", url);
if(strncmp(buffer, "/INDEX.htm", 9)=0)
{
}
}
Thank You