Javascript Form Image Replacement Breaking In ASP Classic
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've seen plenty of articles and utilities for preventing form injections for ASP.NET, but not too much for classic ASP. Are there any good input validation scripts that you use to avoid form injection attacks? I'm looking for good routines I can reuse on all of my form processing pages.
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 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>
This works fine, the form details are collected by RegDetails.asp
I am attempting to include javascript server side validation for the pasword, which obviously requires password and password2 fields (to be verified). I have used the script available at:
my form contains two text fields(name, address) and two file field control where user can insert image(photo1 and photo2), i want to insert this data in to ms access when the user submits the form?
this is my code for insert text fields to access data base.but i have no idea about the code for image fields. In my access data base i set photo1 and photo2 as herf (binary data). Code:
Does anyone know of an ASP (VBScript) that can function as a Yahoo Group style replacement? This includes handling digest emails as well. All the popular forum software I've looked at, such as Snitz, can't handle it.
I have just upgraded my win98SE pc to winxp home. I am aware that PWS won't work with xp home, and I need to upgrade to XP pro for IIS. Problem is that I don't really want to upgrade unless I have to.
I've been investigating the various server options available. I need to run .asp scripts and connect to access 2000 databases. I'm not sure what servers will do this as the documentation is never that clear. Will Apache do what I want, and is there a duffers guide to getting it running?
However, that just makes it a regular double-quote. I guess I could try and find out what the character number for apostrophes are, but not sure where that is. Besides, will that mess up my SQL Server or the email if I do that?
Is it possible to make another file act likle global.asa? at the moment my project uses this file but im not sure how many hosts allow users access to it, so if i could just include another file and make it act like the global.asa that would be great.
Not strictly an ASP question, but it's for an ASP-based content management system:
I'm looking for a good, free textarea replacement application which creates a WYSIWYG interface from form textareas. I have used HTMLArea in the past but it only works on IE6.
1. Values inserted into the "Current" column via asp 2. User inserts values into the "Change" column boxes and clicks increase/decrease 3. This automatically changes the value in the "Current" column (this is where I presume jscript is required) 4. User clicks on Submit to send the form to be processed and entered into database etc.
I'm having a problem with JavaScript in ASP, where the ASP page crashes when I try to determine if data was posted from a FORM or through a QueryString. Where, if the data came through via a FORM, I want to use it 1st, but if not, to then try using it from the QueryString. Basically, the problem boils down to using "toString()" on Request.Form("NAME") and Request.QueryString("NAME") as such: Code:
I am trying to load a dropdown select on an HTML form with the user's current selection based on previous user input that they put into a database. I am trying to use JavaScript to have the user's choice selected when the page loads. Here is my javascript function: (Assume the database connection code is already in place and functional)
<script language = "Javascript"> function chosen(dropdown){ combobox.option.selected = '<%=rs.fields("State")%>'; return true; } </script>
Im new to ASP.NET as well as classical asp. To become strong in .NET, should i learn vb verywell (because im relatively new to it but it doesnt look that foreign working with vbscript) or the .net framework such as classes and server controls?
I have an ASP application which gathers information to put in a database via some forms - I would like to do the form validation (making sure some fields are not empty) with a Javascript script inside the ASP file - what is the syntax for doing this? Usually I would place the javascript inside the <head> tags, but ASP files don't have those.
While debugging why a web.config section replacement was not happening in the real web application, I tried a simplified case, no replacement is enabled and the connection string is not showing up? Code:
I am trying to merge 2 strings together from the database to create a meta tag. It comes up as
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <meta name="description" content="Looking for Architects in NY? Click here for Architects in New York."><meta name="keywords" content="architect, local, builders, home design, remodelling, construction, Albany County, Albany, Colonie, Saratoga County, Rensselaer County, Troy, Schenectady County, Schenectady, Montgomery County ">
It works fine, however the the last "> breaks off to the next line which shouldn't be happening. I tried searching for "<br>" and chr(34) (the carriage return),but there's nothing.
It's a simple validation page and was working fine until i made some changes to the next page.
A regular form that calls a javascript function, but suddenly i javascript function does not execute anymore. i tried calling other functions but none of them works, but when i treid onSubmit("javascript:alert('some text')") it works fine.
I tried debugging it in dreamweaver and i get an regular expression missing error number 1005 on the last line of the javascript.. that is ....
I have a script that allows you to edit an html page (the html being stored in a database). The problem is that any characters in the html disappear when viewing the page for editing. Is there some way to escape them?
I'm trying to break this loop for 4 different contacts to be inserted into the system.
For new inspections I want to be able to search the DB for the Owner, User, Contractor, and Cert_Recipient for new boilers the certificate will be mailed to the contractor which will be the Cert_recipient first.
then for annual inspections I want to be able to search for Owner, user, and Cert_Recipient for annual inspections I will have to search the DB for either the owner or User as the Cert_Recipient
For some apparent reason I can't stop the search, it keeps going thru the loop. I must be missing something. Code:
I would like to prevent a page from breaking out of it's iframe when indexed by a search engine. I would like to use asp (which I am just starting out in) and I know it is somewhere along the lines of "yourframespage.asp?id=pageid".
Can anyone give me a rundown of how I do this exactly because I cannot seem to work out how to do it.
The login state in my site relies on a combination of session variables and encrypted cookies. Some of my users are reporting that they are being "logged out" by the system - which seems to be related to their cookies being blanked out. I've checked all of the code and now that it's not being overwritten by my ASP.
The weird thing is that my site has two domain names, both pointing to the same pages and directories (no redirect). If this problem is happening to them and they switch to the other domain name and log back into the site, they stay logged in no problem. It also seems to not recur if the person is "logged out" and then logs back into the site on their own.
I had one problem like this in the past, because I had a tracking cookie that was being written on every page, and found that some browsers (don't remember which) had a limit of how many cookies could be written - and when they hit the limit the oldest cookie was tossed out. However, I don't have any code doing this now.
Anybody have any ideas what could be going on? Are there any session variable/cookie limits on the server side?
Can anyone tell me why the funciton checkCode returning in the middle of the for loop breaks the for loop? ie. If I remove the section:
if checkCode("0011") = 1 then response.write "<br />Passed submission of user code" else response.write "<br />failed submission of user code" end if
from the code snippet below, then the code will successfully loop through and print out all the post var fields (there are in fact 4).
If however you leave this in, the function returning seems to break the for loop from continuing through all the other post variables after "user_code" Code:
Is there any way that I can break up text in a text field to spread across multiple fields in an access database? I've got a FAQ section that I want admins to be able to edit via an online interface. Unfortunately, it often doesn't fit into the 255 character restriction that access has. Any ideas?
I have an image as input for my form. I have some code extract some value from that form using a query and sets a cookie equal to that value.I need to have that image as a link to another page. When I put <a></a> tags around it, the query doesn't collect a value.