Programming Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsOtherProgramming Help

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
 
Unread ASP Free Forums Sponsor:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old January 7th, 2004, 08:46 PM
*bounce* *bounce* is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Posts: 1 *bounce* User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Exclamation Need help with calling form...

Hello...

I am working on a form that will be filled out in one page and when you click on submit it will take what you entered and put it in with other text and display on another page. To see what I mean go here:
URL
Fill in the fields and hit submit. When it takes you to the new page it is blank. It is supposed to take what you entered and mix it with other text and display code to make an HTML page. The one file has this in it:
***
Index.asp
***

<html>
<body>
<form method="post" action="generate_it.asp">
Title of Site: <input type="text" name="title" size="20"><BR><BR>
Web Address to Main Picture: <input type="text" name="picture" size="20"><BR><BR>
Content: <input type="text" name="content" size="20"><BR><BR>
Another Picture: <input type="text" name="pic1" size="20"><BR><BR>
Another Picture: <input type="text" name="pic2" size="20"><BR><BR>
Another Picture: <input type="text" name="pic3" size="20"><BR><BR>
Link: <input type="text" name="link1" size="20"><BR><BR>
Name of Link: <input type="text" name="name1" size="20"><BR><BR>
Link: <input type="text" name="link2" size="20"><BR><BR>
Name of Link: <input type="text" name="name2" size="20"><BR><BR>
Link: <input type="text" name="link3" size="20"><BR><BR>
Name of Link: <input type="text" name="name3" size="20"><BR><BR>
Link: <input type="text" name="link4" size="20"><BR><BR>
Name of Link: <input type="text" name="name4" size="20"><BR><BR>
Link: <input type="text" name="link5" size="20"><BR><BR>
Name of Link: <input type="text" name="name5" size="20"><BR><BR>
<input type="submit" value="Submit">
</form>
</body>
</html>

And the other has this in it:
***
Generate_It.asp
***
<%
If title<>"" Then
Response.Write("<html><head><title>" & Request.Form("title") & "</title></head><br />")
Response.Write("<body><h1> " & title & "</h1>")
End If
If picture<>"" Then
Response.Write("" & picture & "")
End If
If content<>"" Then
Response.Write("<BR><BR><table width=85% align=center>" & content & "</table><BR><BR>")
End If
If pic1<>"" Then
Response.Write("" & pic1 & " ")
End If
If pic2<>"" Then
Response.Write("" & pic2 & " ")
End If
If pic3<>"" Then
Response.Write("" & pic3 & "")
End If
If link1<>"" Then
Response.Write("<a href="" & link1 & "">")
End If
If name1<>"" Then
Response.Write("" & name1 & "</a> | ")
End If
If link2<>"" Then
Response.Write("<a href="" & link2 & "">")
End If
If name2<>"" Then
Response.Write("" & name2 & "</a> | ")
End If
If link3<>"" Then
Response.Write("<a href="" & link3 & "">")
End If
If name3<>"" Then
Response.Write("" & name3 & "</a> | ")
End If
If link4<>"" Then
Response.Write("<a href="" & link4 & "">")
End If
If name4<>"" Then
Response.Write("" & name4 & "</a> | ")
End If
If link5<>"" Then
Response.Write("<a href="" & link5 & "">")
End If
If name5<>"" Then
Response.Write("" & name5 & "</a><BR><BR></body></html>")
End If
%>

What do I do to fix this so it works?

Reply With Quote
  #2  
Old January 9th, 2004, 01:00 PM
shamrog12's Avatar
shamrog12 shamrog12 is offline
Newton's Apple Wizard
ASP Free Intermediate (1500 - 1999 posts)
 
Join Date: Nov 2003
Location: Los Angeles
Posts: 1,661 shamrog12 User rank is Sergeant Major (2000 - 5000 Reputation Level)shamrog12 User rank is Sergeant Major (2000 - 5000 Reputation Level)shamrog12 User rank is Sergeant Major (2000 - 5000 Reputation Level)shamrog12 User rank is Sergeant Major (2000 - 5000 Reputation Level)shamrog12 User rank is Sergeant Major (2000 - 5000 Reputation Level)shamrog12 User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 3 Weeks 2 Days 2 h 39 m 22 sec
Reputation Power: 34
Send a message via AIM to shamrog12
Here is a small example of what you're doing wrong on the Generate_It.asp

If picture<>"" Then
Response.Write("" & picture & "")
End If


should be...

If Request.form("picture") <>"" Then
Response.Write(Request.form("picture"))
End If

Let me know if you need more help. You'll have ot make this kind of change to all if your If statements.

Reply With Quote
Reply

Viewing: ASP Free ForumsOtherProgramming Help > Need help with calling form...


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


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





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