I have 1 large image and small 3 thumbnails. Whenever a user clicks a thumbnail, it swaps with the large image. This, of course, is very straight forward when just including the directory and filename of the image in the Javascript. However, my images are sourced from an Access database (using the directory path of the image as a text field). I would like to insert the ASP <%=rs(?FieldName?)%> or variable within the Javascript so that it pulls the images from the db. I have tried this but it does not work.
I guessing that it has something to do with conflict between client and server side coding. I have included a snippet of the code. There seems to be nothing amiss with the source code. Can you help?
//javascript function
<script type="text/javascript" language="javascript">
function swapPhoto(photoSRC) {
document.images.imgPhoto.src = photoSRC;
//swap thumbnail pics with main pic
}
</script>
I'm having a problem with a script.When a customer upload their picture I would like for them to place there picture on a t-shirt for example.what script can I use for this purpose?
Ok say a person puts their email into my guestbook example (joe@joe.com). Well i want to take the person's email and convert it to an image when they post it.
here is the code for the email anyone know how to do it? <a href="mailto%= CmdShowEntries("EMAIL") %>"><%= CmdShowEntries("EMAIL") %></a>
how to swap a variable which comes from an xml feed for an image instead using ASP. I will explain in a bit more detail what I mean:
My variable is called strOperator and is supplied as a 3 letter code from the xml feed i.e ABC, CDE, DEF for different operators (each with their own associated 3 letter code).
What I want to do is instead of displaying my results with the code it would be more meaningful to display an image instead for each associated operator. (each operator has their own image).
how i can pass a variable from my JavaCsript function to my ASP function. I have a list from which I call a javascript function with onChange(javascript function). Inside that function, i want to pass a variable to an ASP function which will use it in a SQL query.
I have tried everything i can imagine but to no avail. If that is not possible does anyone know how i can accomplish this in another way? I mean. can i call the ASP function directly from my onChange(asp function)? Or does an onChange require a script?
How can I set the visible propery to true using a javascript ? I tried something like document.GetElementById('ImgTest').visible='true'; but without succes ....
I am using ASP to open a text file on the server and I want to pass variables to Javascript. Any suggestions?
For example - I have a text file on the server defining a set of pictures. I open the text file to retrieve the list of files. I want to pass the list of files to the Javascript which will then display the data on the client machine.
I have a web site completely developed with .html pages.
My affiliate and ecommerce system are written in asp, as is the only registration page (register.asp).
If an affiliate sends a visitors to our registration page and the user decides to browse the site before registering we lose track of the affiliate id variable..
..Is there a way to pass a (one) variable between the html pages as the visitor browses the html based site and then have it passed to the registration page (register.asp)?
Also is there a method to set a cookie that retains this variable, and have it set to a one week expiration so that when the visitor returns to the site the most recently refering affiliate gets credit.
If passing of the variable is possible with javascript, can the javascript automatically check for the existence of the aforementioned cookie?
I know you can enter asp variable values into javascript functions
javascript_function(<%=asp_variable%>);
But can it go the other way? Can I take results from a javascript function and use them to update an asp variable? I would like to do the updating inside the function because it will be an onclick function.
Is it possible to assign javascript variables values to ASP?
e.g. How would I store the following JS variable as an ASP variable in VBScript?
<script type="text/javascript"> var intJavaScriptNumber = 25; </script>
The problem is I've got about 50 of these variables on a page, and they all need to be used in a simple equation which slows the browser down. If I could get them all into ASP then I could process this server side much more comfortably.
This is my scenario...I have three images that I want to put on a website that will change to one another constantly. There will be three table columns on the top that indicate what the available three images are. If the user's mouse hovers over one of the table cells, the image will immediately change to what the table cell corresponds, and the user will be able to click on either the table cell or the image to go to another website.
I have included an image to better illustrate what I am talking about. image
What is the best scripting language to do this? javascript, css, asp, flash? All of the above seems hard to me, especially the last two....
I skinned an LMS (Learning Management System) using CSS and Javascript. The forms were skinned with niceforms.js, the site works perfectly in FF, IE 7 and IE6 but in ASP the javascript doesn't replace the images with the skinned elements. All the javascript functions initialize but the images are not placed in. Code:
I have a client who has had a ASP site with an Access database for several years. It stores information for the used cars on his lot. I have stored text in the database that points to the location of the image for each record. Each record will have a thumb image that is supposed to display in a list of vehicles available then the user can select an item from this list and a new page displays with the information and the regular size image. So far everything has worked fine exept for the display of the images which are stored in a separate directory called veh-photos. All I get are image place holders. I am using Dreamweaver 2004 and and Access 2000 for the database.
1.I want to show a image file of type '.tif' in the browser window; for that I'm writting as ASP code page.
2.This '.tif' type image can be shown better with 'Kodak Image Control'.
3.To have this 'Kodak Image Control' on my code page I just add it's ..ocx to tool box and then drag it from 'Toolbox' to the page.
4.Now after dropping this control to the code it's type is getting changed to 'object' instead of type 'ImgEdit'(and I think this is the reason I don't get correct result).
5.On one button's 'Onclick' event I'm calling a javascript function with which I'm setting a 'Path'and'Display' property of a control.
6.And want to show a image at location -- '..MFTDRCMF919685173-62.tif' which get shown in new browser window but could not get shown in that particular control. That means the path is correct, then what is the problem?
For better understanding of problem I'm pasting a following code which I've tried up till now...... .................................................. <%@ Language=VBScript %> <% OPTION EXPLICIT %>
<HTML> <HEAD> <META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<SCRIPT LANGUAGE=javascript> <!-- function showpic() { var path; path = document.frmtif.path.value; alert(path); document.frmtif.ImgEdit1.Image =path; document.frmtif.ImgEdit1.Display; window.parent.self.open(path); }
I am creating a dynamic ASP VBScript page, which gets data from an Access database.
In the database, there is a field which holds a URL to an image. I can get the image to display fine, but where there is no file that matches the URL (i.e. a missing image) I want to display an alternative, default image (e.g. one that says "Awaiting Image"). The field is never blank, but the image file may not exist for all records in the database.
I think what I am trying to get to is the following:
If file exists (using URL from database to get location of image file) then display image using the url from the database as the image source else display default image - hardcoded in program endif
I have had a go and come up with the attached but I get an error with my if statement...
I'm working on a project where I'm suppose to upload a image to a server. The uploading works fine but when I want to change the image I uploaded to another image I can't get the filepath of the old image to show in my "filefiled"....is it possible to set a "value" where I can retrieve a filepath in a form if the input type is "file"?
This worked fine for enlarging my images until i put it onto a secure server, anyone know how i can fix it ??? just comes up with the standard box with a red cross in it .. and the url when i click image properties says: http://url/images/<%=request.querystring( which is only part of the code)
I'm looking for a simple way to merge an image into another image.What i have is a screenshot uploader, and i want to make it so that when they upload the SS, the script will automatically merge a small copyright type image onto the bottom right of the picture.
I'm having a customer submit an order. When they submit it, it posts to a page that processes the order and inserts into our database, while displaying a summary of their order. I have a javascript function that will cause a "confirm" box to show up if an order seems like it might be a duplicate. However, I can't seem to get the code to "wait" for the response from that box, which I guess makes some sense. Am I stuck with having an interim page or doing something with posts or is there an easy way to get the record to not insert until the user responds to the confirm box?
Im sure it exists but i am having some difficulty finding it. I need come code to take out any SPACES in a textbox when text is entered OR submitted. Example
i have a text box where people can enter there car registration.
To keep consistency thoughout my site, i want L736 VAF to be entered into the database as L736VAF.
so that when it is recalled via a search form, L736VAF wont be returned as "no record found" because some one has put a space init!
update some long commOn first page I display all the records from database (working well). Then first column has href which opens a popup (i am passing rownum from database to popup). I was hoping to run ASP code on load of the page so the comments which is already there for that row in the databse automatically comes in a textarea. And then you can edit and hit update. And this will update the database. Also I was thinking of using session variables for the rownum. But bcos I have href which opens a popup, I am not sure how i can set the session variable. I dont want to pass the "comments" itself to the next page bcos it can be really long comment and QueryString has some limitations.
I am making a dynmanic form that goes to a question depended on the answer. Is there a way that I can make it remember what the person selected (radio button) in the question so that I don't have to write something like,
"<input type = 'radio' name='Question3' value='Yes' checked <% if Question3 = "Yes" then response.write "SELECTED" end if%>>Yes<BR>" + ????