This is a discussion on "Slight end of script problem" within the Classic ASP section. This forum, and the thread "Slight end of script problem are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
Slight end of script problem
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
#1
|
|||
|
|||
|
At the end of a particular ASP script I'm working on, I have the following:
[ <a href="http://www.pagename.???">Back to home page</a> </body> </html> ]. Basically, this displays the anchor tag "Back to home page" on a blank background after presing the 'Submit' button in a HTM form, and subsequently clicking on this takes you to the destination page (href="http..... ). This is OK in itself, but far from ideal and it doesn't look very good. Basically, is there a way of directing visitors directly to a destination page (that would display a 'thank you' message) without them first having to click on an anchor link? Last edited by a.jenery; Apr 19th, 2006 at 11:01. |
|
|
|
#2
|
||||
|
||||
|
Re: Slight end of script problem
Try:-
__________________
Click the 'Thanks!' button if this post has helped you Rob - Webforumz Founder
Last Blog Entry: Creative Labs threaten developer over home made drivers.... (Apr 1st, 2008)
Last edited by Rob; Apr 21st, 2006 at 06:50. |
|
#3
|
|||
|
|||
|
Re: Slight end of script problem
Many thanks - that looks like it will work (though I don't really have a clue with my limited ASP knowledge...). I'll try it.
|
|
#4
|
|||
|
|||
|
This is what was displayed on the screen after pressing the 'Submit' button.
Response.write "thankyou for your submission " Response.write "Please wait whilst we transfer you... " Response.write "If you are not transferred, please click here" Response.redirect "http://www....." What I ment was, how can I redirect a visitor to a target/destination page without them having to click on an anchor tag? |
|
#5
|
||||
|
||||
|
Re: Slight end of script problem
you forgot to open and close the ASP tags....lol
I amended the code above.
__________________
Click the 'Thanks!' button if this post has helped you Rob - Webforumz Founder
Last Blog Entry: Creative Labs threaten developer over home made drivers.... (Apr 1st, 2008)
|
|
#6
|
|||
|
|||
|
Re: Slight end of script problem
Many thanks. The ASP script is:
[ <%@ Language=VBScript %> <html> <head> </head> <body> <% Dim iMsg Set iMsg = CreateObject("CDO.Message") Dim iConf Set iConf = CreateObject("CDO.Configuration") Dim Flds Set Flds = iConf.Fields Flds( "http://schemas.microsoft.com/cdo/configuration/sendusing") = 1 Flds("http://schemas.microsoft.com/cdo/configuration/smtpserverpickupdirectory") = "c:\inetpub\mailroot\pickup" '<-----xxx this path needs to point to the right place on the server. The hosts will know what it should say. Most probably, it will stay the same. Flds.Update Set iMsg.Configuration = iConf iMsg.To = "v_post2001@hotmail.com" '<----xxx Andy, change this to the email address you want the form to be sent to iMsg.From = Request.Form.Item("email") iMsg.Subject = "SND Article Submission" iMsg.AddAttachment Request.Form.Item("file"), Request.Form.Item("file") iMsg.TextBody = "LastName: " & Request.Form.Item("LastName") & vbCrLf & "Initial: " & Request.Form.Item("Initial") & vbCrLf & "Location: " & Request.Form.Item("Location") & vbCrLf & "email: " & Request.Form.Item("email") iMsg.Send %> <a href="http://www.....">Back to home page</a> </body> </html> ] So, do I replace %> <a href="http://www.....">Back to home page</a> with <% Response.write "thankyou for your submission<br /><br />" Response.write "Please wait whilst we transfer you...<br /><br /><br />" Response.write "If you are not transferred, please <a href="http://www...">click here</a>" Response.redirect "http://www..../yourpage.htm" %> Last edited by a.jenery; Apr 22nd, 2006 at 00:53. |
![]() |
| Tags |
| slight, end, script, problem |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Problem with Action Script | shaza2007 | Flash & Multimedia Forum | 4 | Apr 5th, 2007 19:01 |
| DHTML script problem! | Bruni | Web Page Design | 6 | Feb 28th, 2007 12:09 |
| slight problem with rollover menu | antonyx | Web Page Design | 1 | Feb 5th, 2007 21:43 |
| Problem with script structure ??? | DavidinLondon | PHP Forum | 1 | Jun 9th, 2006 08:52 |
| Pop-up Window Script Problem | James Lake | JavaScript Forum | 4 | Mar 24th, 2006 16:36 |