Reference VBScript Variable
This is my VBScript function:
<script language="JavaScript" type="text/JavaScript">
Dim UN
Set objNet = CreateObject("WScript.NetWork")
Set objUser = GetObject("WinNT://my domain/" & objNet.UserName )
UN = objNet.UserName & " (" & objUser.FullName & ")"
</script>
How can I reference the VBScript Variable UN in my ASP code? <%=UN%> won't work because VBScript is on the client side and ASP is on the server side. If I have to post it on one page and read it on another, how do I do that?
View Replies
ADVERTISEMENT
I have an ASP project where I have users select or input values into a criteria page and then once they press "Submit" the ActiveX viewer displays the crystal report. All works fine and the criteria can be somewhat dynamic because the variables are used to build a SQL statement that is passed to the crystal report as the dataset.
What I would like to do is create a variable on the Crystal report that will display the SQL statement or at least an English translation. This variable will be used to display the criteria of the report so end-users can see what criteria was used to generate the output of the report.
View Replies
View Related
I'm dividing two variables and on some instances the results going to be a long decimal. I want the decimal to round up to only one pace tho. How could I do something like that? My coding looks like this.. Code:
readscore=rsgameinfo("readerscore")/rsgameinfo("readervotes")
View Replies
View Related
I want to pass a variable by way of a querystring (or any way that's possible) from flash (actionscript) to vbscript. From there I want to save the variable into a MySQL database. I understand the vbscript part but how would I transfer a querystring from a flash program to vbscript?
View Replies
View Related
I have the following code in an ASP page but it does not seem to allow a JScript to access VBScript variables. But if a VBScript accesses a variable in declared in a JScript TAG then it seems to work.
<SCRIPT LANGUAGE ="VBSCRIPT" RUNAT="SERVER"
Dim tes
test = 10
</SCRIPT><SCRIPT LANGUAGE ="JSCRIPT" RUNAT="SERVER"
Response.Write(test)
</SCRIPT>
View Replies
View Related
I tried the search function but I can't really identify what this kind of issue would be called (Searching store variable comes back with hundreds/thousands of hits).
I am doing an update form which opens 2 SQL connections (its easier for me to do this cause I mess up joins to a significant degree, that and performance is not a big worry, eitherway).
<notes> Both connections are open, one is called rs, the other is called articlers. I have 2 databases (named database1, and database2), and I have two different SQL strings (SQL and articleSQL, the problem comes in the 2nd string and in storing a variable. Code:
View Replies
View Related
<%@ Language=VBScript %>
<%
dim a
dim b
a=11
b="11"
if a=b then
Response.Write "a=b"
end if
%>
But can't shows "a=b".How can changes variable type?
View Replies
View Related
I have an input box when the user clicks on the button.
var number=prompt("enter journal number");
How is it possible to pass this variable forward but to vbscript? So i could use that variable in an sql procedure?
View Replies
View Related
I have a Function in VB Script that generates a signature. I assign the result to a variable and then need to do a hidden post to an ASP Page for further processing.
Basic functionality is I have a button upon pressing it -- It does the hidden post.
Code looks like this. Please assist with passing this stringToSign variable to the .asp page via hidden post. Code:
View Replies
View Related
I want to use vbscript to run a script multiple times and save its results to a text file. I have practically wrote this script before but only using a sql command wrote in to the script. However, this is a lengthy sql file so can not be directly entered in to the vbs script,s o I would like to run it using sqlcmd.
"SQLCMD -S "&WScript.Arguments(0)&" -i "&WScript.Arguments(1)
I have tried Googling this problem but found very little information about it. Any discussions online that I have found show no code and assume you already know how to do it.
I have found this so far:
Set objShell = CreateObject("WScript.Shell")
Set objScriptExec = objShell.Exec("sqlcmd -S "&WScript.Arguments(0)&" -i "&WScript.Arguments(1))
But how do I get hold of the results in to some kind of variable?
View Replies
View Related
Is there a way I can assign a value of true or false to a VBScript variable? I have a function where I want to initiate a value of false: Would this work? Code:
View Replies
View Related
I want to build a website with a members only section using ASP and an access database, can anyone tell me a website or recommend a book to help me do this?
View Replies
View Related
Where I can find an ASP reference (objects, methods and properties) like the one that PHP offers in his site?(downloadable and .chm format preferable)
Please don't tell me microsoft.com, be more detailed please because I've been searching for on microsoft.com ...but nothing found.
View Replies
View Related
I'm writing a custom COM object used by certain pages on a site. During
development, I need to replace this dll periodically, but have found that is
in use and can't be replaced. This is true even after all browsers have
been closed, and sufficient time allowed for a session to expire. The only
thing I have found that works is to restart IIS thru the IIS mgmt console.
The object is used like this:
var vObject = Server.CreateObject('MyObject');
//do something with it
vObject = null;
Is there another way to replace this dll short of taking the entire site
down?
View Replies
View Related
i need to download some good free ebooks of ASP, links please.
View Replies
View Related
I'm trying to convert some ASP pages to PHP, but I don't know ASP very well (as in: at all ), and there are calls ASP is making whose purpose and function is unknown to me. I tried looking for a reference on the web where I can search any function name and get a reference to what it does, but I have been unable to find it.
Is it somewhere really obvious and I just missed it like an idiot? Is there such a site out there at all? I need to translate ASP to PHP and as such need to read it, not write it, so a index/reference sort of site would be better than a learning ASP sort of site.
View Replies
View Related
As my site and folder structure are becoming larger and larger - I am not quite sure how to reference files in a very different part of the folder structure. Is there certain syntax I should be adhearing to?
I see a lot of " ./ " stuff - but I am not quite sure what it means. Is there any other sort of things like ./ ? If you have any advice or have a link that explains this.
View Replies
View Related
the equivalent of fopen(PHP) in ASP and if so where can I read more about it? Also does anyone know a good reference for ASp where you can read about functions and so on?
View Replies
View Related
suggest me a complete ASP reference site with all the featurz and fungtions of ASP clearly mentioned.
View Replies
View Related
I've been struggleing with this chunk of code:
for j = 1 to totalManagers2
Response.Write("# in J loop:" & j & "<br/>")
If Request.Form("j") = "on" Then
myToField = myToField + recipiant(j)
Response.Write("recipiant's email is :" & recipiant(j) & "<br/>")
validRecipiant = true
End if
next
My problem lies with line ' "If Request.Form("j") = "on" Then '...
Now on the first page, I have a form, which I dynamically populate a table, and for each row, I output an HTML checkbox. I assign the name of that check box to a # that is incremented within the for-loop that is outputting all the HTML table rows.
So I have check boxes with name attributes such as "1", "2", "3", "4" and so on.
My question is, on the next page, how do I tell if those check boxes are checked? I use the Request.Form("1"), Request.Form("2"), Request.Form("3"), Request.Form("4") and so on.
But as you can see, in my For-Loop, I'm just checking this...
Request.Form(1), Request.Form(2)...and so on ....
So I am ignoring the quotation marks...how can I include them so the code knows to look at the form for the name attribute of "1" and not just 1?
View Replies
View Related
I�m getting the error with the code below [ line 179 is just after the �then�]. The code is supposed to complete an�a href to an image if it exists. Code:
View Replies
View Related
I wanna know all String function reference in ASP and ASP.net. Is any website provide this information?
and Is string function in ASP and ASP.net has same.?
View Replies
View Related
I took over an ASP site and am having trouble uploading pics through the user interface. I get the following message:
Microsoft VBScript runtime error '800a01ad'
ActiveX component can't create object: 'SoftArtisans.FileUp'
/admin/UPLImage.asp, line 15
The line refered to by the message states:
upl.Path = "d:htmlusersusernamewebsite.comImagespages"
View Replies
View Related
is there an sql command that allows me to select all rows where a specific field isn't called by other rows? To be more specific: I have this table for my categories. I want to be able to choose all the categories that don't have subcategories. The fields are
CaName
CaId
CaParent
So a category has a parent, so caParent = the CaId of it's parent. So is there a way to call all the categories that don't have children categories in my sql?
View Replies
View Related
I have different database connections that I use for DEV and PROD versions of our web app. I want to put the database connection string in one location so I only have to change it once when we push live.
So I put it in an include file and reference it in all my asp pages as:
<!--#include file="includes/db_conn.inc"-->
But this will not work with the global.asa page. How can I reference an include page from global.asa?
View Replies
View Related
Is there a place online that that provides a glossary of ASP syntax?
I need a place that will briefly explain the meaning of ASP code such as:
DIM, IF, ELSE, sub, Response.Write, etc.
View Replies
View Related
My web host has stated that If I want users to be able to write to my database. I need to store it outside my site folder. So I have a site folder called www and a folder next to it named database. If I insert my database into that folder how would I reference it in my html?
How do you say in HTML "leave the www folder and find the database folder?"
View Replies
View Related
I have a database of UK postcodes with corresponding OS Grid references (easting and northing) but I need to convert these to longitude and latitude so that I can plot my postcodes on a Google Map.Does anyone know of a function which can do this?
View Replies
View Related
I have a rather large classic ASP application that uses relative references like
...commonconnection.asp
all over the place in about 60 pages. The application works OK on my XP Pro machine but does not work on a Windows 2003 Server. Is there a way to set the server to accept the reference to the Parent folder? Does it have something to do with IIS lockdown? Or IIS Version 5 instead of 6?
View Replies
View Related
If anyone knows of something similar to the PHP style documentation that would be great.
View Replies
View Related
on my hosting acount I have 3 folders that were set up by default:
DB
LOGS
WWW
now I understand what each if for obviously, but can i reference back to the
databases location outside the www folder from a file using
..../DB/database_name.mdb ? {asssuming of course the file I am referenceing
from is in the main WWW folder)
View Replies
View Related
I'm just looking into modifying a script for an asp page and I've come across this code.
sch = "http://schemas.microsoft.com/cdo/configuration/"
Set cdoConfig = Server.CreateObject("CDO.Configuration")
With cdoConfig.Fields
.Item(sch & "sendusing") = 1
.Item(sch & "smtpserverpickupdirectory") = "c:InetpubmailrootPickup"
.update
End With
Set cdoMessage = Server.CreateObject("CDO.Message")
Could someone please explain to me what the sch reference is for and if I need it.
I'm going to create an E-mail message and use CDOSYS to send it. I think it's necessary to understand what's going on before I continue....
View Replies
View Related
I'm building a 'spot the ball' gaming site where people choose a point on an image closest to where the ball should be. This works in Flash by assigning co-ordinates to that point.
However, I need to do a database look-up when the competition is over, to see who has the closest point. I'm hoping to build an ASP application that will enable the administrator to enter the correct co-ordinates, then click a button to find the closest entry in the database. I can't think of an accurate automated way to do this. Has anyone built anything similar? What would be the best way to achieve this?
View Replies
View Related