button click ... linking of 2 pages :-(((( --pls help!

Ask a Question related to ASP, Design and Development.

  1. #1

    Default button click ... linking of 2 pages :-(((( --pls help!

    hey hi...
    this in in continuation to my other post. i am trying hard
    and cannot find out whats the problem. i am getting
    crazy...please asp experts ...do resolve the problem...its
    something very simple which i am doign wrong.
    wehn i clcik to the submit button ....its absolutely dead
    nothing happens!!!!!!!!!!!!!!! why so :-(((((((

    this is my select.asp script:

    <html>
    <head>
    <title> monika </title>
    </head>
    <body>
    <form method="post" action="submit.asp">
    <table><tr><td bgcolor="SILVER">
    <BIG> <B> <FONT COLOR=blue>
    WELCOME 'STUDENT_NAME'

    TODAY IS <%=DATE()%></b></td><p></p></tr>
    </table><p></p>
    <input type = "text" size ="50" maxlength=90 name
    = "txtStory"><p></P>
    <input type="button" value="SUBMIT" >
    </form>
    </body>
    </html>

    this is my submit.asp script:
    <html>
    <head>
    <title>monika m</title>
    </head>
    <body>
    <%
    Dim strStoryContent
    DIM RSA
    DIM QUERY1
    DIM ConnString
    DIM Conn
    response.write "comes in submit"
    ConnString = "Driver={MySQL ODBC 3.51 Driver};"
    ConnString = ConnString & "Port=3306; "
    ConnString = ConnString & "DATABASE=test; "
    strStoryContent = Request.form("txtStory")

    If Request.form("SUBMIT") <> "" then
    response.write "come1"
    If Request("txtStory")<>"" then
    response.write "come2"
    Set Conn = Server.CreateObject("ADODB.Connection")
    Conn.Open ConnString
    set RSA = Server.CreateObject("ADODB.Recordset")
    QUERY1 = "INSERT INTO student_content
    (student_id,story_id,status_student,story_original _story_wo
    rd_count) VALUES
    ('1','100','draft','"&strStoryContent&"',4)"
    Set rsa = conn.Execute(QUERY1)
    End If
    ELSE
    RESPONSE.WRITE ("SUBMIT IS A ZERO LENGTH STRING")
    end if
    %>
    </body>
    </html>


    janet Guest

  2. Similar Questions and Discussions

    1. Linking pages
      hi, i am not able to view the pages that are linked in the web site design file. I have set up hyperlinks to each page through hyperlinked words...
    2. WWW::Mechanize click($button) not finding right button to click
      Based on wise advice from participants of this forum, I rewrote my web automation script using WWW::Mechanize. The script now successfully logs...
    3. Button.Init? how Do I know if click event has been fired? TextBox.TextChanged event before Button.Click in a CompositeCustomControl.
      Hello I have the following situation: (everything is dynamic (controls.add)) 1. Button.Init { WasButtonClickFired = true } 2....
    4. linking button to URL
      //I have tried the method as a function. getURL("www.lycos.com", "_blank", "POST"); it does not work for some reasons. Please clarify. Thanks....
    5. Button Linking?
      Hey guys, I'm sorta new to flash and I made an intro to a website I'm developing and I created a button. Now I need someone to help me, I need to...
  3. #2

    Default Re: button click ... linking of 2 pages :-(((( --pls help!

    You need a "submit" input element.

    <input type="submit" value="submit" name="submit"

    *not*

    <input type="button">

    A type="button" does not submit the form.

    Cheers
    Ken

    "janet" <knowgroup@hotmail.com> wrote in message
    news:02c301c366ef$6eebf440$a001280a@phx.gbl...
    : hey hi...
    : this in in continuation to my other post. i am trying hard
    : and cannot find out whats the problem. i am getting
    : crazy...please asp experts ...do resolve the problem...its
    : something very simple which i am doign wrong.
    : wehn i clcik to the submit button ....its absolutely dead
    : nothing happens!!!!!!!!!!!!!!! why so :-(((((((
    :
    : this is my select.asp script:
    :
    : <html>
    : <head>
    : <title> monika </title>
    : </head>
    : <body>
    : <form method="post" action="submit.asp">
    : <table><tr><td bgcolor="SILVER">
    : <BIG> <B> <FONT COLOR=blue>
    : WELCOME 'STUDENT_NAME'
    :
    : TODAY IS <%=DATE()%></b></td><p></p></tr>
    : </table><p></p>
    : <input type = "text" size ="50" maxlength=90 name
    : = "txtStory"><p></P>
    : <input type="button" value="SUBMIT" >
    : </form>
    : </body>
    : </html>
    :
    : this is my submit.asp script:
    : <html>
    : <head>
    : <title>monika m</title>
    : </head>
    : <body>
    : <%
    : Dim strStoryContent
    : DIM RSA
    : DIM QUERY1
    : DIM ConnString
    : DIM Conn
    : response.write "comes in submit"
    : ConnString = "Driver={MySQL ODBC 3.51 Driver};"
    : ConnString = ConnString & "Port=3306; "
    : ConnString = ConnString & "DATABASE=test; "
    : strStoryContent = Request.form("txtStory")
    :
    : If Request.form("SUBMIT") <> "" then
    : response.write "come1"
    : If Request("txtStory")<>"" then
    : response.write "come2"
    : Set Conn = Server.CreateObject("ADODB.Connection")
    : Conn.Open ConnString
    : set RSA = Server.CreateObject("ADODB.Recordset")
    : QUERY1 = "INSERT INTO student_content
    : (student_id,story_id,status_student,story_original _story_wo
    : rd_count) VALUES
    : ('1','100','draft','"&strStoryContent&"',4)"
    : Set rsa = conn.Execute(QUERY1)
    : End If
    : ELSE
    : RESPONSE.WRITE ("SUBMIT IS A ZERO LENGTH STRING")
    : end if
    : %>
    : </body>
    : </html>
    :
    :


    Ken Schaefer Guest

  4. #3

    Default Re: button click ... linking of 2 pages :-(((( --pls help!

    hey thanks buddy ... a sign of relief and i am on the
    next page...

    but still its goign to the else part. How can i use this
    validation :
    If Request.form("SUBMIT") <> "" then
    ----

    this submit value is the one which i get when i click the
    submit button. but still my code is not getting executed.
    my 'if' condition is not getting satisfied???? why so? any
    light?
    >-----Original Message-----
    >You need a "submit" input element.
    >
    ><input type="submit" value="submit" name="submit"
    >
    >*not*
    >
    ><input type="button">
    >
    >A type="button" does not submit the form.
    >
    >Cheers
    >Ken
    >
    >"janet" <knowgroup@hotmail.com> wrote in message
    >news:02c301c366ef$6eebf440$a001280a@phx.gbl...
    >: hey hi...
    >: this in in continuation to my other post. i am trying
    hard
    >: and cannot find out whats the problem. i am getting
    >: crazy...please asp experts ...do resolve the
    problem...its
    >: something very simple which i am doign wrong.
    >: wehn i clcik to the submit button ....its absolutely
    dead
    >: nothing happens!!!!!!!!!!!!!!! why so :-(((((((
    >:
    >: this is my select.asp script:
    >:
    >: <html>
    >: <head>
    >: <title> monika </title>
    >: </head>
    >: <body>
    >: <form method="post" action="submit.asp">
    >: <table><tr><td bgcolor="SILVER">
    >: <BIG> <B> <FONT COLOR=blue>
    >: WELCOME 'STUDENT_NAME'
    >:
    >: TODAY IS <%=DATE()%></b></td><p></p></tr>
    >: </table><p></p>
    >: <input type = "text" size ="50" maxlength=90 name
    >: = "txtStory"><p></P>
    >: <input type="button" value="SUBMIT" >
    >: </form>
    >: </body>
    >: </html>
    >:
    >: this is my submit.asp script:
    >: <html>
    >: <head>
    >: <title>monika m</title>
    >: </head>
    >: <body>
    >: <%
    >: Dim strStoryContent
    >: DIM RSA
    >: DIM QUERY1
    >: DIM ConnString
    >: DIM Conn
    >: response.write "comes in submit"
    >: ConnString = "Driver={MySQL ODBC 3.51 Driver};"
    >: ConnString = ConnString & "Port=3306; "
    >: ConnString = ConnString & "DATABASE=test; "
    >: strStoryContent = Request.form("txtStory")
    >:
    >: If Request.form("SUBMIT") <> "" then
    >: response.write "come1"
    >: If Request("txtStory")<>"" then
    >: response.write "come2"
    >: Set Conn = Server.CreateObject("ADODB.Connection")
    >: Conn.Open ConnString
    >: set RSA = Server.CreateObject("ADODB.Recordset")
    >: QUERY1 = "INSERT INTO student_content
    >:
    (student_id,story_id,status_student,story_original _story_wo
    >: rd_count) VALUES
    >: ('1','100','draft','"&strStoryContent&"',4)"
    >: Set rsa = conn.Execute(QUERY1)
    >: End If
    >: ELSE
    >: RESPONSE.WRITE ("SUBMIT IS A ZERO LENGTH STRING")
    >: end if
    >: %>
    >: </body>
    >: </html>
    >:
    >:
    >
    >
    >.
    >
    janet Guest

  5. #4

    Default Re: button click ... linking of 2 pages :-(((( --pls help!

    Do this (on your second page), to see what is actually in your Request.Form
    collection:

    <%
    For Each Item in Request.Form

    Response.Write(Item & " = " & Request.Form(Item) & "<br>")

    Next
    %>

    which should give you a listing of all the different items that have been
    submitted, and their values.

    Cheers
    Ken


    "janet" <knowgroup@hotmail.com> wrote in message
    news:030e01c366f4$3c21fe60$a001280a@phx.gbl...
    : hey thanks buddy ... a sign of relief and i am on the
    : next page...
    :
    : but still its goign to the else part. How can i use this
    : validation :
    : If Request.form("SUBMIT") <> "" then
    : ----
    :
    : this submit value is the one which i get when i click the
    : submit button. but still my code is not getting executed.
    : my 'if' condition is not getting satisfied???? why so? any
    : light?


    Ken Schaefer Guest

  6. #5

    Default WONDERFUL!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

    hey ken..........

    superb.........

    u r were abs right...
    i had to make the following changes:
    If Request.form("send") = "SUBMIT" then

    and its working.....

    i wish i cud treat u ...;-)

    thanks tremendously!
    >-----Original Message-----
    >Do this (on your second page), to see what is actually in
    your Request.Form
    >collection:
    >
    ><%
    >For Each Item in Request.Form
    >
    > Response.Write(Item & " = " & Request.Form(Item)
    & "<br>")
    >
    >Next
    >%>
    >
    >which should give you a listing of all the different
    items that have been
    >submitted, and their values.
    >
    >Cheers
    >Ken
    >
    >
    >"janet" <knowgroup@hotmail.com> wrote in message
    >news:030e01c366f4$3c21fe60$a001280a@phx.gbl...
    >: hey thanks buddy ... a sign of relief and i am on the
    >: next page...
    >:
    >: but still its goign to the else part. How can i use this
    >: validation :
    >: If Request.form("SUBMIT") <> "" then
    >: ----
    >:
    >: this submit value is the one which i get when i click
    the
    >: submit button. but still my code is not getting
    executed.
    >: my 'if' condition is not getting satisfied???? why so?
    any
    >: light?
    >
    >
    >.
    >
    janet Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139