ASP Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreASP Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
  #1  
Old August 20th, 2003, 02:45 AM
aspuser25 aspuser25 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Posts: 141 aspuser25 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
button click ... linking of 2 pages :-((((

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' &nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
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_word_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>

Reply With Quote
  #2  
Old August 20th, 2003, 03:02 AM
tomsn tomsn is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Location: Dresden, Germany
Posts: 44 tomsn User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 13 m 9 sec
Reputation Power: 5
Send a message via ICQ to tomsn
try

Code:
<input type="submit" value="SUBMIT" >


instead of

Code:
<input type="button" value="SUBMIT" >


tom

Reply With Quote
  #3  
Old August 20th, 2003, 03:13 AM
aspuser25 aspuser25 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Posts: 141 aspuser25 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
a little progress

hey thanks.....

this really helped... it comes to the other page at least. thanks.

though its not executing the code but at least some progress. in the else page its goign to the else part: can u help me why is it so?

<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>

Last edited by aspuser25 : August 20th, 2003 at 03:17 AM.

Reply With Quote
  #4  
Old August 20th, 2003, 03:27 AM
tomsn tomsn is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Location: Dresden, Germany
Posts: 44 tomsn User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 13 m 9 sec
Reputation Power: 5
Send a message via ICQ to tomsn
Code:
Request.form("SUBMIT") 

will be empty, this form-element doesn't exist in your form.

use

Code:
<input type="submit" name="send" value="SUBMIT" > 


and then you can request the value with

Code:
Request.Form("send")


a little advice:
use also the name attribute in your form-tag.

Reply With Quote
  #5  
Old August 20th, 2003, 03:44 AM
aspuser25 aspuser25 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Posts: 141 aspuser25 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
stilll no effect

i tried what u said...it made a lot of sense. pls see code below:
but still its goign to else condition. i also tried
If Request.form("send") then

am i putting a correct condition???

pls advise
thanks

<html>
<head>
<title>sdad</title>
</head>
<body>
<%
Dim strStoryContent
DIM RSA
DIM QUERY1
DIM ConnString
DIM Conn
dim var1

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("send") <> "" 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_word_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>

Reply With Quote
  #6  
Old August 20th, 2003, 03:56 AM
aspuser25 aspuser25 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Posts: 141 aspuser25 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
Thumbs up thanks!!!!!!!!!!!

i fianlly resolved the problem....hey thanks all ......
i simply had to put this condition:

If Request.form("send") = "SUBMIT" then


i am really thankful to u all ....

gr8 help... otherwise i wud have been struggling all way..

Reply With Quote
  #7  
Old August 20th, 2003, 03:58 AM
tomsn tomsn is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Location: Dresden, Germany
Posts: 44 tomsn User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 13 m 9 sec
Reputation Power: 5
Send a message via ICQ to tomsn
if you you use
Code:
If Request.form("send") then 


a boolean value is expected.

ok, try this

Code:
If Request.form("send")&"" <> "" then


before you go to the condition you also can print the value of Request.form("send") for debugging, so you can see, if the value is posted correctly. if it's not, you'll have to search the bug in your form...

tom

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreASP Programming > button click ... linking of 2 pages :-((((


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

 Free IT White Papers!
 
Accelerating Trading Partner Performance
One in five. That's how many partner transactions have at least one error. That is an amazing statistic, particularly given the extraordinary leaps in innovation across the global supply chain during the past two decades. Download this white paper to learn more.

 
Competing on Analytics
This Tech Analysis is designed to help identify characteristics shared by analytics competitors, and includes information about 32 organizations that have made a commitment to quantitative, fact-based analysis.

 
Cost Effective Scaling with Virtualization and Coyote Point Systems
An overview of the industry trend toward virtualization, how server consolidation has increased the importance of application uptime and the steps being taken to integrate load balancing technology with virtualized servers.

 
Five Checkpoints to Implementing IP Telephony
Implementation planning for IP PBX software and IP telephony has become vital as businesses replace discontinued legacy PBX phone systems. This informative whitepaper outlines five "checkpoints" for any implementation plan that will help make IP communications a successful proposition.

 
Hosted Email Security: Staying Ahead of New Threats
In the last two years, email has become a fierce battleground between the nefarious forces of spam and malware, and the heroes of messaging protection. The spam volumes increased alarmingly every month, bringing clever new forms of phishing and virus propagation attacks.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway