pass variable

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • weiwei

    pass variable

    Hi all
    How can I pass the variable in two button situation see below code
    <html>
    <body>
    <form action="" method="post">
    <input type="text" name="name">
    <input type="button" value="Add"
    onclick="this.f orm.action='add .asp?name=<%=na me%>';this.form .submit();"><br >
    <input type="button" value="Delete"
    onclick="this.f orm.action='del ete.asp';this.f orm.submit();">
    </form>
    </body>
    </html>
    As a result, I got to the next page , but showing error

    thanks in advance
    wei
  • Curt_C [MVP]

    #2
    Re: pass variable

    use clientside code.

    this.Formname.T extboxName.valu e


    Curt

    "weiwei" <Wei.Huang@slps .org> wrote in message
    news:d32b0478.0 408201033.19145 c57@posting.goo gle.com...[color=blue]
    > Hi all
    > How can I pass the variable in two button situation see below code
    > <html>
    > <body>
    > <form action="" method="post">
    > <input type="text" name="name">
    > <input type="button" value="Add"
    > onclick="this.f orm.action='add .asp?name=<%=na me%>';this.form .submit();"><br >
    > <input type="button" value="Delete"
    > onclick="this.f orm.action='del ete.asp';this.f orm.submit();">
    > </form>
    > </body>
    > </html>
    > As a result, I got to the next page , but showing error
    >
    > thanks in advance
    > wei[/color]


    Comment

    Working...