Client & Server code question
Dear All
I have created a calendar asp page accessing a SQL server database and all
works well, probably more by luck than good coding. I am able to view the
data displayed on the asp page, but my question is more of a design
structure question than a pure coding one.
I have created an asp page with the following structure:
<HTML>
<HEAD>
<% LANGUAGE = VBScript %>
<!-- #INCLUDE FILE="ADOVBS.INC" -->
Dim I, etc.
Variables Declared
<SCRIPT LANGUAGE=VBScript RUNAT=Server>
Functions To load Data into array
</SCRIPT>
</HEAD>
<%
Code to call the functions above
%>
<BODY>
Creates the calendar with data from above.
</BODY>
</HTML>
I get confused with the difference between <% LANGUAGE = VBScript %> and
<SCRIPT LANGUAGE=VBScript RUNAT=Server>. When should I use the former and
when the latter? How and when should I include external vbScript text files
so the code can be read at the server side and a separate script at the
client side?
The HTML I would want produced would be:
<HTML>
<HEAD>
<TITLE>Calendar </TITLE>
<SCRIPT LANGUAGE=VBScript SRC="AdditionalCode.vbs">
</SCRIPT>
</HEAD>
</BODY>
</HTML>
Where to you add the reference to the vbs file in the page so it is read at
the client side and where for the server side?
I hope I have not confused you all too much and you understand what I am
trying to ask. Well done for sticking with this post!
Kagsy Tag: Advice on client and server code Tag: 144400
Client & Server code question
Dear All
I have created a calendar asp page accessing a SQL server database and all
works well, probably more by luck than good coding. I am able to view the
data displayed on the asp page, but my question is more of a design
structure question than a pure coding one.
I have created an asp page with the following structure:
<HTML>
<HEAD>
<% LANGUAGE = VBScript %>
<!-- #INCLUDE FILE="ADOVBS.INC" -->
Dim I, etc.
Variables Declared
<SCRIPT LANGUAGE=VBScript RUNAT=Server>
Functions To load Data into array
</SCRIPT>
</HEAD>
<%
Code to call the functions above
%>
<BODY>
Creates the calendar with data from above.
</BODY>
</HTML>
I get confused with the difference between <% LANGUAGE = VBScript %> and
<SCRIPT LANGUAGE=VBScript RUNAT=Server>. When should I use the former and
when the latter? How and when should I include external vbScript text files
so the code can be read at the server side and a separate script at the
client side?
The HTML I would want produced would be:
<HTML>
<HEAD>
<TITLE>Calendar </TITLE>
<SCRIPT LANGUAGE=VBScript SRC="AdditionalCode.vbs">
</SCRIPT>
</HEAD>
</BODY>
</HTML>
Where to you add the reference to the vbs file in the page so it is read at
the client side and where for the server side?
I hope I have not confused you all too much and you understand what I am
trying to ask. Well done for sticking with this post!
Kagsy Tag: Advice on client and server code Tag: 144399
speed of string comparisons
Is a binary compare strComp faster or slower than a text compare for
simple text strings? Tag: Advice on client and server code Tag: 144389
Urgent Help on Rotate Text
Dear all,
I'm not sure whether this question I should be posting
here, but hopefully can get help from you all.
I'm having a problem here. The problem is that I want to
rotate a text horizontally, for example 'ABCD' into 'DCBA'
but it is in horizontally way, because it is for printing
a report.
Needed help urgently.
Thanks in advance.
Mae Tag: Advice on client and server code Tag: 144385
Quick and clean, help needed ..
Im totaly green when it comes to scripting, and im looking for a small
script that would look in the registry at
HKEY_USERS\S-1-5-21-1957994488-484763869-854245398-500\Software\Microsoft\In
ternet Explorer
and see the data in the Download Directory key then open that folder in my
computer or explorer, what ever is easier.
Does anyone have a time to punch it out ?
Im sorry about asking for it complete I usualy dont do this, but I kinda
need it asap,
otherwise I would try to learn how myself...
Thanks Allott !
Glenn H Tag: Advice on client and server code Tag: 144378
date input mask
The date input mask "00\/00\/0099" with wrong date return a different date
instead an error. E.g.: 31/04/03 return 03/04/1931! Is there a reason?
Thanks.
Sandrobi Tag: Advice on client and server code Tag: 144376
VBScript in a JavaScript page.
Hi,
I have a JavaScript page in which I would like to include VBscript
code. Is this possible? If it is possible, then how will I declare the
language type so that the browser can understand and final question
lets say I am hosting my page thru X server and my page uses database
which is located on Y server, both the servers are 3rd party servers.
Is it possible for me to link the database on Y server thru my page on
X server??
Thanx
--AV Tag: Advice on client and server code Tag: 144372
Script number of users in each mailbox store
How is everyone doing today. IM looking for a script that
will be able to list the amount of users per mailbox store
in exchange 2000. Tag: Advice on client and server code Tag: 144369
Curious
The HTML below contains a table with 2 rows. Each row has
the same id. (id="r1")
The following Subroutine will display the number of
elements that have id's set to "r1" only if 2 or more
exist... but will error out if only one exists.
Changing the value of one of the id's to something
different will cause the Sub to error-out. Why will it not
return a collection-length of "1"? Is this a bug?
----------------------------------------------------------
<html>
<head>
<title></title>
<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
<meta HTTP-EQUIV="Expires" CONTENT="0">
<script language = "VBscript">
Sub Test
set a = document.all.item("r1")
msgbox a.length
End Sub
</script>
<body>
<input type="button" value="Display Total" onClick="Test">
<br>
<br>
<table width="100%" border="1" cellspacing="0"
cellpadding="4">
<tr>
<td id="r1">Row 1 </td>
</tr>
<tr>
<td id="r1">Row 2 </td>
</tr>
</table>
</body>
</html> Tag: Advice on client and server code Tag: 144361
Good VBScript Debugger
Hi
I just started using VBScript and I am in need of a good
debugger. I have used the ones that come with Excel VBA.
Can anyone recommend one?
Thanks
Jack Tag: Advice on client and server code Tag: 144360
How to replace PivotTable data fields...?
Hi,
I'm progamming a pivot table using VBA. I have no problem manipulating
column or row fields, but how can I replace a data field? Everything I try
just adds the data field to the existing data field resulting in a mess.
The PivotTable.addfields methods *replaces* whatever columns were previously
designated as RowFields, ColumnFields, and PageFields with the new
specifications, as in:
.AddFields RowFields:="Date", PageFields:="Location"
But no matter what I try, I can't replace the data field.... I've even tried
setting the Orientation property to xlHidden, as follows:
' Hide existing data fields
For each pf In .DataFields
Debug.Print "deleting pf", pf.Name
pf.Orientation = xlHidden
'pf.Delete ' I tried deleting too
Next
They key is that I need to do this via code. I can easily do it by using the
Excel GUI. I recorded the resulting code - Excel was hidding the field by
setting its Orientation property to xlHidden. Why doesn't that work for me?
Many thanks in advance,
Robert Stober Tag: Advice on client and server code Tag: 144351