Question about event handler

0 LOKESH TODWAL · September 21, 2015
How to do it if I have to use 2 input buttons for different output(suppose I want to show an image).

Post a Reply

Replies

Oldest  Newest  Rating
0 Brotsky Tv · September 24, 2015
Put this script in your page :
<script>
   function submitForm(action)
   {
       document.getElementById('columnarForm').action = action;
       document.getElementById('columnarForm').submit();
   }
</script>
Modify your input code :
<input type="image" name="camper" onclick="submitForm('formindb_hoh_1.php')" value="camper" src="../images/apps/camperBtn.png" class="submit_button" />
<input type="image" name="medical" onclick="submitForm('formindb_hoh_2.php')" value="medica


For more Javascript tutorials : https://www.brotsky.tv/category/javascript/
  • 1

Javascript

107,348 followers
About

A scripting language that is added to standard HTML to create interactive effects, apps, games for the browser.

Links
Moderators