|
Hello All!
I am new to the javascript language and am needing some assistance with the syntax. I need to write a script that will capture the user's NT Login information. I don't need the password, but I do need the user name and domain name if necessary. so that I can run a query through ColdFusion to my Oracle Database's user table.
Can someone tell me what that syntax is or a really good Javascript language book with great examples on how to capture this data?
I have done this same thing using .NET Asp and storing the information in Session variables, but at this time that is not the language that is being used. So I would really appreciate any suggestions and help.
Thanks!!!
:->
|
|
|
|
|
|
I found a work around but can someone tell me why this does not work. I read in books that this is how to do it in VbScript
dim x
for x = 0 to document.formname.Elements.Length -1
msgbox document.formname.Elements(x).name
Next
It seems to me that the Elements is null as I get the for loop not initialized error. Plus, the when trynig to print the length i get nothing.
I can do a document.getelementbyId with no problem.
the elements are create using window.DisplayEdits.innerHTML=lsDisplay
DisplayEdits being a CELL
Thanks
|
|
|
|
|
hi,
Can anyone please provide me with some guide or references for deploying an ASP.NET web application that uses:
- Crystal Report 9 (Integerated with VS.NET 2003)
- A web service deployed at some remote server.
- SQL Server 2000 database
I am going for a custom action to get some parameters such as database server name, database name, etc. from the user at deployment time. I want to insert these parameters in the web.config file of the application during the setup.
is there any way to do this?
thanx in advance
☺«««DTA»»»☺
|
|
|
|
|
What installer are you using ? web.config is just an xml file, so in theory there's no problem with doing this, but I don't know if the standard installer package will allow it.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
We used InstallShield DevStudio 9 to do this. That has flexible and easy to use Custom Forms and after collecting all info, we can have a Custom Installer class to be invoked, which can generate proxy, update web.config etc.
Deepak Kumar Vasudevan
Personal Web: http://vdeepakkumar.netfirms.com/
I Blog At: http://deepak.blogdrive.com/
|
|
|
|
|
|
i AM using the Visual Studio setup project.
i like the custom action idea by minhpc_bk! infact i think that its the only way to do this (when using the VS.NET setup project.)
i suppose that this custom action has to be run at the commit event..right? as the web.config wont be there to edit during the installation. so if this is right, then can any of you guide me on how to use the user provided information in this custom action and how to find the path where the web.config will get installed to? some tutorials would be great!!!
again thanx a lot to all of you guys!
regards
☺«««DTA»»»☺
|
|
|
|
|
I am having problems hiding user controls. The attached code does not appear to work can anyone point me in the right direction. On page load I don't want to display the user control.
File webform1.aspx.cs
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
namespace Emulator
{
///
/// Summary description for WebForm1.
///
public class WebForm1 : System.Web.UI.Page
{
Keyboard keyboard1 = new Keyboard();
private void Page_Load(object sender, System.EventArgs e)
{
// Put user code to initialize the page here
if (!IsPostBack)
{
keyboard1.Visible = false;
}
}
#region Web Form Designer generated code
override protected void OnInit(EventArgs e)
{
//
// CODEGEN: This call is required by the ASP.NET Web Form Designer.
//
InitializeComponent();
base.OnInit(e);
}
///
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
///
private void InitializeComponent()
{
this.Load += new System.EventHandler(this.Page_Load);
}
#endregion
}
}
FIle webform1.aspx
<%@ Page language="c#" Codebehind="WebForm1.aspx.cs" AutoEventWireup="false" Inherits="Emulator.WebForm1" %>
<%@ Register TagPrefix="uc1" TagName="Keyboard" Src="Keyboard.ascx" %>
<title>WebForm1
<uc1:keyboard id="Keyboard1" runat="server">
User Control files
file keyboard.ascx.cs
namespace Emulator
{
using System;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
///
/// Summary description for Keyboard.
///
public class Keyboard : System.Web.UI.UserControl
{
protected System.Web.UI.WebControls.TextBox textBox1;
protected System.Web.UI.WebControls.Button buttonOk;
private void Page_Load(object sender, System.EventArgs e)
{
// Put user code to initialize the page here
}
public void Hide()
{
this.Visible = false;
}
#region Web Form Designer generated code
override protected void OnInit(EventArgs e)
{
//
// CODEGEN: This call is required by the ASP.NET Web Form Designer.
//
InitializeComponent();
base.OnInit(e);
}
///
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
///
private void InitializeComponent()
{
this.Load += new System.EventHandler(this.Page_Load);
}
#endregion
}
}
file keyboard.ascx
<%@ Control Language="c#" AutoEventWireup="false" Codebehind="Keyboard.ascx.cs" Inherits="Emulator.Keyboard" TargetSchema="http://schemas.microsoft.com/intellisense/ie5"%>
<asp:textbox id="textBox1" runat="server">
<asp:button id="buttonOk" runat="server" text="Ok" class="Fatkey">
function keyClicked(elem)
{
try
{
document.all("keyboard1_textBox1").value+=elem.value;
}
catch(e)
{
Response.Write(e);
}
}
clueless novice
|
|
|
|
|
Hi there,
There are a couple of things come to mind after a quick scan on your sample code:
+ To add a web user control to the web page, you cannot use the new keyword to create the user control and add it to the web page. You either declare it on the web page, for example:
<uc1:Keyboard id="Keyboard1" runat="server" /> or use the LoadControl method to programmatically load the user control based on its path.
+ In the code-behind, you simply add the declaration for the control instance:
protected Keyboard Keyboard1;
+ To make the control insivible, simply set the Visible property to false as you did.
For more information, you can see Adding User Controls to a Web Forms Page[^]
|
|
|
|
|
I have a variable called "testvar" with a value of (let's say)OPT
My SQL SELECT statement I have this
"SELECT FROM PRICELIST WHERE CAT =" &TESTVAR
Or something like this. IF I change the testvar in the select to "OPT" it works but not if just OPT.. How do I get my TESTVAR sert to hav the guotes in allready. ?????
I KNOW it must be something silly? PLEASE?
I assign the testvar="OPT" but need the select statement to then add this corectly to do a = to OPT?
HOPE this is enough info. (P.S. yes I am a newby as you can see
evlxtc
|
|
|
|
|
You have to put apostrophes around the string value:
"SELECT FROM PRICELIST WHERE CAT = '" & TESTVAR & "'"
This will give you a string that contains:
SELECT FROM PRICELIST WHERE CAT = 'OPT'
---
b { font-weight: normal; }
|
|
|
|
|
Thanks, that is all I needed. NOW I just need to finish a few small graphics and that will be that for this site. PS How do I in anycase concat a string to make a variable = "something" or is this not possible straight forward?
this is me
|
|
|
|
|
Do you mean that you want the apostrophes to be added to the beginning and end of a string?
variable = string.Concat("'", variable, "'");
or
variable = "'" + variable + "'";
or
variable = string.Format("'{0}'", variable);
---
b { font-weight: normal; }
|
|
|
|
|
|
|
|
I want my VBScript to stop for 4 seconds before starting again.
Searched the web and found this "WScript.Sleep 4000".
The problem is that when I use this code i get an error "Object required 'WScript'".
What is wrong?
Is there a better way to do this?
Spaz
|
|
|
|
|
Hi Spaz,
The WScript is an object in the Windows Script Host[^] which allows you to run scrips from the command prompt or the Windows desktop, and WSH should not be used on the web page to run at the client side. AFAIK, there's no method which you can use to make the execution sleep for a period of time, and you can take a look at Eric Lippert's explaination[^] for more information. However, there are a couple of work-around solutions which you may consider: setTimeout, setInterval methods ... You can see some examples from here[^]
|
|
|
|
|
OK
Thanx for the answer, I got it working with setTimeout..
Spaz
|
|
|
|
|
can anyone please send me the complete code in ASP for sending emails.
its urgent
|
|
|
|
|
You need either to use the CDONTS component, or a third party component, to send mail. The code differs depending on the component you plan to use. What component(s) can you use?
---
b { font-weight: normal; }
|
|
|
|
|
i will use CDONTS. can you send the complete program for sending mail through ASP pages. waiting for your reply.
|
|
|
|
|
|
MSDN seems to have some problems right now, but when it works again, this link should contain some example for sending mail using CDONTS:
MSDN: NewMail object[^]
---
b { font-weight: normal; }
|
|
|
|