473,753 Members | 6,232 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

asp code does not render for first record in looped recordset

I have posted this question on a javascript forum as it contains
javascript code however it was believed to be an asp issue.

The following head section javascript code contains the function
showBigImage( isource,bigImag e,header ) function call of discussion:

var currentImage;
function showBigImage( isource,bigImag e,header ) {
var theImage = document.getEle mentById( 'largeimage' );
theImage.src = isource;
currentImage = bigImage;
document.getEle mentById( 'photoHeader' ).innerHTML=hea der;
document.getEle mentById( 'largeimage' ).alt=header;

The following rendered looped recordset code illustrates how the
"header" parameter of this showBigImage( isource,bigImag e,header )
function call does not render ONLY FOR THE FIRST RECORD OF THE
RECORDSET as it is blank:

<a href= "javascript :;" <td height=36 valign="middle"
class="small_im g" onmouseover="sh owBigImage( 'imagescript.as p?
path=images/portable_stage. jpg&width=250', 'images/
portable_stage. jpg','' )"<img src="imagescrip t.asp?path=imag es/
portable_stage. jpg&width=36" border="0" alt="" /</td</a>

<a href= "javascript :;" <td height=36 valign="middle"
class="small_im g" onmouseover="sh owBigImage( 'imagescript.as p?
path=images/seated_riserset .jpg&width=250' ,'images/
seated_riserset .jpg','Portable stage configuration using 9 units of
the 3 ft x 8 ft platforms in 3 different heights' )"<img
src="imagescrip t.asp?path=imag es/seated_riserset .jpg&width=36"
border="0" alt="" /</td</a>

<a href= "javascript :;" <td height=36 valign="middle"
class="small_im g" onmouseover="sh owBigImage( 'imagescript.as p?
path=images/Stageset.jpg&wi dth=250','image s/Stageset.jpg',' Portable
stage configuration using 16 units of the 4 ft x 8 ft platforms' )">
<img src="imagescrip t.asp?path=imag es/Stageset.jpg&wi dth=36"
border="0" alt="" /</td</a>

<a href= "javascript :;" <td height=36 valign="middle"
class="small_im g" onmouseover="sh owBigImage( 'imagescript.as p?
path=images/Runset.jpg&widt h=250','images/Runset.jpg','Po rtable stage
runset configuration' )"<img src="imagescrip t.asp?path=imag es/
Runset.jpg&widt h=36" border="0" alt="" /</td</a>
Because of this problem, the caption text does not display for this
first image record once the thumbnail images are moused over. You can
view this page example at
http://www.canchair.com/new_web_prod...ctFamilySub=10
Jul 22 '08 #1
16 2591
wrote on 22 jul 2008 in microsoft.publi c.inetserver.as p.general:
I have posted this question on a javascript forum as it contains
javascript code however it was believed to be an asp issue.
There is no ASP code in the below.
The following head section javascript code contains the function
showBigImage( isource,bigImag e,header ) function call of discussion:

var currentImage;
function showBigImage( isource,bigImag e,header ) {
var theImage = document.getEle mentById( 'largeimage' );
theImage.src = isource;
currentImage = bigImage;
document.getEle mentById( 'photoHeader' ).innerHTML=hea der;
document.getEle mentById( 'largeimage' ).alt=header;
This is clientside code, so you are off topic.
The following rendered looped recordset code illustrates how the
"header" parameter of this showBigImage( isource,bigImag e,header )
function call does not render ONLY FOR THE FIRST RECORD OF THE
RECORDSET as it is blank:

<a href= "javascript :;" <td height=36 valign="middle"
class="small_im g" onmouseover="sh owBigImage( 'imagescript.as p?
path=images/portable_stage. jpg&width=250', 'images/
portable_stage. jpg','' )"<img src="imagescrip t.asp?path=imag es/
portable_stage. jpg&width=36" border="0" alt="" /</td</a>

<a href= "javascript :;" <td height=36 valign="middle"
class="small_im g" onmouseover="sh owBigImage( 'imagescript.as p?
path=images/seated_riserset .jpg&width=250' ,'images/
seated_riserset .jpg','Portable stage configuration using 9 units of
the 3 ft x 8 ft platforms in 3 different heights' )"<img
src="imagescrip t.asp?path=imag es/seated_riserset .jpg&width=36"
border="0" alt="" /</td</a>

<a href= "javascript :;" <td height=36 valign="middle"
class="small_im g" onmouseover="sh owBigImage( 'imagescript.as p?
path=images/Stageset.jpg&wi dth=250','image s/Stageset.jpg',' Portable
stage configuration using 16 units of the 4 ft x 8 ft platforms' )">
<img src="imagescrip t.asp?path=imag es/Stageset.jpg&wi dth=36"
border="0" alt="" /</td</a>

<a href= "javascript :;" <td height=36 valign="middle"
class="small_im g" onmouseover="sh owBigImage( 'imagescript.as p?
path=images/Runset.jpg&widt h=250','images/Runset.jpg','Po rtable stage
runset configuration' )"<img src="imagescrip t.asp?path=imag es/
Runset.jpg&widt h=36" border="0" alt="" /</td</a>
Because of this problem, the caption text does not display for this
first image record once the thumbnail images are moused over. You can
view this page example at
http://www.canchair.com/new_web_prod...tID=198&Produc
tFamily=1&Produ ctFamilySub=10


--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jul 22 '08 #2
ha**@canchair.c om wrote:
I have posted this question on a javascript forum as it contains
javascript code however it was believed to be an asp issue.
Given that there is no server-side code shown here, I'm not sure what
led whoever it was to believe that this was an ASP issue.

If it is an asp issue then we have no chance of debugging it without
seeing the server-side code contained in ...imagescript. asp
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Jul 22 '08 #3
On Jul 22, 4:24*pm, "Bob Barrows [MVP]" <reb01...@NOyah oo.SPAMcom>
wrote:
h...@canchair.c om wrote:
I have posted this question on a javascript forum as it contains
javascript code however it was believed to be an asp issue.

Given that there is no server-side code shown here, I'm not sure what
led whoever it was to believe that this was an ASP issue.

If it is an asp issue then we have no chance of debugging it without
seeing the server-side code contained in ...imagescript. asp
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
You are absolutely right. I should've posted the asp code and here it
is:

<a href= "javascript :;" class="small_im g" >
<td height=36 valign="middle"
class="small_im g" onmouseover="sh owBigImage( 'imagescript.as p?path=<%=
images.Fields.I tem( "url_img" ).Value %>&width=250',' <%=
images.Fields.I tem( "url_img" ).Value %>','<
%=(images.Field s.Item("alt_img ").Value)%> ' )"><img
src="imagescrip t.asp?path=<%= images.Fields.I tem( "url_img" ).Value
%>&width=36" border="0" alt="" /</td>
</a>
Jul 23 '08 #4
wrote on 23 jul 2008 in microsoft.publi c.inetserver.as p.general:
On Jul 22, 4:24*pm, "Bob Barrows [MVP]" <reb01...@NOyah oo.SPAMcom>
wrote:
>h...@canchair. com wrote:
I have posted this question on a javascript forum as it contains
javascript code however it was believed to be an asp issue.

Given that there is no server-side code shown here, I'm not sure what
led whoever it was to believe that this was an ASP issue.

If it is an asp issue then we have no chance of debugging it without
seeing the server-side code contained in ...imagescript. asp
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get
a quicker response by posting to the newsgroup.

You are absolutely right. I should've posted the asp code and here it
is:

<a href= "javascript :;" class="small_im g" >
<td height=36 valign="middle"
class="small_im g" onmouseover="sh owBigImage(
'imagescript.as p?path=<%images .Fields.Item( "url_img" ).Value
%>&width=250',' <%images.Fields .Item( "url_img" ).Value %>','<
%=(images.Field s.Item("alt_img ").Value)%> ' )"><img
src="imagescrip t.asp?path=<%= images.Fields.I tem( "url_img" ).Value
%>&width=36" border="0" alt="" /</td>
</a>
If the ASP string is correct, even then this:

<%images.Fields .Item( "url_img" ).Value %>

will not do in ASP, or render to the html-string, anything,
so perhaps you want to try:

<% = images.Fields.I tem( "url_img" ).Value %>

[etc.]

However,
since you do not show the relevant serverside database access code,
or even what database you use,
I cannot say.

And we do not know if imagescript.asp will process the querystring value
correctly

And if the resultstring of
<% = images.Fields.I tem( "url_img" ).Value %>
is encoded to precvent it to have characters that break the querystring,
[like an apostrophe].

Even the html is wrong:
<td .... /></td>
[why the /?]
and
<a ...><td .... /></td>...</a>
is wrong,
and
<a href= "javascript :;" class="small_im g" >
is questionable,
but that all is off topic on this NG.
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jul 23 '08 #5
ha**@canchair.c om wrote:
On Jul 22, 4:24 pm, "Bob Barrows [MVP]" <reb01...@NOyah oo.SPAMcom>
wrote:
>h...@canchair. com wrote:
>>I have posted this question on a javascript forum as it contains
javascript code however it was believed to be an asp issue.

Given that there is no server-side code shown here, I'm not sure what
led whoever it was to believe that this was an ASP issue.

If it is an asp issue then we have no chance of debugging it without
seeing the server-side code contained in ...imagescript. asp

You are absolutely right. I should've posted the asp code and here it
is:

<a href= "javascript :;" class="small_im g" >
<td height=36 valign="middle"
class="small_im g" onmouseover="sh owBigImage( 'imagescript.as p?path=<%=
images.Fields.I tem( "url_img" ).Value %>&width=250',' <%=
images.Fields.I tem( "url_img" ).Value %>','<
%=(images.Field s.Item("alt_img ").Value)%> ' )"><img
src="imagescrip t.asp?path=<%= images.Fields.I tem( "url_img" ).Value
%>&width=36" border="0" alt="" /</td>
</a>
Err ... that is not the code contained in imagescript.asp is it? No mention
of a recordset, for one thing ...

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Jul 23 '08 #6
i really appreciate the responses.
the imagescript page is the page that resizes the images but i have no
issues with the images but rather the alt_img database field not
rendering properly for the initial recordset value.

and database type is Access.
imagescript.asp code:

<%
Response.Expire s = 0
' create instance of AspJpeg
Set Jpeg = Server.CreateOb ject("Persits.J peg")

If Request.QuerySt ring("width")=3 6 Then
Jpeg.New 36, 36, &HFFFFFF
Else
Jpeg.New 250, 250, &HFFFFFF
End If

' Open source file
Jpeg.Open Server.MapPath( Request.QuerySt ring("path"))

'Jpeg.Width = Request("Width" )

L = Request("Width" )

'Jpeg.Height = Jpeg.OriginalHe ight * Jpeg.Width / Jpeg.OriginalWi dth

If jpeg.OriginalWi dth jpeg.OriginalHe ight Then
jpeg.Width = L
jpeg.Height = jpeg.OriginalHe ight * L / jpeg.OriginalWi dth
Else
jpeg.Height = L
jpeg.Width = jpeg.OriginalWi dth * L / jpeg.OriginalHe ight
End If

' Perform resizing and
' send resultant image to client browser
Jpeg.SendBinary

%>
Jul 23 '08 #7
This is the code to narrow in on:

onmouseover="sh owBigImage( 'imagescript.as p?path=<%=
images.Fields.I tem( "url_img" ).Value %>&width=250',' <%=
images.Fields.I tem( "url_img" ).Value %>','<
%=(images.Field s.Item("alt_img ").Value)%> ' )">

This '<%=(images.Fie lds.Item("alt_i mg").Value)%> ' portion of the code
is what is not rendering for the initial image of the recordset
Jul 23 '08 #8
ha**@canchair.c om wrote:
i really appreciate the responses.
the imagescript page is the page that resizes the images but i have no
issues with the images but rather the alt_img database field not
rendering properly for the initial recordset value.
So I guess I still don't understand the suspicion that this is an
ASP/server-side code problem.
>
and database type is Access.
imagescript.asp code:
<snip>
Still no mention of a recordset ... ?
I don't know how we can help.

--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Jul 23 '08 #9
ha**@canchair.c om wrote:
This is the code to narrow in on:

onmouseover="sh owBigImage( 'imagescript.as p?path=<%=
images.Fields.I tem( "url_img" ).Value %>&width=250',' <%=
images.Fields.I tem( "url_img" ).Value %>','<
%=(images.Field s.Item("alt_img ").Value)%> ' )">

This '<%=(images.Fie lds.Item("alt_i mg").Value)%> ' portion of the code
is what is not rendering for the initial image of the recordset
No it isn't. There is no mention of a recordset here, unless images is a
recordset object. If so, we need to see the code used to open the
recordset (and its connection) as well as a description of the database
table (field datatypes and names), along with the code used to navigate
to the record whose alt_img field you wish to display. Try to slice out
as much html as possible so we can focus on the server-side ADO code.
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Jul 23 '08 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
2465
by: Spud | last post by:
<?php // pullpage function by Nick bouton http://www.nickbouton.com/. $CustomerID = "IDHERE"; $method = "POST"; $host = "xml.mydata.com"; $usepath = "/xml.asp"; //print all vars in an array
6
2223
by: Kingdom | last post by:
I'm using this script to dynamicaly populate 2 dropdowns and dispaly the results. Choose a component type from the first drop down, lets say 'car' and the second box will list all the car 'manufacturers' and the display will then provide all the rest of the info from the other fields. I need to eliminate all the duplicates in the First Drop Down as it currently displays an entry for every record, many are identical, I might have over...
20
10160
by: | last post by:
If I need to check if a certain value does exist in a field, and return either "yes" or "not" which query would be the most effestive?
2
2226
by: Jayjay | last post by:
When it comes to access, I'm pretty good using the built in features and can come up with some pretty complex functions to get what I need. But we have this database I'm doing for work that is trying to pull in too many things. The database is a construction job estimating program. First you setup a project, then you add items that will be needed for the job and you create a cost estimate. You then send this list out to construction...
5
4068
by: ED | last post by:
I currently have vba code that ranks employees based on their average job time ordered by their region, zone, and job code. I currently have vba code that will cycle through a query and ranks each employee based on their region, zone, job code and avg job time. (See code below). My problem is that I do not know how to rank the ties. Right now if two people have the same avg time one will be ranked 3rd and the other ranked 4th. I would...
10
1691
by: HK | last post by:
With VB.NET 2005, and a Windows Form, running on a dual CPU box, I need to take a recordset (e.g. 100,000 records) and spawn a thread to handle an internet XML transaction routine for each of the records. This is a nice use of threading because those internet requests are going against 3rd party servers that often have 1 second latency problems and so handling them with multiple threads is the fastest way to get through all the records in...
2
3046
by: barret bonden | last post by:
(closest newsgroup I could find) Error Type: ADODB.Recordset (0x800A0CB3) Current Recordset does not support updating. This may be a limitation of the provider, or of the selected locktype. /asp_data3_add.asp, line 30 <% 'Dimension variables Dim adoCon 'Holds the Database Connection Object
6
1416
by: doncee | last post by:
This is the set up: is a date field on a form. Its control source is the field "date_entered" in"Table1". If there is a date showing in the date_entered field (Text6) & the status in Combo box2 shows "deleted" then the after update event should delete the date in Text6 & return the field "date_entered to a null value when the form is closed. Even though the debug window shows rst!date entered as null when you step through this event...
6
3076
by: MrDeej | last post by:
Hello! I have code wich scans the through 10 computers on a LAN for files and import them into different tabels. This code aproximitly imports 10 000 files (with 1 to 20 rows of info) a day and is running looped (i have 'do' and 'loop' in the top and bottom of the code) and have to be started and stopped manually. Because i want the files to be imported almost instantly when they are created i let the code just loop and go through as fast...
0
8896
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9653
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9421
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8328
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6151
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4771
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4942
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3395
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2872
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.