Wrox Programmer Forums
|
ASP E-commerce As of Oct 5, 2005, this forum is now locked. No posts have been deleted. Please use "Classic ASP Professional" at: http://p2p.wrox.com/forum.asp?FORUM_ID=56 for discussions similar to the old ASP Pro Code Clinic or one of the other many remaining ASP and ASP.NET forums here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP E-commerce 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 September 23rd, 2003, 04:55 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 518
Thanks: 0
Thanked 0 Times in 0 Posts
Default select option in ASP update

There error on line 34
How can write the select option in update page of asp.
It gives following error

Unterminated string constant
/dcilweb/dcildepts/compsys/inventory/update_inv_item2.asp, line 34, column 111


  Response.Write("<TR>")
  Response.Write("<TD>Station Number</TD>")
  Response.Write("<TD><INPUT type=text id=stn_no name=stn_no value='" & rs("stn_no") &"'></TD>")
  Response.Write("<TD>Paid By</TD>")
  Response.Write("<TD><SELECT type=text id=paid_by name=paid_by><OPTION selected value="">Select Paid By</option> // line 34
  <option>DCIL</option>
  <option>Client</option>
  </SELECT></TD>")
  Response.Write("</TR>")
  Response.Write("<TR>")
  Response.Write("<TD>Station Description</TD>")
  Response.Write("</TR>")



Mateen
 
Old October 7th, 2003, 05:32 AM
Authorized User
 
Join Date: Oct 2003
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to ittorget
Default

First of all.....
When you call Response function remepber that with in the Write("") option
you can only use _ or '' dont ever use "".
For exampel;
Response.Write("A href=""></a>") (This is wrong)
Response.Write("A href=></a>") (This is right)
Response.Write("A href=''></a>") (This is right)

 
Old October 8th, 2003, 11:06 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 518
Thanks: 0
Thanked 0 Times in 0 Posts
Default

thanks.

Quote:
quote:Originally posted by ittorget
 First of all.....
When you call Response function remepber that with in the Write("") option
you can only use _ or '' dont ever use "".
For exampel;
Response.Write("A href=""></a>") (This is wrong)
Response.Write("A href=></a>") (This is right)
Response.Write("A href=''></a>") (This is right)

 
Old October 9th, 2003, 03:35 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 440
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Suggestion... I can see that you are only using ASP once in the code above. Why don't you do something like this...
Code:
%>
<TR>
<TD>Station Number</TD>
<TD><INPUT type=text id=stn_no name=stn_no value='<% =rs("stn_no") %>'></TD>
<TD>Paid By</TD>
<TD>
   <SELECT type=text id=paid_by name=paid_by>
       <OPTION selected value="">Select Paid By</OPTION>
       <OPTION>DCIL</OPTION>
       <OPTION>Client</OPTION>
   </SELECT>
</TD>
</TR>
<TR>
<TD>Station Description</TD>
</TR>
<%
... assuming that you have ASP before and after this HTML code. This way you source code will be much more readable, and you will get rid of the confusion between single and double quotes.

Jacob.






Similar Threads
Thread Thread Starter Forum Replies Last Post
select option and update more rows in table . sanjeev jha Classic ASP Basics 3 November 6th, 2007 07:37 AM
wrap a select option nerssi HTML Code Clinic 0 June 16th, 2007 07:43 AM
disable Select option Dj Kat HTML Code Clinic 2 March 10th, 2006 04:03 AM
Select/Option Problem TSEROOGY Javascript 2 October 4th, 2004 03:32 PM
Getting select option name not value mildge Javascript How-To 2 April 5th, 2004 10:20 PM





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