Server Side Code From Javascript
Is it possible to run a Server Side function from JavaScript? I have a dropdown list that executes some javascript in the onChange event, but I need it to query a database after it does so.
View RepliesIs it possible to run a Server Side function from JavaScript? I have a dropdown list that executes some javascript in the onChange event, but I need it to query a database after it does so.
View RepliesHow 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:
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 RelatedI'm trying to modify an existing ASP application, which uses JavaScript as the server-side scripting language.
Can you use the "try...catch" blocks in server-side JavaScript?
<script type="text/javascript"
function window_onload(
{var params = new Array()
params["streetNumberPrefix"] = <% Request.Form("streetNumberPrefix") %>
</script></HEAD><BODY onload="window_onload()">
Could anyone tell me whether either, ASP, or ASP.NET/VB.net or ASP.NET/C# enable me to create a web application with no source code available to be seen by the clients people.
I read something about dll's an using Visual studio.net in another post,Iprefer vb.net or c# cos I am familiar with vb an c# is supposed to be easier than c++
Anyone have server side code to password validation?
View Replies View Relatedis 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 RelatedFollowing 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>
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
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"");
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:
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.
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 Relatedim 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:
Im using a table which can add rows dynamically.This is pure javascript. However, first cell of each row, is a 'select' drop down menu, which has to be populated with entries from the database.
So i have to use ASP to connect to the db, retrive the file with the values and pass on these numbers to the 'value' part of the 'select' element of each row.
How can I do this?
I thought it would be easy but I have spent (wasted) lots of hours on it
I have this SQL statement that returns customer names. Customer names can be as simple as John Doe or a bit more complicated such as
Sean "Big Al" Apple
Using ADO object, it gets stored into a variable in VBscript on server side, so the line of code will be like Code:
msCustomerName = rsCustomer("customer_name")
At this point, I have no idea, of course, what letters the variable may contain.
It is generally recommended to put all client javascript in between the <head> tags.
What are the drawback if the scripts are not placed there? It seems that Internet Explorer can handle them where ever they are on apage.
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?
i have a small piece of Javascript code. The problem is i have some variables in vbscript that i would like passed inside the redirection within javascript. Does anyone know how to do this?Code:
function search()
{
var number=prompt("Enter Journal Number");
document.location = "SearchJournal.asp?number="+number;
}
Variables need passing in above
Code:
Username = request("Username")
Usernamejournal = request("Usernamejournal")
anyone know that the coding for javascript that alert message have two choices? one is Ok & another is Cancel.
for example " are you sure want to delete?" then user can choose, ok or cancel.
I have a checkbox in a form and i want it to create a session if clicked. If it is not checked the session is deleted. I have tried the code below but it always creates the session even if the check box isnt clicked.
<input type="checkbox" id="txtValidate" onClick="<%session("checked")= "true"%>" />
I have create a function in javascript and the function will return an integer type of value and i want to call that function in Asp code and use that integer value so please tell me how can i call that function.
View Replies View RelatedI am trying to have multiple layers on a page that toggle on and off, it
works on a htm file but when I use it as an asp file it doesnt show
anything. Code:
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.
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?
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 RelatedI 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.
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 RelatedI'm using IIS 5 and I've been reading about server to browser HTTP compression
using "gzip" or "deflate" encoding. Can this be done in IIS 5?
If so, it is a configuration setting or do I need to compress it myself before
sending to the browser?
I have page which uses two server includes. The first displays a random banner advert. The second displays a form containing dropdown boxes populated from a database.
The includes work seperately but when I include them together I am getting an error. The includes share the same database but use different tables.
Does anyone have any ideas as to what could be causing the conflict between the two includes?
Here is my code for the BANNER .....
I would like to print to a printer connected to my IIS server.
I mean "I DONT WANT TO PRINT ON EVERY PRINTER IN THE WORLD". (many
answers are thinking javascript printing to the user side)
I just want to print on the server side only for me (in ASP of course)
Another thing to consider is that i use a local printer that generate
PDF (Acrobat Distiller driver + ghostscript + redmon port redirector ).
My server side printer name is "PDFPrinter" and its port is "RPT1:"
I tried with FileSystemObject.CreateTextFile("RPT1:",True) but don't
work.I saw many examples with:
.......set objPrinter =CreateTextFile("LPT1:",True) so ....
I also tried with Wscript.NetWork class but no sucess
I would like to achieve the equivalent of META REFRESH but without the HTML
meta refresh and without JavaScript. In other words, on server side I would
like to wait some seconds, then redirect the page. Is there any way to do
this?