Call Subroutines
how can I can a sub routine in ASP which has been given attribute runat=server
View Replieshow can I can a sub routine in ASP which has been given attribute runat=server
View RepliesCan I have this: Code:
<!-- #include file="myFunc.asp" -->
<form name="myform" method="post" action="<% function1(); %>" >
..form stuff
</form>
I tried it but it was as if the page was trying to process the function before the page rendered.
I'm building a system that flags Spam phrases and brings them to the attention of admins. I have a table with a list of about 90 terms and I want to show any rec ords that display them so Admins can determine if they should be deleted. The method I'm using is:
Building String
Code:
oString = "SELECT int_RecordID, txt_RecordName, txt_RecordDescription FROM dbo.qryRecords
WHERE txt_RecordName LIKE '%Viagra%' " & Call subSPAM & "
ORDER BY dte_RecordStarted ASC"
I have a script in ASP:
If strReport = "OrderDetail" then
strReport1 = strReport & ".rpt"
End If
If strReport1 <> "" Then
strReport1 = strReport & Year(strPeriod) & ".rpt"
End If
Now based on the kind of value in strReport1, I would like to do 2 different set of work.... Like for instance,
If strReport = "OrderDetail" then
call SubReportDB
End If
If strReport1 <> "" Then
Call SubOrderDetail
End If
Is that the right syntax?
There is a chapter on SUBROUTINES, FUNCTIONS AND INCLUDES.what is the difference between SUBROUTINES and FUNCTIONS. If not mistaken, in VB, the SUBROUTINES return no value, but FUNCTIONS do have return value.Variable in ASP: global versus local.variable not in betweeb function is Global (what about subrountine, is it the same) and variable in between function is local, am I right?
View Replies View RelatedI am using IIS 5.0, ASP and VBScript. I am puzzled by recurrences of errors when I nest subroutines, and I'd like to know if there are rules for that which I don't know. Would functions work better instead? I am not much of a coder.
View Replies View RelatedIn ASP, if I define a subroutine as private
Private Sub mySubroutine(arg1, arg2)
I understand that the variables I define inside the subroutine are local only to the
subroutine. If the same variable is defined outside the subroutine, it won't conflict
(right?) What about variables that are defined outside the subroutine, but not inside? Are they available inside the subroutine?
I am wanting to call a server-side sub when I click on a button.
Code:
<%@ language="vbscript" %>
<%
sub cmdButton_Click
code
end sub
%>
how do I call this sub from an input button.I have tried the onlclick property but it doesn't seem to work. Is this possible.
I'm having a bit of trouble with a subroutine I am calling when it is
invoked for the first time. When the subroutine runs, I expect it to return
a value for every time it is called. However, it seems as though the first
time it is run, I don't get any returned values. However, subsequent
returns will get me something back. Code:
I want to write a dll using VB6/VC6 and used by ASP. Questions are:
1. what special requirements for the dll used by ASP?
2. after built dll, how to use it in ASP? Where I should
save the dll? Do I need to register the dll?
Any article/link related to my question? the sample code?
How to call VC++ DLL from ASP? Could any1 show me the way/coding step by step?
View Replies View RelatedI want to have a single script for sending emails, accessible from both
ASP pages in any virtual directory in our websites (all on the one
server), plus accessible from a number of WSH (windows scripting host
vbscript files) which are triggered by the web servers Scheduled tasks.
The script formats text and checks emails and so on.
Is this a candidate for a web service? if so, how would i write it? Is a
web service available from WSH?
We have a C++ DLL that we call from VB6 program. This is how we declare the DLL in VB6:
Declare Function RefSearch Lib "csearch32.dll" (ByVal path As String, ByVal findword As String, ByVal CaseSensitive As Integer) As Integer This is how we call the DLL in VB6:
hit = RefSearch(path, SearchStr1, ChkValue). Can I call this DLL in ASP and how ?
I have two .asp pages running under different IIS authentication methods..
The first page uses Windows Authentication and gets the Logged on User from
Request.ServerVariables("User_Logon")
The second page runs under different Domain credentials and can access the
ldap directory... so I want to call it like so..
user = request.servervariables("User_Logon")
then something like --
<%
call page2.asp?theuser=" & user"
%>
where page2 runs as 'anonymous' credentials... (and Logon_User is Null)
-------
If this can't be done can I write the information to a cookie and then read
it from the other asp? How would I do that?
I just want to call two exe files from asp code.
View Replies View RelatedDoes anyone try before using ASP to execute JOB in MSSQL?
View Replies View RelatedI have a bummer here. I have 3 sub R. that I need to call from a input button. I set up the following line, but the script just calls them with out having the button pressed. OOOO! Any ideas?
<form method="submit" name="nreg" onsubmit="(this)" action="call readitme, call saveitme, call reduce" >
I have also used method="POST" same darn thing, script just runs the sub R. with out being pushed or cliked. UUUGGG
I have a form which checks email addresses. On submitting the form i have some JavaScript checking the format of the email address, once this has been completed successfully I would like my asp function to run. On successful completion of that I would like my form to be submitted to another page. Is this possible?
View Replies View RelatedThis may be in the wrong forum, but I'm going to give it a shot anyways. Here goes.
I have a conference report that has 24 phone lines that are available for booking. Each call can take between 1-24 lines, you can have any number of calls as long as the number of lines they take up does not go over 24.
I graphiclly represent this in a horizontal bar graph that displays the number of lines that are taken up for a particular half hour.
Problem is when a meeting takes more than a half an hour, the meeting bar fills up for that whole time without any information on the meeting.
What I would like to do is have each meeting when assigned in the DB or through an array be assigned a color and then that color appears on the graph under the time the meeting is. If there are multiple meetings (there almost always are), then the meeting that has been active the longest will be the first color bar on the graph.
To make a way too long story short. I want to have a stacked bar chart that moves colors to the front as other's leave every half hour and move new ones to the back.
If you want to look at what we have now visit URL.
Ok i'm self taught with regards to ASP so not great etc, so sorry if this is a really basic question..
On the last line here i'm trying to some how get it to call the last ID entry...
ImageID = Request("ID")
If (Len(ImageID) = 0) then ImageID = "1"
If Not IsNumeric(ImageID) Then ImageID = "1"
If ImageID = "0" then ImageID = "1"
If ImageID>3 then ImageID = max(Len(ImageID))
This is basically for some max min links for a online comic here's what it links to
<a href="default.asp?id=<%=ImageID-1%>">< Backwards</a> -
<a href="default.asp?id=<%=ImageID+1%>">Forward ></a> -
Code:
Can i call function from dll from an asp page (not COM)?
The problem is that i want the asp page to call function from dll which will
be in the same folder.
I could have created a com dll but it means that the web hosting company
must register it on their server and they wont.
My 1st page calls a 2nd that uses same data from a database. What is
the best way to get the data in the second: a new call to the database
or passing array through session variable??
I seems to me that avoiding a new call will speed up things but my
concerne is that I have read many posts with caution messages againts
session vars.
How can I execute a console application (smsbr-con.exe) in the server from asp, insert the parameter (-c, -m, -n, etc.) and get a returned values.
View Replies View RelatedI've built an application in VB6 does some processing - it's not really
important what it does.
The application consists of a single DLL which does all the hard work, and a
simple EXE which acts as the front-end.
I designed it this way in the hope that I could also build an intranet app
that controls the same component (DLL).
I'm building the intranet page now, but I get this error when I try to
instantiate the component. Rather than fiddle aimlessly with the
permissions, I thought I'd post here and find out what I am missing.
What permissions do I need to set up and where?
I have 2 web pages which is a.asp and b.asp. I using iframe to call b.asp in a.asp like below:-
Code:
<iframe src="content_wallpaper.jsp" id="myiframe" scrolling="no" frameborder="0" width="355" height="120" marginwidth="0" marginheight="0" align="center" allowTransparency="false" background-color="transparent"></iframe>
The problem is, i need to call the iframe in b.asp like below (because i just want to refresh this portion of the page)
Code:
<a href="javascript:myiframe.document.location.reload()" class="blue_11"><%=tmpCatName%></a>
The error occur as "myiframe" is in a.asp and i need to call it in b.asp and i can't find the solution for that too.?anyone know how to pass value from a.asp to b.asp in above?
I have registered a dll in my server using
regsvr32 dll_name.dll
and it prompt me the dll is registered succssfully
however, when my asp code want to create that object, the page prompt me
that
Server object error 'ASP 0177 : 8007045a'
Server.CreateObject Failed
8007045a
Any idea??
turnOnString = "/scripts/openagent_HTTP.dll?TurnOn&" & ascii(turnOnParameter)
Response.Write " window.open(turnOnString, ""TurnOnWindow"", ""locationbar=no, width=20, top=350, left=350, HEIGHT=20, toolbar=no, resizable=no"")" & vbCr
DLL name: openagent_HTTP.dll
Function name: TurnOn
The above coding works fine, i run the above script in button on click, it can pass the value to the dll, but evertime it prompts for each click, because i use the window open,
What i need to do is, instead of calling my dll through Internet explorer,
Is there is any way i call my dll straight and pass the value without window open?, pls help almost struggle for a week...
I have written a very complex web app for intranet use. It allows users to search a large database and then returns formatted results. I am currently employing a method as below: Code:
View Replies View RelatedI have an asp page accepting input from users Lets say this is form A, form A
passes data to another form (say form B) to validate the data, if its valid
then I want to open up another asp form (say form C) that does some queries
based on data sent by form B.
I need help in opening the form without user intervention meaning, users
should not have to press any key.
By VBScript ASP
How can I call a function by click one button?
With .asp,how do I call another program?I would like to have my .asp script make a call to a PERL script, wait for the PERL script to finish, and then continue with what is/isn't returned from PERL.
I know in PERL this is simply done: system(theASPprog.asp). No fork is created, so the PERL prog waits for the .asp to finish.How do I do this with ASP?
I want to syndicate some content to other users. (no RSS).Anybody should be able to publish some information from my server/database by placing some javascript like:
<script language="JavaScript" src="http://www.myserver.com/mypage.asp?param1=loremipsum¶m2=dolorsit"></script>
How can I code an ASP-page (on my server) so it returns and inserts information into a location in an existing webpage (other servers).
I'm trying to call asp function just simply by clicking a button But could i do this method? or how could i pass the function and values.It should be something like this:
<script LANGUAGE='VBSCRIPT'>
<!--
function btnClick_onclick
Dim strID
Dim strName
strID = document.form.txtID.value
strName = document.form.txtName.value
<%saveData(strID, strName)%>
End Function
-->
</script>