|
|
|
|
|
| | |
|
vbscript active server pages ASP vbscript SQL database informix oracle SQL Server Perl CGI Delphi PHP source code code sample samples program CJWSoft ASPProtect ASPBanner ASPClassifieds
(Advanced)
(Components)
(Database)
(General)
(Vbscript)

|
|
Subject: |
Re: ASP with VBScript |
From: |
Phil Haigh |
Date: |
11/24/2000 6:51:01 AM |
IP: |
194.143.182.2 |
Question 1. To get this to work you need to get VBScript to add quites to either side of your value. If you look at an HTML form the format for defaulting a text field is VALUE="defualt". Try the following code:
<Input id="FirstName" Type="text"
Name="FirstName" value=<% = """"&strConcate&""""%>
Placing two double quotes together inside a quoted string results in a single quote being written to the output stream.
Question 2. This will be the right answer if youre asking how to display a single record out of a table, providing buttons to go to the previous and next records in the table.
In VBScript I keep a count of which record I am currently displaying. Then use VBScript I create previous and next links as follows (in this example the current record number is 10):
<A HREF="current_page.asp?recnum=9">Previous</A>
<A HREF="current_page.asp?recnum=11">Next</A>
Then at the start of the page I look for a form item recnum. If undefined, I start at record one. If defined, then that is the record Im going to display.
So, when youre showing record number x, clicking on previous re-enters the page and displays record x-1 and next displays x+1. Obviously you need to suppress previous if youre at record 1 and next if youre at the last record.
Hope that helps. |
Previous Message
|
|

|
|
|
|
|
|
|
|
|
|