Server-side Includes (IIS 5, Classic VBScript)
I am building up a library of Class'es that represent various columns of
table layouts. One often used column is "name" and each occurrence is
treated identically. (What a concept, eh?)
Part of that library of Class'es includes representations of various tables.
(Just let me know if you see a trend going on here.) These Class'es use the
column Class'es.
What I would like to do, but I have yet to find a way around duplicated
names, is to place all the necessary supporting column Class #include's in
the table's Class so that I need only place the table's Class in the module
utilizing them.
I understand entirely why the "duplicate name" error occurs.
What I am looking for is a way around the conundrum that does not require
duplication of code. Any ideas?
View Replies
ADVERTISEMENT
The book I am referring to learn ASP states the following about server- side includes:
==============================================
The code in a server-side include file is inserted into the pages that use it BEFORE the page's ASP code is evaluated. This means that you can put ASP code inside the include file, and it will be executed like it was part of the page that includes it. On the other hand, it means that you cannot use ASP to determine which page to include.
==============================================
But as opposed to the last line in the above para, the following code makes use of ASP to determine which page to include: Code:
View Replies
View Related
I am troubleshooting a web site (not written by me) and may of the pages use server side includes. This one page includes a page that return includes the page the included it.
Page 1 (_connection.asp):
<!--#include file="MGroups/MRdisplayfun.asp"-->
Page 2 (MRdisplayfun.asp):
<!--include file="../_connection.asp"-->
The site is quite slow and when I first found this I thought that this was the primary cause of it. Then I thought this page shouldn't work at all because it would create an infinite loop and should just recursively call the pages and eventually consumme all server resources and database connections.
However it doesn't appear to act that way and the page does display and there is no endless calls to the SQL statements in the two pages. Is there something that prevents recursive calling when using SSIs?
View Replies
View Related
I have an xml document with a corresponding xsl file. I have the option of serving the xml directly for client side transformation or using a basic .asp file to transform the xml into xhtml.
All things being equal, I'd prefer to have the server do the transformation to avoid browser problems. Both options are basically working and the data in my xml files are being displayed properly through each method. Code:
View Replies
View Related
What I would like to do is randomize which file gets used with as a server
side include. Here is what I have so far: Code:
View Replies
View Related
I am using SSI navigation on my new ASP web site. On the original HTML version, if you clicked a link on the main navigation and entered a section, for example, SKILLS, the skills link on the navigation would be highlighted in a different colour, so the user would know which setion the were in.
To achieve this, in every single HTML page, I changed the CSS tag of the selected section. For example, Code:
View Replies
View Related
is it possible to open an excel file (used as a template) from server using server-side vbscript; then modify it or add values from client using client-side vbscript?
View Replies
View Related
I've been using SSIs for a while now. I'm now using them in a menu system. I'm trying to use multiple SSIs, that is SSIs within SSIs, but I'm just wondering if this will slow the pages down, and put too much strain on the server. I'll try to illustrate what I'm doing.
This is a dropdown menu system. Rolling over Link1 will reveal Link1-a, Link1-b and Link1-c, and likewise with Link2 and Link3: Code:
View Replies
View Related
How do I go about calling a server-side vbscript within a client-side
javascript function? What I have is a page heavy on the javascript that has
a number of functions, one of which is to begin a visual countdown with an
onclick and also open an asp page containing the server-side vbscript, which
initiates a wake-on-lan call. I had no idea how to call the vbscript within
the javascript function, so this is why I opted for the vbscript asp page
"pop-up" via window.open. Code:
View Replies
View Related
I've just been caught out by a host that doesn't support #includes in my
ASPs. What's the best strategy for replacing these calls to files that
include everything from subs and functions, global constants, other
#includes, script directives, etc.??
View Replies
View Related
I'm using classical ASP on IIS 6.0 (Windows 2003 Server). What I want to do is to serve the same pages in two different languages without using two different folders and doubling my same ASP code and changing the string values.
What I need is DYNAMIC INCLUDE functionality similar to PHP, however I know that I don't have it in ASP. Moreover Server.Execute is useless because it doesn't have a functionality like an include file, calling some file (that includes language string constants) conditionally is not useful because when the file is executed its scope is over and I cannot reach the constants or variables defined in that file.
What do you advise in such a situation? I need two groups of constants, one for English, one for Turkish, like: ....
View Replies
View Related
I'm running into a problem with VBSCRIPT classes in ASP. I use a seperate file for each class I use. Some of these class files are included in multiple ASP scripts, but are also included in other include files. So if you can't see the problem already, it is that occasionally the class file will be included twice in the same script, relsulting in the following error:
Microsoft VBScript compilation error '800a0411'
Name redefined
/includes/classes/closableobjectlist.asp, line 2
Class ClosableObjectList
------^
Does anyone know a clean solution for this problem?
View Replies
View Related
I'm using classic ASP with VBscript and I would like to have a facility for XML object serialization, just like the Serializer object that is available in ASP.NET. Is there such a thing for classic VBscript.
View Replies
View Related
Following is a vbscript code extract triggered by a combobox OnChange event. arrVendorA and arrdefpack are server side arrays and i need the intCounter parameter to be the array index. Code:
<script>
sub getstdPackByVendor(strPartNo, intCounter)
dim selVendor
selvendor= colSelect("cboVendor", intCounter).value
if selvendor= "<%=arrvendorA(intCounter)%>" then
if "<%=arrdefpack(intCounter)%>" = 2 then
colTD("txtStdPack" & intcounter+1 ).innertext = cstr("<%=arrVAStdPAckL2(intCounter)%>")
end if
end if
end sub
</script>
View Replies
View Related
The following code is giving me a type mismatch error at the 'if' statements... any ideas, anyone ?
sub getstdPackByVendor(strPartNo, intCounter)
dim selVendor
selvendor= colSelect("cboVendor", intCounter).value
if selvendor= "<%=arrvendorA(" & intCounter & ")%>" then
if "<%=arrdefpack(" & intCounter & ")%>" = 2 then
colTD("txtStdPack" & intcounter+1 ).innertext =
cstr("<%=arrVAStdPAckL2(" & intCounter & ")%>")
end if
end if
end sub
View Replies
View Related
I am working with Classes in classic VBScript on IIS 5.0 and am having a
problem wrapping my head around a solution.
I have a Class defining a record layout. (Bear with me here as I completely
roach the OOP language.) The objects are columns of the record and each
column is defined as its own Class.
The record layout class has a method called Column(str) that returns the
subclass's object. The subclass, in turn, has a Property Get (and a
corresponding Property Set) called Value. This allows me to make a
references like: Code:
View Replies
View Related
I check to see if a certain submission button is asking for removal. If the removal is true, I update a recordset's delete column. This has been tested and it works. However, now I'd like to prompt the user to make sure that he/she wants to remove the record. Here's the code: ....
View Replies
View Related
I have a Client Side Java Script which is supposed to re-load the options on my serverside ASP form.
I have been trying to get the syntax right to assign the Select box on the ASP form to a variable in my JavaScript so I can update the options. Can anyone either tell me if this is not possible or what the syntax should be. Here is some information.
Form Name = AddProdForm
Select Box name = subprodline
JavaScript Variable = form1
Here is one of the many versions of this line I have tried.
var form1=document.forms(""AddProdform"");
View Replies
View Related
I m writing one code to invoke remote desktop service for given IP address. For that i m using mstsc.exe file to invoke RDP.
I have a no of links to be displayed on the page and on click of link, RDP for that IP should be called. Currently i m using one button to invoke RDP. Code:
View Replies
View Related
I am starting to build quite a few pages that will have
tables of data from an SQL database.
I have been building the table rows on the server side
in VBScript, but I have been thinking about having the
VBScript code just build array variables in the <head>
section (or as local variables), and then have JavaScript
functions on the client side actually populate the tables
when the page loads.
I do plan to do other things like being able to sort the
tables in JavaScript code on the client, limit the tables
height and be able to scroll the rows, and click on a row
in the table, and have the values populate a form. I will
also need to be able to export/download/? some tables into
Excel.
View Replies
View Related
I am doing login page . (login.asp)As usual it has username , password textbox and a login button .i need to do client side validation for mandatory fields and I need to do server side validations to check for the hardcoded username and password .if it matches i have to redirect to another page(content.asp)
View Replies
View Related
im trying to use the following code to log whenever a user clicks through
this particlular message box - however, this currently logs regardless of
whether or not the message box was clicked - im assuming this is because the
server-side code can't see the client side if condition. but how can i set
the varMsgBox variable as a server-side variable? Code:
View Replies
View Related
I'm having an issue using a VBScript (client side) and ASP together.
Basically I have this piece of testing code (sampled from my site) where the "Order Total" is obtained from the server. In my code I just declare an "Order Total" server side variable and set it myself. Code:
View Replies
View Related
I have a sub routine called when I click on a button. It is inside VBScript tags (client side). Can I do server-side scripting inside that?
<script language="vbscript">
sub cmdButton_Click
code
'can I do this
<% strValid = "Update" %>
End Sub
</script>
Would be nice but don't think it works. Anyone know for sure?
View Replies
View Related
i have the VBScript functions that deals with SQL server 2000.
i have some event handler in the client side Java script. I want to call the VBScript
function from this javascript ( on demand). How can i do that? Is it possible??
if this is not possible then any alternative ideas that can execute the VBscript functions on demand from client.
View Replies
View Related
Im scripting for a site that has a lot of includes. Im trying to optimize and make things faster - since the site has unique 20000 visitors a day.
<!--#include file="somefile.inc"-->
more expensive to use than:
Server.Execute ("somefile.inc")
In terms of memory and cpu? Any comments with pros and cons would be a great help. Im working on ASP3 and an IIS4 *damnit* .
View Replies
View Related
we have started to upgrade our server form Windows2000 Advanced server to Windows2003 server. The website we are developing is done using classic ASP. When we put the website on the new server the asp pages didn't work and we receive an error (500 - Internal Server Error). I would like to know if there is a specific configuration for the IIS ver.6 on Windows2003 Server for classic ASP?
View Replies
View Related
I have a pure asp (Vbscript) page that manipulates data between MSAccess and
SQLServer2000. I'm trying to use the Scheduler app on the IIS server to run
this page nightly but there must be a better way of doing this.
How can I make my code in to an object and install it on the server and have
it schedule to run nightly?
Below is the code:
View Replies
View Related
On this page I've a button and an iframe. When I press that button, on click event has: document.getElementById("iframeID").src="mypage.asp?test=xpt" .
On mypage.asp I've
test=request.queryString("test");
response.write test
response.end()
The iframe loads the page, but test is empty.
View Replies
View Related
I'm developing an ASP app and trying to make it XHTML strict. This
requires the removal of all "name" attributes from form elements. Can form
elements be read server-side in ASP with only an "id" attribute?
View Replies
View Related
im completely new to server-side scripting, but im an experienced actionscripter in flash, but i want to learn server-side scripting as well, but i dont know where to begin, any advice on where to start?
View Replies
View Related
I have inherited a set of asp pages that I now need to augment. In order to minimize changes to production code, I would like to make a "call" to an asp page from a new asp page. Existing code is using many Request.Form variables, and I would very much prefer not to change this code.
The new page will retrieve data that I would like to fill into Request.Form variables that are used in the old code. So, is it possible for me to set Request.Form variables from within an asp page and then fire off a second page that uses those variables as
well as any Request.Form variables that were passed to the original page. Additionaly, it should all occur on the server, and the client would only get a response after all on the server is complete.
View Replies
View Related
i have an asp page and id like to run some DOS commands to copy files around on the server to a new directory on the server, and then run an exe afterwards. some sites tell me its as simple as Code:
View Replies
View Related