I am trying to retrieve images from the database and display them in a random order. The order of the images is supposed to change each time page is refreshed.
Below is my code, I am using an array to store the images but the images are not displayed for some reason. Any help would be appreciated.
<% Dim rstResult
Dim strSQL
Dim img(100)
imgID = 0
set rstResult = Server.CreateObject("ADODB.Recordset")
strSQL = "sp_sel_TilesByType 'O'"
rstResult.Open strSQL, strConnect
I am trying to retrieve images from the database and display them in a random order. The order of the images is supposed to change each time page is refreshed. Below is my code, I am using an array to store the images but the images are not displayed for some reason. Code:
I'm trying to display an image which is stored in a database, followed by some other information, but I'm having some issues. It's stored in an access database as an OLE object. The code I've got right now is:
However, what I want to do is include a request.querystring("ID"), so that IF an ID is defined, eg ID=3, , it will display the relevant (not random) information. I've tried this every way I can think and get type mismatches, etc etc. It's probably really simple but I can't see it.
is there sombody who can helpme witht he following, i am ''pretty new'' to php and am looking for a script to show images randomly at a 10/ 15 seconds interval. is there anybody who can help me with this or does know where to find a good template script for this?
Is it possible to select random images from a directory without creating a "library"
As in I want to have a directory with 25 or so images and want to randomly select an image without having to change the txt document when I add new images.
I come from a PHP background. I'm modifying a client site that uses some critical ASP code in the backend, so for simple frontend stuff I need to use it too!
I need to make sure that certain images from a random rotation only appear on certain sections of the site licensing issues. Is there any way to easily grab the name of the file that's currently loaded? I want to run some form of regex on it to check for certain words.
I'm trying to have my program randomly select one of five images. I think my syntax is correct (that is it isn't giving my any error messages and the page loads with the image being replaced by a broken link 'X' box), but I don't know how to display the image to the screen.
Should the response.redirect part automatically display it to the screen or should I have it in some tag like <td><img scr ="lrandom"></td> within my table?
I have a database of images with captions that I need to display at random on an ASP page. Once I have pulled out my recordset, what's the best way to select on item at random from the recordset to display? Also, at first I might have only 5 items in my recordset, how can I avoid the same item repeating 3 times in a row if the person clicks refresh?
I want to provide random image on my asp page. the image will display according to products searched by user.
e.g.
if user enter pharma machine in search box, in result page the banner of pharma company will display. i.e. the banner of manufaturer/exporter of pharma machine will display.
dusring registration, comapny has to specify whether it wants banner or not. so if there is yes in banner and prodcuts match the search string then banner will display.
this is according to the product seaarched by user.
Now What i am trying to do is , when the first time is student is login,he wil be shown a random record from the question and his answered wil be stored in the Ans field of the student table with column separeated.
The he will be redirected to the same page with one new question.This question should not be in the Ans Field, and must be randomly generated.I am using this code.But this not working. Code:
I have this code that displays record sets at random, but some of time the results are less than the minimum set, which is 5 records. It is less, or none at all. What I need is for the asp to display records randomly on each submit.
Currently, the asp runs so that the whole recordset is different, i.e. Random. I am a little concerned about the load on the server by running such a script....perhaps someone can clarify.
'Set the number of records to display on each page by the constant set at the top of the script Code:
On my index page I have got an area for one product to be displayed randomly from the database. I have got it workign, but there is one problem i cant get my head around, here is the code so far:
' Initialize ASP RND() function Randomize() intRandomNumber = Int (1000*Rnd)+1
I’m having problems on how to randomiz numbers and delete the ones that have been displayed.
My first step is to take some numbers:
21, 32, 35, 4, 15 and randomize theese so the ouput may look something like this: 35, 21, 15, 32, 4
My second step is to display the first number (35), then when a user clicks on a link I want the second of my random number (21) to be displayed and I also want to delete the first number (35) that has been displayed. And this routine (display number, delete previous number) should continoue untill there is no more numbers. So again, I wnat to step through all my random numbers and delete the ones I have displayed.
I Have searched the forum but have no solution to this problem.
I want to display my records in a random order. I loop through my records so I don't know how many records will be displayed. I dont want to count the records and then use the TOP statement. I'm looking for a better solution.
Set rs = Server.CreateObject("ADODB.Recordset") rs.Open SELECT test FROM testTable WHERE testId = 1, objConn Do While Not rs.EOF Response.Write "<b>" & rs("test") & "</b>" <- I want theese records to be displayed in random order rs.MoveNext Loop
I have a database with 20 companies and their links in it. Ive tried to develop some code that i found in another forum while i was searching for a solution to 'unique random links' but, although i feel im close, Code:
I am trying to upload large images ( around 4 mb) from the server to show on the client. Currently I'm using an http handler to do it and breaking it into chunks sending it 1 mb at a time. Sometimes I'm getting errors, like the page won't load. Any solutions on how this is done right?
i have iis5. windows 2k advance server. I have many http sites on iis. One ftp site with folders protected with userid and password. e.g i have folders at
now if i try to diplay image on asp page as http://www.mysite.com/displayimages.asp
in displayimages.asp page i give url to images file as http://www.mysite.com/images/usa/logo.jpg
i was asked to enter userid and password. I mean to say, How can i display images on asp pages from the users, whom have posted images to their ftp folder.
In the site we want to display the vehicle (obviously) and then a list (graphically) of the features that vehicle has, ie, air con, electric windows, abs, etc. I have attached examples of the images that should be displayed.
The images are kept in a separate folder on the website and they are 'called for' from an access database where the filed name (image id) has a check box.Currently we are only getting a TRUE response and the image is not being displayed. We are looking for some help in how to develop this and get only the image displayed if the check box is ticked on the database.
anyone know of an application that integrates with Dreamweaver to allow me to work with blob images from a SQL database and put them in an ASP.NET page?
I am creating a form with checkboxes that contains in the value property, the ID of the image. The filename of the image displayed above the checkbox along with the image.
On that page, I am storing the "checked" information in a cookie. When the user clicks submit, I need to retrieve the actual image that they selected on the previous page and display it along with the image name which I get from the value property.
Right now the only data being passed is the value in the checkbox input tage which is a text string and not the actual image. How do I retrieve the images my users checks off. I hope this make sense. Sort of like a shopping cart, but I only want to be able to select images and post back the ones selected.
The idea is security (the companyN folders store images belonging to the companies 1,2,3 - and never the twain shall meet - this does not matter so much). The images are stored above MySite (in the imageroot folder) so that no-one can see them - if they sat in mysiteimages, for example, anyone can see them. And to further thre security, /imageroot does not have a URL
What I need is someway that I can display an image in imageroot on a page in MySite, eg /mysite/gallery.
I need to use an absolute path from my page in mysite to the required image
just manged to get an image retireval search engine working. The ASP script works fine, my query results are filepaths of images.
i structured a query in within asp to obtain images which have similar textual values. It is more of a cosmetic issue. when i get my query results back, my script prints or displays the images from top to bottom. which means i have to scroll vertically up and down the asp page over 10-30 images. Code:
I am trying to build a simple image gallery,that displays image form the files on web server and displays it on webpage.
I tried,but it gives an error:
Quote: Error Type:
Active Server Pages, ASP 0113 (0x80004005)
The maximum amount of time for a script to execute was exceeded. You can change this limit by specifying a new value for the property Server.ScriptTimeout or by changing the value in the IIS administration tools.
I am having trouble generating a name on demand for a record set, would very much appreciate
some help. My objective: generate multiple record sets with different names - mmm seems easy.
I have a commer delimited array of id's I then split the array. For each id I need to write an sql statement, execute it and populate a record set. There is no way of telling how many ids there are going to be so i have: Code: