I am trying to display a random background image for a webpage. I found this code to do it
<% 'Defines the number of background images you have Const NUMBER_OF_IMAGES = 2
'Initiates the randomize function Randomize
'Sets a variable: this will be used to hold the 'random generated value Dim intImageNumber
'This is where we create the random number intImageNumber = Int((NUMBER_OF_IMAGES * Rnd) + 1) %>
Modify the body tag to accept the random number. In this case we are going to place it within the image so as to facilitate the selection of a random image. Code:
the DoConnection sub is in another page called MyDBConnection in a folder call Common.
I know that I can use serverside includes and embed my con in the page using <%%> but I want the use runat server How can I make call to a function in an external page?
I want to put the same JS tag on sites A and B that call an asp page on domain C.
The tag would look like this: <script language="JavaScript1.1" src="http://secure.C.com/Demo/Intercept.asp"></script>
The ASP page on domain C would write a cookie, in theory the cookie should have permissions for read and writing from site C. Something like this: Response.Cookies("Name").Expires = Date() + 365 Response.Cookies(SurveyName).Domain = ".C.com" Response.Cookies(SurveyName).Path = "/"
In firefox the result is exactly as planned, a cookie is set when a user goes to sites A or B via site C, and using this same approach, I can read the cookie from domains A and B via the JS tag calling the script on site C.
IE does not like this. Sometimes it doesn't even write the cookie, other times the cookie has to be there b/c of resulting actions taken, but when viewing the list of cookies, it's no where to be found. Additionally, I don't seem to be able to read the cookie the same way as firefox is letting me.
I know this can be done, I went to foodnetwork.com (yeah I love to cook), and saw that they were using a metric service that was calling a back end script from the vendors domain, and setting a cookie from that vendors domain, all without the user seeing anything or leaving the foodnetwork.com domain. I've looked at the resulting JS code that is returned from these vendor back end pages, and it has nothing to do with the cookie being set, it's definitely happening server side.
i am trying to write a script to parse an external xml file, but am having problems... the problem i think has to do with me trying to do Response.Write(xmlDoc.transformNode(xslDoc)) before the xml is fully loaded. The link to the xml file is valid. Code:
I have multiple websites on my Intranet. My current search engines can search within their own environment. However, I would like to have one search page, which retreives results from all environments.
My first task is to connect, retreive and display results from a second server (through http). Then I will need to scrub the results to display in a unique template.
I have a site that pulls in XML data from an external third party and I need to parse it in my ASP page.
Could someone please suggest examples or online resources where I might learn how to do this? Everything I am Googling is confusing me with DTDs, XSLTs etc.
I'm looking for a way to include a file from another server in asp page.using #include won't work because it's not on the same server. In php, you can simply include(), and it doesn't care whether or not it's on the same server, is there a similar function in asp?
i have an asp page to list the result of search page.when i click on a link(href) , which is a 3D CAD file located in a directory ,it should be opened in a new page.This page shld support a 3D cad viewer in built in it.how to inbuild a CAD viewer in the HTML page?and view the link in that page
This Rs(k).value is a link to the 3D file (eg. "C:Directoryfile.dwg").When this file is clicked,the value of Rs(k).value has to be passed to the "prev.html" page and the file must be opened with "3D file viewer".How to inbuild the CAD viewer into my HTML page and how to pass the Rs(k).value to that page?
I want to load a web page from another server via http into an array or variable, parse it, and pull some data using plain ol ASP / VBScript.an example page to pull:
i need to create a site with a feed back system. one of my friend said to me ASP has nothing to do with this project. is it possible to do this using ASP ?if yes then what r the major functions that i should use.
My company recently hired a third party to handle phone orders during off hours. The third party wants to be able to update our database through their own interface. We are running SQL Server 2000 on Windows 2000 Server with ASP.NET 1.1. The number one thing that come to mind is security for credit cards. Perhaps some kind of web service, xml, etc.? Does anyone have any suggestions on the best way to handle this?
I have an .asp page sitting on the intranet that I want to, when necessarry, send emails to people. All my code is fine, no errors whatsoever however, if the person to be emailed has an EXTERNAL email address they receive an email form my system fine BUT if my user has an INTERNAL email address they are not receiving mail from my system.
a way to read an output from an external webpage/service? For example;
The external source is on http://serverA:6010/sendoutput This page displays one line of outputted text, I want to be able to read this in an asp page into a variable.
I'm no ASP/VBScript guru, but I need to read a page from another domain, extract some information, and format it inside one of our own pages at the office.Just to make one thing clear: I'm not ripping off someone else's page. The external site handles employment ads, and we're supposed to include our own ads from there.
Frames or iframes are out of the question, since we use HTML 4.01 Strict. The markup on the external page is horrible (layout tables, presentational markup, etc.). I want to read the external page into a string, and then extract the actual ad information and format that on our page. This would be very easy in PHP, using fopen(), and I assume there is something similar for ASP/VBScript.
is there a way of getting an external page and saveing it as a string? eg. this would be a good way of doing geocoding with google maps or getting rss feeds into your site.
I have a webserver which is behaving strangely. The server is a fresh copy of Windows 2003 running IIS with default options + Active Server Pages installed. The server is connected to a Linksys router, and has a static IP address of 192.168.1.10.
When I access a page with the following script directly from the server, my WAN IP address is returned (24.x.x.x.), instead of my LAN address. Code:
We have a simple asp page that query LDAP attribrute. Everithing is working fine using a native domain account. but when using an external account we have an error 70, acces denie.
Here's some basic info on our structure.
- Domain/Forest A with Exchange - Domain/Forest B with external accounts. - Forest A Trus Forest B and "Vice Versa" - asp page on a Exchange FrontEnd server on default web site (same as Exchange)
- asp page is using basic authentification. - Authentification work fine using native domain account or External domain Account.
- Getting native Windows attributes work fine with External account but the attributes starting with "ms-Exch" do not come out.(Exchange Attribute). Code:
I've have a asp application that uses several session variables (login). I have a HTA application (on client "local") acting as the "window" for the application.
All works fine while using the HTA file to access my local version of the web application but when I try to access the same web application on the server with the same HTA file, just changing the iframe source from the client machine to the server, session variables no longer work. What's the deal? The server is not on our network, on DMZ. Code:
I have a project in which I need to send info to/get info from a RS-232 port of the server depending on the client clicks on a asp web page.
How can I access a serial port from the ASP code itself. I tried to use MSCOMM... But it is not working. Is there any way to do this?
As an alternative mechanism, we planned to shift all the communication related stuff to Visual C++ application which sits as a service in the Server and do the necesary communication stuff whenever it receives any request from an ASP page. We planned to use socket communication between ASP page and VC++ application if we go with this way. What are the other ways that a VC application and a ASP application can talk to each other...?
I've got a form with some user-submitted data in it. I need to post this data to an external gateway script running on an entirely different domain (via HTTPS). I then need to get a response back from that page and display the results on the original page to the user.I'm guessing that this is identical to what is done with merchant gateways for e-commerce, but I need to do this without any components.
I am studying Programming and Computer Engineering and got an assignment. I made a lamp kit and a program, but I now need to integrate both by using ASP. So, when somebody is in the ASP page and presses a certain button, the lamp needs to automatically switch on (or off).
This of course not only applies to a lamp but should be used for different devices. The logic is that no matter where you are or what time it is, you can remotely switch devices on or off using ASP.
My question is: What codes do I need to make this work? And what are the steps to follow?
I'm trying to create an ASP page which, when it loads runs the ASP code first then prompts the user to download a text file. I know the answer might be obvious to some of you, but I've sone several searches online and I'm not getting anything.
1) Run code in ASP page.
2) Prompt user for download of external txt file after code is finished running.
I would like to know something about placing a password for a database in an external file, something like a global.asa file or a included file. I'm using an access database and ASP. how do I make this file and how do I attach it to my website. I thought this might be useful for extra database security, is this true?
The database is located in a folder that is protected by the hosting provider and you can only download the database using a login name and password and you can change data trough webpages (update, delete and insert).This has all about database security, I want to make my database as secure as possible, I'm already using SSL certificates.
I am trying to clean up my html pages by removing the very simple (copied and pasted) javascript functions and placing them in an external file.
What is the correct syntax to call function f1 in function.js ? Also can I add asp code in function.js and call it from an html page? I have this code in my html page that is not working properly :
<font face="Verdana, Arial, Helvetica" size="2">Today's date is: <font color="#ff0000"><%response.write(date())%>.