Wrox Programmer Forums
|
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Dreamweaver (all versions) section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 13th, 2005, 06:39 AM
Registered User
 
Join Date: May 2005
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Beginning MX 2004 pg. 221

Greetings,

I cannot get the following code to work on the top of pg. 221 to work for the validation form. Is there an error that I cannot detect? Browsers detect this error:
Error Type:
Microsoft VBScript compilation (0x800A03EA)
Syntax error
/thecookingplace/register.asp, line 23, column 78
Response.Write("We will email the information to you at <strong>" & strEmail &
-----------------------------------------------------------------------------^

I am typing exactly as indicated in book. I know this is likely very simple but I am a beginner and feel very insecure
when something goes wrong and I don't know why. :)

Thanks,
Beth Ellen

 
Old May 13th, 2005, 06:51 AM
Registered User
 
Join Date: May 2005
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Here is the code as indicated in book:

<%
if strContact = "email" then
Response.Write("We will email the information to you at <strong>" & strEmail &
"</strong>.")
Else
Response.Write("We will post the requested information to you at home.")
End if
%>

(note: I changed the "you" in book to "we").

 
Old May 14th, 2005, 01:58 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

I think a line break is causing the problem. This:

Response.Write("We will email the information to you at <strong>" & strEmail & "</strong>.")

should all be on one line.

For the book this was probably too long to display on a single line, so it was wrapped.

You can also use the line continuation character _ to split a line of code over multiple lines:

Response.Write("We will email the information to you at " & _
"<strong>" & strEmail & _
"</strong>.")

HtH,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
 
Old May 14th, 2005, 06:12 AM
Registered User
 
Join Date: May 2005
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Excellent. Thanks much! I look forward to learning the code better.

Beth






Similar Threads
Thread Thread Starter Forum Replies Last Post
Beginning DW.MX 2004 Global Soccer terry s Dreamweaver (all versions) 6 October 13th, 2004 02:40 PM
Beginning Dreamweaver Mx 2004 (Global Soccer) terry s Dreamweaver (all versions) 5 September 26th, 2004 06:08 AM
Beginning Dreamweaver MX 2004? stephman Dreamweaver (all versions) 6 January 22nd, 2004 05:03 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.