File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes Javascript Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Java in General
Reply locked New topic
Author

Javascript

monika chaturvedi
Greenhorn

Joined: Jan 01, 2009
Posts: 5
hello ,i am using javascript in cgi-perl for popup alert and now in pop alert i am doing number checking for user input using regular expression ,
i am try to do this thing by two ways but still is not working .please help me out.
function numcheck()
{
var myForm = document.add_quiz;
var message = '';
var num=/^[0-9]+$/;

if(myForm.marks.value.match(myForm.marks.value.num)) or if(myForm.marks.value != myForm.marks.value.num)
{
alert('Please enter digit');
return(false);
}
else
{
return(true);
}
}
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 35237
    
    7
What does "it isn't working" mean? What exactly happens when the code runs? If you run it in Firefox, are there any messages in the Error Console?


Android appsImageJ pluginsJava web charts
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 35237
    
    7
Please do not post the same question to multiple forums: CarefullyChooseOneForum

Let's continue the discussion in this duplicate thread in the HTML/JavaScript forum, where it's a better fit.
 
I agree. Here's the link: http://zeroturnaround.com/jrebel/download
 
subject: Javascript
 
Similar Threads
to get the key pressed 2
ArrayList in javascript
slection of radio button
Problem in using javascript in cgi-perl
check employeeId field is of 8 characters only?