Prevent User From Entering Mistakes
Jul 3, 2009
<script type = "text/javascript">
function testfield() {
var un = document.getElementById("dir").value;
if (!/^(/ftp/nas)/i.test(un)) {
alert ("Invalid starting characters - must be /ftp/nas");
return false;
[Code]...
I have a code like above which doesn't allow the user to proceed with out starting the field with a "/ftp/nas" which should be the starting of a path. Is there any way to make it disabled and the user only can enter the rest of the path. for eg: user1 has directory path like /ftp/nas/user1/help
so when this user enters his path, on the field "/ftp/nas" should always be available and the user has to only enter the rest of the path. and the user is allowed to enter only / (// is not allowed) and [A-Za-z] in the field. this is just to secure the application from typing mistakes.
View 3 Replies
ADVERTISEMENT
Jun 15, 2010
I have a text area, I want that user's should not be able to enter a charaters in it. I want them to enter only numbers.I have written the code below to do this but it is not working as I think I am not calling the function right way.I am open to new suggestions as well, if I can show some alert to user if they enter character rather than no.
View 2 Replies
View Related
Jul 23, 2005
I'm desinging a graphical interface and I frequently take advantage of the double click event. Unfortunately in most browsers double clicking also involves selecting and I would like to avoid that since whatever is selected has dark blue background and white letters what spoils the whole visual effect.... Any way I can block it por avoid it?
View 3 Replies
View Related
Dec 12, 2010
I own a game site and some users cheat by changing the browser URL. For example :
The URL for starting a game mission is this : ww.somesite.com/somethingaspx?htxm=18
And if they change the number to 87 they go to the end of he mission WITHOUT actually completing it.
They ONLY way to deal with this is by preventing users from changing the URL manually. Is there a way to do it? Like, if someone tries to change that number in the URL he gets a message and browser window closed(or something that will prevent him from going to that page)
Of course, the solution must not conflict with the normal navigation(which is the actual mission) which means the user should be able to navigate to different pages but NOT change the URL manually.
View 10 Replies
View Related
May 22, 2011
I wish for my users to retype their email address instead of the copy and paste method to ensure they have typed it correctly both times.
How could this be done, would it be Javascript ?
View 6 Replies
View Related
Sep 13, 2011
Is there js to prevent malicious clickers who try to ban my site from google ads by clicking so many times?
View 2 Replies
View Related
Jun 30, 2009
i have a form being filled. i don't want the user to be able to submit twice. how can i either prevent the user from going back or disable the submit button?
i am currently disabling the submit button but when the user clicks back(from the next page) it asks whether it should resend data. when the data is resent it loads the original version of the page(without submit disabled).
View 9 Replies
View Related
Jul 2, 2009
is there a way to prevent user from adding more characters into a text input based on a validation rule(eg. you entered more than n words, you can't enter more, but you can delete or edit)? I think I'll have to programmatically delete the extra letter(s) that user just input somehow if the addition causes a violation of the rule, is this the best way?
View 2 Replies
View Related
May 29, 2011
I'm trying to set a cookie when a user clicks a hyper link.
Do you think I should prevent the default behavior of pressing a link first, and then set the cookie?
Or could I just set the cookie on a hyper link click event, and hope the client sets the cookie, before they are directed to another page.
View 3 Replies
View Related
Oct 12, 2009
I am using jQuery and blockUI to prevent the user from submitting a form twice by double clicking on the interface: This is in my global js file and is called on every pages
document.ready:
$('form').submit(function(){$.blockUI({message:'', overlayCSS:
{opacity:0.2}})});
This was working really well, but if I have validation on one of the form submits that returns false, I of course want to unblock the UI.
View 1 Replies
View Related
Aug 10, 2011
I am looking for a TimePicker that will prevent users form selecting times that have already passed, is this possible?
View 4 Replies
View Related
Sep 26, 2011
I have PHP form application used to by Sales reps to Enter information about customers but I want to prevent Sales reps from entering same information because of web form behavior after they want to add new customer ? is their away in using Jquery to clear the form for new entry ??
View 3 Replies
View Related
Jul 23, 2005
We're in the process of re-writing the Intranet at work, and my javascript
knowledge could be written on the back of a post card. ;-)
Can any of you point me in the direction of some code that would enable a
form to open a specific pdf file? Details are below.
--------------------
All of our purchase orders are saved back to pdf files. Each pdf has the
prefix "PO_" followed by the po reference, then the file extension ".pdf".
For example, our file would be called "PO_12345M.pdf".
Each set of files is archived into years (folders are called 2003, 2004,
2005 etc.) so it will probably need a drop down box to select year, unless
it can search through all the folders.
The visitor should only need to enter the PO reference, and the code puts
the "PO_" and the ".pdf" on the end of it, and hey presto Acrobat opens with
the PO, or you get an error dialog if the file cannot be found.
--------------------
View 2 Replies
View Related
Jul 20, 2005
I keep getting a runtime error stating that this
document.adddealer.dealertoadd.value = dealer; is null or not an
object. I've rewritten the Function everyway I could think of, and
couldn't find any thread examples of my problem.
Here is my Function;
<Script language="JavaScript">
<!--//hide
function AddDealer(dealer) {
document.adddealer.dealertoadd.value = dealer;
document.adddealer.submit();
}
//-->
</script>
This calls the Function;
<input type="button" value="Make This My Dealer"
name="button">
When the code breaks and I bring up Microsoft Debugger it shows a
value in the parameter.
View 6 Replies
View Related
May 16, 2010
My program should display '*' when entering a password to a text box by a user. How to do that?
View 4 Replies
View Related
Oct 29, 2004
<form action="action.htm" method="post" >
<input name="title">
<input type="submit" value=" post ">
</form>
I have the above form code. I like to make users not to enter two words, for example "FK" and "ST."
View 3 Replies
View Related
Sep 3, 2010
i got the html page from [URL]... i want to add a text box and to enter a number so that the entered number's image will be dispalyed in the div
View 4 Replies
View Related
Jan 7, 2010
I'm wanting to create a pop-up window that shows upon entering on the website with two buttons that have different functions.
I'm wanting the first button, when clicked, stops the message from appearing again.
-Similar to the "do not show again" option that uses cookies from this thread.. [URL] the second button, when clicked, redirects the user to a URL
Is it as simple as using the code from the thread above and some simple javascript buttons?
View 2 Replies
View Related
Aug 29, 2009
I am just wondering if someone can tell me what this message means, even roughly. The following is the error message box that pops up when I try to access/open a yahoo email account. The error (in english) is followed with some script referred to. I am very "curious" what this is. ANY suggestions welcome.
View 1 Replies
View Related
Jul 20, 2005
I have a text area and I want prevent people from entering HTML text in the text area....
View 3 Replies
View Related
Jun 18, 2010
I'm interested in learning how to do this. What I'm doing is I'm making a social networking site linked to a game called Habbo, and for the registration page, once they put in their Habbo Username, I want to be able to load the image next to it. [URL]...
That is the link to the image. So basically, once they enter a value into the textbox, I want to be able to use that value to replace the [TEXTBOX.DATA] part from the above link and use that as an image.
View 5 Replies
View Related
Jan 22, 2011
I need to check form field contains existing data(want to check database) are not. if that field contain existing data it wants give alert.., In database i set projectcode as Unique.if 1st user giving projectcode as 1 it wants to store. if 2nd user giving the same projectcode it want's to throw alert msg.., But i need to learn step by Step. So i created Form with one Field(ProjectCode).In database i set ProjectCode as unique.
[Code]...
View 5 Replies
View Related
Dec 29, 2010
I have the following code that i am using to try and prevent users from entering non-numeric characters but it doesn't seem to work:
PHP Code:
function validate_onkeypress() {
a = String.fromCharCode(event.keyCode);
b = a.charCodeAt(0);
if (!validateString(b)) return false;
[Code]...
View 6 Replies
View Related
Jul 15, 2010
Basically, the script is an onMouseover slideshow which works fine. The problem is that in internet explorer, it says there is a syntax error relating to the javascript code. (this doesn't appear on chrome or firefox) here is the code:
Code:
<script>
<script language="JavaScript1.1">
var myimages=new Array()
var gotolink="#"
</script>
basically, by putting the script language here, IE8 is saying there is a syntax error! removing it stops the error but stops the script from working. What can I do here? If I put it in an external .js file instead (right now it is in the head of the HTML page) will this solve the problem?
View 1 Replies
View Related
May 6, 2011
I downloaded a calendar script that allows a user to just click on the date and have it populate the form input field- the problem is it lets you enter dates previous to today. I would like it so it could not enter any dates less than today.
Problem is, I know nothing about javascript. I am less than a noobie.
Would some kind soul have a look and see if it would be possible to do and show me what to do.
The code is below. There is also a css file which I did not include.
Code:
function positionInfo(object) {
var p_elm = object;
this.getElementLeft = getElementLeft;
function getElementLeft() {
[Code].....
View 3 Replies
View Related
Sep 30, 2011
I had a requirement in javascript.If I enter time as 12 it should automatically insert colon after hours and shoud allow user to enter minutes. First enter hours 12 while we are ready to insert minutes it should automatically insert colon as well as minutes.
function autoTabTimes(input, len) {
if (input.value.length == 2) {
if (input.value.indexOf(":") == -1) {
input.value = input.value + ":";
} var str = input.value.split(":");
if (str[0].length == 1) {
input.value = "0" + str[0];
}}
if (input.value.length >= len) {
input.value = input.value.slice(0, len);
input.form[(getIndex(input) + 1)].focus();
} return true;
}
The above code is working but it is not allowing user to edit the time back space is not working.
View 1 Replies
View Related