|
sajan ss wrote: if (charCode > 31 && (charCode < 48 || charCode > 57))
Try to think this code through, for a value of 32. Both tests actually succeed, and so you'll get your alert ( what a pain, I'd suggest removing it ).
Try this:
function checkIt(event)
{
var charCode = (event.which) ? event.which : event.keyCode;
return (charCode == 32 || charCode == 13 || (charCode >= 48 && charCode <= 57));
}
I assume if you want the alert still, you can rework this code accordingly.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
This code works fine...but when i am entering some text in the desired textbox and hitting enter then the page posts itself and return error...
You checked the value of enter key in the function then how can this go wrong...
when i press enter key the control should be in the same textbox...
but it is not working ..other key works fine...
thanks for the reply...
SAJAN A PILLAI
C#.NET Programmer
TELESOFT INDIA PVT LTD...
BANGALORE
"Winners don't do different things. They do things differently. ...
|
|
|
|
|
OK, you didn't say that.
You need to make sure there's no default button, so that enter does not cause postback. Your code also is not going to 'work fine'. It will work fine so long as you don't press any other key that has a value between 32 and 46, or whatever it was. The implimentation is plainly flawed, even if you've failed to notice.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Thanks ....Sorry for not saying that then...
How can I remove the Default add button property....
so that even if i press enter it should be in the text field....
SAJAN A PILLAI
C#.NET Programmer
TELESOFT INDIA PVT LTD...
BANGALORE
"Winners don't do different things. They do things differently. ...
|
|
|
|
|
Here[^]
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
please i need to upload image to my website. so it will be an option that allow users to upload images to the web page
thanks in advance
bachir
|
|
|
|
|
please i need to upload image to my website.
ok.
so it will be an option that allow users to upload images to the web page
description of what u want done.
Lastly, where is your question? Be specific.
---------------------------
Both optimists and pessimists are important in technology. The optimist invented the aeroplane; the pessimist invented the parachute.
Regards,
Hesbon Ongira
Nairobi, Kenya.
|
|
|
|
|
I use this PHP class for image manipulation on the server.
www.verot.net[^]
Here is some sample HTML to get the files to the server.
<br />
<fieldset><br />
<legend>Image upload</legend><br />
<p>Pick up an image to upload, and press 'upload' </p><br />
<form name="logo_form" enctype="multipart/form-data" method="post" action="logo.php" /><br />
<p><input type="file" size="32" name="my_field" value="" /></p><br />
<p class="button"><input type="hidden" name="action" value="image" /><br />
<input type="submit" name="Submit" value="upload" /></p><br />
</form><br />
</fieldset><br />
|
|
|
|
|
Try this
Image Upload
1) Find name of image
Img1=doc_file.FileName.ToString.Trim()
2) Replace blank space with “_”
Img1=Img1.Replace(“ ”,”_”)
3) Use Substring
Img1=img1.Substring(img1.LastIndexOf("\") + 1, img1.Length - img1.LastIndexOf("\") - 1)
4) Find Extension
ext1 = doc_file.FileName
5) ext1 = ext1.Substring(ext1.LastIndexOf(".") + 1)
6)Check if ext is blank or not.if not then concatenate ext with “.”
If Trim(ext1) = "" Then
ext1 = ""
Else
ext1 = "." & ext1
End If
7)Send ImageName as blank in database
8)Take new String variable
9)ImageNew=”image_” & ret.tostring & ext1
10)Check if ext1 not equal to blank
ImageNew=”image_” & ret.tostring & ext1
Then use update command
update tblImages set ImageName='" & sImg_name_new & "' where ImageId =" & ret
11)Then use Upload Function
|
|
|
|
|
Hi all,
How can i create "Drag and Drop Lightbox Pane" like website http://www.photos.com
Please help me soon, because i want to drag and drop my photos to lightbox like www.photos.com website.
Thanks,
Hy ChanHan
-- modified at 5:36 Friday 28th September, 2007
|
|
|
|
|
Does anyone know how to call a function in a VB.NET DLL from Java script code?
I'm Using like this in my .aspx page it gives error like this
"Automation server can't create Object""
how can i resolve this error
try
{
var objCom=new ActiveXObject("comMath.clsAdd");
alert(objCom.addition(3,4));
}
catch(err)
{
document.write(err.description)
}
|
|
|
|
|
Is your VB.NET dll a COM dll ? Do you realise that this will only work if you deploy your DLL to all the machines that access your site ?
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hello friends,I upload my site on server but got the following error. What it means? I publish the site to '/test'folder on server ..Can u help me plzzz..
Server Error in '/' Application.
Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.
Parser Error Message: Could not load the assembly 'App_Web_nu4dn8zr'. Make sure that it is compiled before accessing the page.
Source Error:
Line 1: <%@ page language="C#" autoeventwireup="true" inherits="Webmaster_AdminLogin, App_Web_nu4dn8zr" debug="true" %>
Line 2:
Line 3:
Source File: /test/webmaster/adminlogin.aspx Line: 1
Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.210
|
|
|
|
|
Please don't cross post.
---
single minded; short sighted; long gone;
|
|
|
|
|
|
What is the difference between Object Oriented and Simple Programming? Explain in detail? Thank U.
Muhammad Ilyas
|
|
|
|
|
Have you looked on Google?
|
|
|
|
|
ilovepakistan wrote: What is the difference between Object Oriented and Simple Programming? Explain in detail?
Time Allowed: ??
________________________________
Success is not something to wait for, its something to work for.
|
|
|
|
|
ilovepakistan wrote: What is the difference between Object Oriented and Simple Programming?
Roughly speeking, Simple Programming can be divided into Procedural Programming and Structured Programming
Hope! this article[^] may answer your question in detail.
Along with Books, Other printed reading materials, and Practice (in practical area), the online repository is also become a very valueable asset. An efficient search engine, like Google[^] can be helpful in searching your interests in the repository. So, make friendship with Google (etc), you will get alot of benifit.
Regards
________________________________
Success is not something to wait for, its something to work for.
|
|
|
|
|
The difference is that if you can't be arsed going to look for the information on your own, you'd be better sticking to simple programming...
|
|
|
|
|
Since I can tell you need this for your homework the difference is....... Oh no wait I couldnt be bothered explaining like you couldnt be bothered looking for an answer.
Dan
|
|
|
|
|
I realize this might not be the right forum to ask this but where on Earth could I find some statistics on server-side scripting technologies (i.e. in percentages how popular (used most) was asp.net, php, coldfusion, jsp etc last year) ?
Best wished, Desmonnd
|
|
|
|
|
try google [the verb]!
---------------------------
Both optimists and pessimists are important in technology. The optimist invented the aeroplane; the pessimist invented the parachute.
Regards,
Hesbon Ongira
Nairobi, Kenya.
|
|
|
|
|
I did but it didn't result anything useful
|
|
|
|
|
I know we are in the .net world. I just inherited an asp project. We are in the process of moving to asp.net, but it will take time.
In a meanwhile, I want to setup the release process as smooth as possible. Is there a tool that can compare my development code against the staging or production. It will be great if it does visual compare display and allow to push selected files, as compared to full blown push. something like a differential deploy.
I Google'ed for asp deployment and the only good one I came across is zbit's asp deploy. The demo on the website looks fair. Has any one used it? any recommendations.
Thanks for your help.
/* I can C */
// or !C
Yusuf
|
|
|
|