Results 1 to 2 of 2

Thread: ASP ... can you call a subroutine via a Form Action

  1. #1
    Senior Member
    Join Date
    Jan 2008
    Posts
    636
    Thanks
    79
    Thanked 23 Times in 20 Posts
    Rep Power
    223
    Reputation
    171

    Default ASP ... can you call a subroutine via a Form Action

    I have an ASP page that collects data via a form, then with a form action it opens a second ASP page that emails the info to me.

    This works as it should, but I'm trying to remove the second page by transferring the emailing code to within the first page (as a subroutine).

    Can this sub be called via the form action?

    Tried the following without success.

    <form name="frm_Submit" method="post" action="<%=Sub EmailTips%>" onSubmit="return validateForm()">

    Cheers
    AussieM8



Look Here ->
  • #2
    Member Toohey's Avatar
    Join Date
    Jan 2009
    Location
    Here, There and Everywhere
    Age
    40
    Posts
    431
    Thanks
    38
    Thanked 27 Times in 21 Posts
    Rep Power
    202
    Reputation
    97

    Default

    Why not just post it to the same page with either of the following.

    1. <form name="frm_Submit" method="post" action="page.asp?send=1" onSubmit="return validateForm()">

    OR

    2. <form name="frm_Submit" method="post" action="page.asp" onSubmit="return validateForm()">
    <input type="hidden" name="action" value="send">

  • Bookmarks

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •