reg ex help
I want a regular expression such that it will not allow " and ' in a text.
User Profile
Collapse
-
problem with closing the child window
The onUnload event is not triggered when the child window is closed using the 'X' button on the right hand top corner of the window. The onUnload works fine when the window is closed with the help of any link inside the window.
How do we overcome this problem. -
converting a string to regular expression
I have to generate a regular expression dynamically to check the file extensions. The file extension types are stored in a model data which are are to be fetched in form of a string and set into an hidden variable.
<input type="hidden" id="extension" value="exe|doc" >
In javascript it is used as
var ext = document.getEle mentById("exten sion").value;
var regEx = /^.+\.(ext)$/i;... -
setting the value of a file object
I have a control on me screen of type <FILE>. I want to set some value to that object from the database. I tried the following code using html.
[HTML]<html >
<head>
<script type="text/javascript">
function fun()
{
document.getEle mentById('j').v alue="hi"
alert(document. getElementById( 'j').value);
}
</script>... -
Passwords are case sensitive. So 'A' and 'a' are different. So in your code if I enter 'PASSWORD' or 'password' your code will validate both the values. If we can have a regular expression than this validation will be easier..
Anyway thanks for your help!!!Leave a comment:
-
-
I just want the regular expression satisfying the first two conditions.
The third one I can manage.Leave a comment:
-
CSS and Firefox
I'm using the following code inside the <head> tag of the HTML page.
<link href="css/pagetemplate.cs s" rel="stylesheet " type="text/css" title="PGApp Stylesheet">
The stylesheet is getting loaded properly in both IE and Firefox when the page has .html extension. If I'm converting the files to .jsp, the stylesheets the not getting loaded while running the .jsp in Firefox.... -
restrict the size of the document
I'm using a file type control (<input type="file">) to browse the document and store in the database. I wanted to know...
1) how to check if the size of the file to be uploaded is less than certain size say 1GB.
2) To ensure that only certain formats are allowed to enter into database.
How to perform these validations on the client side using javascript.
Any help will be really appreciated.... -
-
Wrapping of text in textarea
When I'm entering the textarea the control automatically goes to to next line as it reaches the end of the row.This happens in IE but it fails to wrap to next line in Firefox. In Firefox the text continues to be entered in the same row and a horizontal scroll bar is introduced when the text reaches the end of the columns.
The code I have used is
<textarea name="ms_answer 2" id="ms_answer2 " cols=110 rows=4... -
Password validation
How to test that the password should satisfy the following condition
1) It should be atleast 6 char long
2) It should contain alphanumeric values with atleast 1 character and number.
3) It should not contain any repeated consecutive characters.
Any help on this is really appreciated. Thanks in advance. -
I'll get the value of a string from the HTML page's Textbox into javascript and convert it to an array. So my doubt is how to convwert a string of length 14 characters into an array of characters.Leave a comment:
-
max Limit on textarea
How to put a max limit in the amount of characters entered into the textarea? I tried with MAXLENGTH attribute, but it didnot work.
Any help will be rally appreciated.
Thanks in advance. -
To convert a string to array
How to convert a sting of 14 charctres to an array?
Any help will be appreciated.
No activity results to display
Show More
Leave a comment: