|
i have text box in datagrig. i want to accept only string characters in text box.
how to write java scripte for tht?
|
|
|
|
|
Use the onkeypress event. Call a javascript function on this event which chekcs the key code. If this do not want this character return blur()
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
on click of button i want to validate text box for string
means user must have to enter only string
textbox name is comment
so how i will validate
i try to write but thts not working
function check()
{
debugger;
var s1=document.getElementById("TextBox1");
var s=s1.value;
if(IsNumeric(s))
{
alert("Numeric characters are not allowed");
}
}
not support IsNumeric function
|
|
|
|
|
Use regular expression to validate your input string
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
i want to display alert........with tht i ant show tht
if plz sen me tht code of javascript for tht textbox
|
|
|
|
|
u can use javascript alert on .cs
//---------------javaScript Alert-------------------------
public void CreateMessageAlert(System.Web.UI.Page senderpage, string alertMsg)
{
string alertKey = "alertKey";
string strScript;
strScript = "alert('" + alertMsg + "')";
if (!senderpage.IsStartupScriptRegistered(alertKey))
{
senderpage.RegisterStartupScript(alertKey, strScript);
}
}
//--------------------------------------------------------
call it like -
s = "hello";
CreateMessageAlert(this, s);
Maniiiiiiiiiiiiiii
|
|
|
|
|
Hi all
I am interested in developing a small, simple web server. I want to be able to exchange data between a server and a client via html (or unless some one knows of a better way of doing it without installing any client side apps, lie active x for example). The server will also need to be able to generate html pages containing information based on its current understanding of that data.
The data wil consist of strings and check box data, as well as commands via buttons.
Perhaps there are some god articles on CP that some one knows about and can point me in the direction of.
Thanks in advance
---modified---
One more thing, I will be implementing it in C so any C, or C++ examples would be better.
Morality is indistinguishable from social proscription
|
|
|
|
|
|
Thanks, its interesting what it shows up. I think, after digging in alittle deeper, that what I actually need is a small, single threaded http server to start with, and then possibly I will have to add the data passing (unless it can be done entirely with html) functionality, perhaps CGI? Dont know, I have very little knowledge in this area.
Morality is indistinguishable from social proscription
|
|
|
|
|
What is the problem in using existing web servers such as Microsoft's IIS or Apache. You made mention of CGI, are you thinking of running an executable (an EXE or DLL) to process data ? If so, either IIS or Apache can run such CGI's. Just program the CGI with the functionality you need in whatever language you choose (Pascal/C++ etc). I not absolutely certain if I still got, but I used to have some Borland literature on this subject, it is some years since I last did Borland related stuff.
modified 1-Aug-19 21:02pm.
|
|
|
|
|
Richard A. Abbott wrote: What is the problem in using existing web servers such as Microsoft's IIS or Apache
I want to put a small web (http) server in a network driver so it can interpret html requests and resond with relevant data. THats why its got to be small, and in C.
Morality is indistinguishable from social proscription
|
|
|
|
|
|
You helped a lot with the link to sourceforge, it helped me refine my problem down to just needing an http server, rather than a full web server so thanks.
Morality is indistinguishable from social proscription
|
|
|
|
|
I'm sure I'm not the only one wondering why you'd implement a web server within a network driver. I can imagine you just want a really small web server--but then it doesn't have to be part of a driver. Or I can imagine you want a driver whose configuration utility is http-based--but then the utility doesn't have to be part of the driver either.
So I wonder if you could explain a little more what you're trying to do... or why. I think the best answer depends a lot on whether your environment supports things like stdin/stdout, sockets, and the like. And of course what operating system you're working with.
(If your environment lets you use inetd, writing a web server gets a lot easier! You simply read a request on stdin and push the response onto stdout.)
|
|
|
|
|
|
I have a small problem with a hardware supplier who is designing remote units which will report back to a web service on one of our servers. I have set up a simple test web service, that accepts a string, and successfully consumed it with a small c# app externally. My supplier is having difficulty uploading data to the web service, and says that if I can successfully use hyperterminal to access the web service, his hardware should work too.
Well, not being an expert in web services (obviously) I thought "Easy! I'll just POST a version of the SOAP message that the .asmx header provides (supplying a string and content length). However, all I get back is <h1>Bad Request</h1>, or <h1>Bad Request (Invalid Verb)</h1>.
Can anyone point me in the direction of simple examples of how I should be doing this? I have assumed I'm doing the POST wrong somehow, but I guess it could be the IIS settings?
|
|
|
|
|
Are you including appropriate HTTP headers?
|
|
|
|
|
Sorry - should have given an example of code...
POST /TestWebService/TestService.asmx HTTP/1.1
Host: www.mysite.com:80
Content-Type: text/xml; charset=utf-8
Content-Length: 115
SOAPAction: "http://www.mysite.com/TestMethod"
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><TestMethod xmlns="http://www.mysite.com/"><DataBurst>Testing via hyperterminal</DataBurst></TestMethod></soap:Body></soap:Envelope>
|
|
|
|
|
I'm suspicious of your Content-Length. I believe SOAP won't see anything past the 115th character of your request, which is a lot less than all of it.
|
|
|
|
|
I want to find whether user selected any checkbox or not. these CheckBoxes are in Repeater.
|
|
|
|
|
Set the name of the checkbox and then you can use a dom method to select all checkboxes by name.
I believe the js method is document.getElementsByName
Need software developed? Offering C# development all over the United States, ERL GLOBAL, Inc is the only call you will have to make.
Happiness in intelligent people is the rarest thing I know. -- Ernest Hemingway
Most of this sig is for Google, not ego.
|
|
|
|
|
Hi.
In my .Net app.(ASP.NET with VB) i connect to a photo camera using the WIA Service. This works fine.
I enabled the WIA service and I dedicated access to the Network Service group to the component.
I can take a picture, but when i try to fetch/get the picture, I get the message : "Value does not fall within the expected range". When I try Windows 2003 Server's own Scanner and camera wizard, I get the message: "The parameter is incorrect".
Any suggestion to my problem?
Wandera
|
|
|
|
|
Hi
I need to implement drag and drop across frames and I tried using the latest Drag And Drop event handlers (in Firefox 3):
ondrag, ondragstart, ondragenter, ondragover etc. but nothing works.
My code is simple one:
<div id="Top" ondragstart="alert('Drag Started');">
<img src="images/small_0.jpg" />
</div>
This code should give an alert when one tries to drag the image. But absolutely nothing happens!
The example given on http://developer.mozilla.org/en/Drag_and_drop_events also doesn't seem to work. (The image never gets dragged anywhere!)
On this page: http://developer.mozilla.org/en/Drag_and_Drop the documentation says that ondragstart "is the HTML 5 spec name for the event and may be used in HTML or XUL handlers will work for both HTML and XUL."
The documentation says: "There are two ways that drag and drop events can be handled. This first involves using the drag and drop XPCOM interfaces directly. The second is to use a JavaScript wrapper object that handles some of this for you."
I am very confused with this. Can someone please tell me how to do drag and drop using these event handlers?
Any pointers/examples will help.
Thanks
Asty
Let's think over it!
|
|
|
|
|
The code snippet above is:
<code>
<div id="Top" ondragstart="alert('Drag Started');">
<img src="images/small_0.jpg"/>
</div></code>
I don't know why it was parsed despite closing it in code block!
Thanks.
Let's think over it!
|
|
|
|
|
Hi
I am not sure of the right terminology but here goes. (I am fairly new to this any help will be appreciated)
I am trying to take data and assign it a new string name each time a new row has been through the loop. This is in asp classic.
rs1.Open "Select * from email where deleted = 0;", connStr1, 3 , 4
startbody = rs1("body")
rs1.MoveNext
rs1.Close
Set rs1 = Nothing
for each record that comes out I need a new sting name
example
startbody1 = rs1("body") (first record returned)
startbody2 = rs1("body") (second record returned) etc.
Also rs1("body") is a large amount of html text.
|
|
|
|