asp-classic

Returning early from a function in classic ASP

Is there a way to return early from a function in classic ASP rather than it run the full length of the function? For example lets say I have the function... Function MyFunc(str) if (str = "ReturnNow!") then Response.Write("What up!") else Response.Write("Made it to the end") end if End Function Can I write ...

What's a good method for serving content in different languages using asp?

Hi, I'm trying to figure out which would be the best way to go about serving asp classic pages in different languages. Some of the content on the page is generated server-side and some is hard-coded html. I would like to create a drop-down to select between different languages so that the server-side generated html as well as the hard-co...

Passing Vbscript to Javascript

Hello, I'm using VbScript to get the current hour from the server, then want to pass it to a JavaScript function as shown below. Can you please advise as to the correct way to write this. <% Dim currentHour currentHour = Hour(Now) %> <script type="text/javascript"> $(function() { var dd = 0 var dsc = ('"&currentHour&"'); if (dsc...

Converting a string into a boolean

Possible Duplicate: How can I convert a string to boolean in JavaScript? I have a hidden field that contains a boolean value, I am checking if it's true or false in a javascript function, like this: if (Trim(document.forms['mainform'].hiddenfield.value) == 'true') { } which I think is a lame way to do this. I was wondering...

How to select between include files

Hi, I am working on adding a mulit-language feature to an asp classic site. I was trying to do this by using if else statements to select the include I want to load. After a bit of research I found out that includes files are loaded up before any code is handled. How can I get around this issue and load up the proper include files? Is t...

Why am I constantly getting object errors?

I have cut and paste this example from http://devguru.org/Technologies/xmldom/quickref/node_selectSingleNode.html and I can't get it to work. I keep getting object errors like this: Microsoft VBScript runtime (0x800A01A8) Object required This is the code and xml file I am using <% option explicit Dim objXMLDoc Set...

getElementByTag works but selectsinglenode does not

HI, I have this asp classic app and I am trying to retrieve a single node, but I keep getting an Object Required error. The selectNodeBytags works but returns a node list I just want a single node. This errors with "Object Required" <% option explicit Dim xmlDoc Set xmlDoc = CreateObject("Msxml2.DOMDocument") xmlDoc.async = False D...

Classic ASP page automatically sets Quriks mode as defualt in IE 8

While viewing the HTML IE 8 sets the default document mode as IE8 Standards as it should but it enters quirks mode on an asp page. Even if I use <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"&gt; it doesn't really help. What should I do? ...

Using ASP/VB to get value of a node attribute

Hello all. I have the following XML schema: <lyrics> <response code="0">SUCCESS</response> <searchResults> <result id="120745" hid="gXTQx5ywE0M=" exactMatch="true"> <title>Opera Singer</title> <artist> <name>Cake</name> </artist> </re...

storing huge amount of records into classic asp cache object is SLOW

we have some nasty legacy asp that is performing like a dog and i narrowed it down to because we are trying to store 15K+ records into the application cache object. but that's not the killer. before it stores it, it converts the ADO stream to XML then stores it. this conversion of the huge record set to XML spikes the CPU and causes a...

how to embed exe files of 2 different env. in one using .net?

is there any way to embed two different exe's build in different environment..can be made to embed in one.. like i want to embed c# running program in the asp program?? ...

How do I get ShortDateFormat in classic asp

In asp.net I'm using this one: System.Globalization.CultureInfo.CurrentCulture.DateTimeFormat.ShortDatePattern Is that possible to get it in classic asp? ...

Classic ASP, Provider: Type mismatch Error

I have the following ASP code below which is used within a import from a .csv file. I am getting the error on line rs_add_pg_asset_attr("level_3_integer_attribute_description") = rs_get_costs("sp_import_pg_attribute_value") I'm guessing the code is trying to set 2 columns in two different recordsets to be equal to the same thing? Cor...

Lifecycle support for classic asp

Hi all, Does any one know about Microsofts lifecycle support for classic ASP? I searched a lot in microsoft lifecycle site and other msdn..couldnt find any details regarding ASP,But they have mentioned about vb6. Are they still continuing support ? Can someone provide me any links/info abt this? Thanks in advance. ...

How to delay a response in Classic ASP

I have a site running Classic-ASP and on the login page I would like to delay the response to a failed login attempt (by like 10 seconds) to help prevent brute force attacks on accounts. Quick google searches show some hacks using SQL server queries that seem hack-tastic. Is there a good way to do this in classic asp? ...

Checkbox groups in asp

Hi, I ran into a strange problem with checkbox groups. I am trying to get the values from a group of checkboxes, but I have to hit the submit button twice for it to get the values... I have no idea why. I also use a dropdown box on the same form and I only need to hit the button once to get its value. my asp code to write it to page ...

posting XML from Classic asp and write to File function

I index.html page that post data to page1.asp page1.asp transform the data and Post it to Page2.asp with this function "PostTo" Page2.asp is suppose to: -write the data to data.txt with "WriteToFile" Problem: WriteToFile function does not write any thing in the file when call from page2 But work when call from page1 Any suggestion? Fu...

How do I test ASP pages locally on Mac/OSX?

Is it possible to test ASP websites locally on a Mac? ...

Dynamic checkboxes in asp

How can I get the values from a dynamically created checkbox group using asp classic? It seems that when I select my checkboxes and hit submit there are no values passed on the first click, but when I click it again they appear. How can I fix this without hard-coding the checkboxes on the form? ...

Can you do classes in vbscript and ASP?

Is there anyway to do something like classes in vbscript. I ain't so good in classic ASP. Or does anybody have a C# vbscript conversion FAQ. My problem is that I must consume a webservice in classic ASP and the returntype is an array of a class. In asp.net with C# it's a piece of cake, because I know how to do it, but how do you do it i...