Code To Disallow Changing Values?
Jun 9, 2010
i want to disallow users to change a text input values . I don't want to use disabled tag of text input because of some problem . I just want to disallow users to enter or change a text input value .
View 4 Replies
ADVERTISEMENT
Jan 12, 2011
I currently have a normal link like Code:<a href="http://sitepoint.com" class="link">sitepoint</a> and when a user clicks on it I want to be able to change the "link" class to a different class. However, I don't want to add anything to the actual link html. Is it possible to do this using javascript without modifying the original link code?
View 4 Replies
View Related
Sep 24, 2010
Just wondering if anyone knew how to make it so that if someone types an apostrophe in a form's textbox, a popup box appears. The popup box would preferably appear the second that the apostrophe is entered int he form box and then once the popup box is closed, the apostrophe is deleted.
View 2 Replies
View Related
Jan 13, 2009
Im trying to change the values of some row values. The rows are created dinamically. So my solution for writing in those rows was:
Code:
document.form1.elements['info_concepto'+''+fila].value=mytool_array[0]+","+mytool_array[1]+","+mytool_array[2]+","+
mytool_array[3]+","+baseimp_concepto+","+mytool_array[5]+","+IVA_concepto+","+mytool_array[7]; // substituya en el textfield
The textobox is declared as
Code:
<input type="text" name="info_concepto" id="info_concepto${i}" value="${fila.idConcepto_facturar},${fila.descripcion_Concepto},${fila.cantidad_Concepto},${fila.tarifa_Con cepto},${fila.baseimponible_Concepto},${fila.IVA_BD},${fila.IVA_Concepto},${fila.preciototal_Concept o}">
Where fila and i are the number of the row calling the function.But it dosent change.
View 1 Replies
View Related
Aug 5, 2009
I am having an issue reading from a div that is being changed. The div in question was initially empty. A function that was called upon the selection of something in the drop down list creates another drop down list within that div (sets the inner html). Now, I have another function that needs to read from this new drop down list. However, when I use alert(document.getelementbyid('divid').innerhtml) in the function it returns undefined. The drop down list is created successfully and populated by the relevant data. The method of creation was calling another php file that created the list after querying a database.
View 3 Replies
View Related
Jan 5, 2006
This is some free code includeing with dreamweaver, What it does is check if flash player is installed. If it is installed then goto a url, if its not goto a differnt url. What I want to do, is change it from URL to variables so, instead of like test.asp?flash=true, I would like <%flash=true%>.
Heres the code, with an onload function.
function MM_checkPlugin(plgIn, theURL, altURL, autoGo) { //v4.0
var ok=false; document.MM_returnValue = false;
with (navigator) if (appName.indexOf('Microsoft')==-1 || (plugins && plugins.length)) {
ok=(plugins && plugins[plgIn]);
} else if (appVersion.indexOf(Ɖ.1')==-1) { //not Netscape or Win3.1
if (plgIn.indexOf("Flash")!=-1 && window.MM_flash!=null) ok=window.MM_flash;
else if (plgIn.indexOf("Director")!=-1 && window.MM_dir!=null) ok=window.MM_dir;
else ok=autoGo; }
if (!ok) theURL=altURL; if (theURL) window.location=theURL;
}
OnLoad event
Where it says Variable/URL is where I would normaly put the url, first one is if its found, second one is not found.
<body onLoad=";MM_checkPlugin('Shockwave Flash',Variable/URL,'Variable/URL,'true);return document.MM_returnValue">
View 1 Replies
View Related
Feb 24, 2009
I'm a beginner with this stuff, so I'm not sure what sort of code I should use.
Basically I want users to put in words and every time "x" letter goes in, I want it to turn into "y" when they hit a button.
I think arrays would be a good way to go, but I'm not quite sure how I'm going to make it translate S:
View 1 Replies
View Related
Aug 25, 2003
I have the following code in a popup window.
Code:
<td bgcolor="#000000" onClick="javascript:setRGB(0, 0, 0);" class="swatch"></td>
<td bgcolor="#000033" onClick="javascript:setRGB(0, 0, 51);" class="swatch"></td>
<td bgcolor="#000066" onClick="javascript:setRGB(0, 0, 102);" class="swatch"></td>
What I want to do is to define the setRGB function so that when I click on a color swatch (onClick) it updates 3 fields in a form in the window that opened the popup with the corresponding RGB values. So let's say that in the window that opened the popup i have a form 'formname' with three text fields named 'red', 'green' and 'blue'.
View 2 Replies
View Related
Dec 30, 2011
I'm have a Joomla component who use Jquery for several thing in his template. This component have a form where some field are displayed and I would like conditionnaly restrict the use of 2 fields. I have in fact a field "City" and a field "Zip code" and my goal is to disable one field if the other is filled. In practice that mean if a user start to type the name of a city, the zip field must be disabled for avoid to fill also this field. Same thing if the user start to type in the zip field...the field City must be disabled too..
I need to setup this because the search engine of my component can not retreive correctly data if both field are filled. This happen tipically if the the zip code don't match with the name of the city... I that case the component will display "no result found" and this is annoying. Any example of working code making possible to get this function? Unfortunately I'm not a coder and except html and a bit of css, I do not have enough knowledge..
View 1 Replies
View Related
Aug 30, 2010
i have a html/php form which let users upload pictures onto my server. the problem with it is, it says the picture has been uploaded but if the file name contains any of character apart from text (A-z) and numbers, the picture never shows up in the admin panel.
is there a way using ajax or jquery to disallow certain file names in the upload field of the html which uses these characters !@#$%^'&*()"?
how do i go on about this?
View 12 Replies
View Related
Nov 1, 2011
I came up with this but it's not working and I'm not exactly sure why.
<script type="text/javascript">
function date_check(){
var trans_date = document.form1.selectmonth.value + "-" + document.form1.selectday.value + "-" + document.form1.selectyear.value;
var d = new Date();
var today = (d.getMonth()+1) + "-" + d.getDate() + "-" + d.getFullYear();
if(new Date(trans_date) < new Date(today)){
window.alert("The shipping date cannot be in the past, please enter a valid shipping date.");
return false; .....
View 14 Replies
View Related
Mar 31, 2005
I want to redirect my user to an alternate page if javascript is disallowed on their browser. Is there a way to do this ?
View 3 Replies
View Related
Sep 17, 2009
I need to write to table cells in a given column. To illustrate:
<table id="tableName">
<tr>
<td id="col1">some value</td>
[code]....
View 1 Replies
View Related
Nov 15, 2010
I have a button that needs to increase/decrease the value of a text field when clicked. This code is working in Internet Explorer and Chrome, but not Firefox.
Code:
<a onClick="scorebox1 = parseFloat(score1.value); score1.value = scorebox1 - myscore; scorebox1 -= myscore;"><img src="images/minus.png" alt="Subtract Point" border="0" /></a>
<input size="2" name="score1" style="font-size:24px; width:50px; text-align:center; color:#FF0000;" id="score1" value="0" />
[Code]....
View 4 Replies
View Related
Oct 14, 2011
How can I dynamically change the color of values on a page, to show if they are above or below a target value entered in a text box on the page. Those below should be shown in green, those above in red, and identical (equal) should be in amber. Values can be put in a particular tag and then use the getElementsByTagName.
View 3 Replies
View Related
Jul 17, 2008
I was trying to find a browser independent way to raise a modal dialog. I know that MS IE has showModalDialog and Firefox has an attribute modal for window.open but I was wondering if anyone knew of a solution out there that would disallow anyone to browse from a pop-up window without closing it. Disabling the text highlighting and right click are not required, just disabling the user from browsing with the dialog open.
View 4 Replies
View Related
Jul 24, 2011
Ok, so i need help writing a java script that will look at a bunch of numbers and output the highest one so what i need is for it to do something like this.
(A is my input value)
(B is my output value)
the (A) value will be constantly changing and with the script has to do is look at all of those values and output them to (b).
View 11 Replies
View Related
Sep 17, 2009
I need a java script code tat changes the mouse pointer to an image of my choice when a button or an image is clicked ..
View 7 Replies
View Related
Jun 6, 2009
I'm working on an ordering form which calculates the total order price using Javascript. I have a checkbox which I want to use to toggle the display of various items, and also reset the value of an item depending on whether or not it is checked.
Further details
I have a checkbox for the colour "Black" which, when checked, hides a SELECT, a bit of text, and "Quantity" field. It also resets the value of the "Quantity" field to zero.
When the "Black" checkbox is unchecked, the three items (SELECT, text and Quantity) are revealed again, and the Quantity field for "Black" is reset to zero and hidden.
The reason is that users can only either EITHER a black item or select from a list of colours. Black items are a different price to all others.
How the form works
When the user enters a quantity into a text field for each item, the price of that item is added to the total at the bottom of the form. When the form is submitted (with PHP validation), it emails the order to a salesperson. The price of each item (for emailing the order) is set using hidden form fields with defined values, while the order total is calculated using the id of each quantity field (e.g. "item_31_85.00").
What I need to know
I want to achieve the following when the "Black" checkbox is clicked:
Toggle the display of three items (SELECT field, text (in a DIV) and an INPUT)
Reset the value of the INPUT field (and reset a different INPUT when the checkbox is clicked again)
My current code
The code I'm currently using in the PHP form is below (truncated for readability):
Code:
<input type="checkbox" name="black" onclick="togglecontent('colour_box','colour_price','color_quantity','quantity_reset')" /> Black
[Code].....
Currently I can hide the SELECT and accompanying text when I check the "Black" checkbox, but it won't reset the INPUT value nor hide it. I've not yet attempted to do unhide and hide the Black text and input since I can't get this part working yet.
View 14 Replies
View Related
Nov 2, 2011
I've been trying to do this since yesterday with no luck. I've tried stackoverflow, DIC and this is my last chance. I'm using drop down boxes to have a user select a ship date. I don't want them to be able to choose a date in the past however. Below is some code a guy at DIC sent me which doesn't have many changes from my original one but he said it was working and I havent been able to get it working.
<html>
<head>
<script type="text/javascript">
function date_check()
[Code]....
View 7 Replies
View Related
Mar 31, 2011
[code]....We have a set list of shows that air each day, and on the site we have a marquee tag on the homepage that scrolls through showing each show and its broadcast time. Right now we're stuck changing this schedule each day by hand, but it's tough considering we're all college students ourselves and sometimes our own schedules simply don't allow the time.Is there a code that would allow this kind of a daily update to happen automatically?
The format for the schedule is such:
4 - 5 pm // "Show 01"
5 - 6 pm // "Show 02"
6 - 8 pm // "Show 03"
[code]....
View 7 Replies
View Related
Apr 5, 2011
I'm just starting out in Javascript coding and my first assignment is to create a web page which the users are allowed to selecte dtheir favorite layout and formatting through the use of the className property. I wanted to use these four options the user can choose to change the display of the web page and text.
Gray background
White background
Sans-serif text
Serif text
If the user onclicks any of the options, the webpage will turn into that format. For example, if the user clicks "Gray backgound", the background color of the webpage will be Gray. If the user clicks Serif-text, the text in the web page will be in Serif text. The code I have right now doesn't let me click any of the links to change the display and text.
<?xml version = "1.0" encoding = "utf-8"?>
<!DOCTYPE html PUBLIC "-W3CDTD XHTML 1.0 StrictEN"
"http:www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">[code]...
View 2 Replies
View Related
Jan 17, 2010
I use jQueryUI's tabs and when a user changes a form in the tab, it promprts the user that a change has been made. My question is, how do I revert the values before being changed when the user presses 'OK' on my confirm() prompt?
View 1 Replies
View Related
Sep 16, 2009
I made a table that retrieves some Data from the Database also I did some calculations for this data using Javascript and It works fine , but I can't see the calculated values in the source code. That's the Problem , cause I can't print it or export it without these values and the source code doesnt show it. So , what can I do , to view the generated values from JS in the source code? I'm using IE 6 only as a web browser and the Javascript Calculations are functions and Classes in a seperated file and I linked it to the Report page ...
View 2 Replies
View Related
Dec 12, 2009
I'm a neophyte to Javascript, but I need it to dynamically add lines to a form. I was able to cobble together this inelegant looking code below. It adds the row when called, but there are more attributes needed for this to be correct for the application. 1) need to center the input in the TD 2)the input tags need type, size, maxsize, and value attributes added I have not been able to figure out the correct way to do this.
Also, is there a way for the value attribute to work with a PHP echo, or is there a Javascript method to display associative array values?
[Code]...
BTW is there an good online tutorial and/or reference for javascript or book(s) that you could recommend?
View 2 Replies
View Related
Sep 21, 2010
I want to add the values of several variables in one variable and then use this variable, which contains the values of variables
You can see the following example
HTML Code
Javascript Code
After executing this code I find that the variables are not displayed values
As in the following picture: [url]
View 2 Replies
View Related