Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Web Programming > Adobe Web Programming > Dreamweaver (all versions)
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old May 13th, 2005, 06:39 AM
Registered User
 
Join Date: May 2005
Location: , , .
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

Reply With Quote
  #2 (permalink)  
Old May 13th, 2005, 06:51 AM
Registered User
 
Join Date: May 2005
Location: , , .
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").

Reply With Quote
  #3 (permalink)  
Old May 14th, 2005, 01:58 AM
Imar's Avatar
Wrox Author
Points: 72,055, Level: 100
Points: 72,055, Level: 100 Points: 72,055, Level: 100 Points: 72,055, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,086
Thanks: 80
Thanked 1,587 Times in 1,563 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.
Reply With Quote
  #4 (permalink)  
Old May 14th, 2005, 06:12 AM
Registered User
 
Join Date: May 2005
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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

Beth

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 03:35 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.