Drop Down Limit?
Jun 5, 2006I have a form with seven drop down boxes, and I would like to limit the
number used at any one time to one. I've seen this done with check
boxes, but I'm unsure about the syntax, etc., involved with dropdowns.
I have a form with seven drop down boxes, and I would like to limit the
number used at any one time to one. I've seen this done with check
boxes, but I'm unsure about the syntax, etc., involved with dropdowns.
i have a drop down menu which show years. When u click on the arrow it shows big list (on the page whole page) and i can see rest with the scroll bar. I want the drop down menu to display only ten items (i don't want it to be very long) and rest can be seen by scrolling the bar. Code:
View 2 Replies View Relatedi'm having a hard time on JS while i was designing my companies web page. it is running on wordpress, we choose and start correcting a template, then i stuck in the main menu navigation.
Code:
sfHover = function() {
if (!document.getElementsByTagName) return false;
var sfEls = document.getElementById("nav-ie").getElementsByTagName("li");
// if you only have one main menu - delete the line below //
[Code]....
I have a page that displays a list of people playing in a tournament. I need to be able to generate a Leaderboard based on which players are manually selected by the admin. Next to each person there is a drop-down list. An admin can go in and select a "slot" that a player should be in on the leader board from 1 to 8, or leave it blank if none. What I need to figure out how to do is the following, when a change event happens on a drop-down list, and say the value 5 is selected, I need to check to make sure that 5 is not already selected in one of the other players drop-down lists, in other words, that the 5th leaderboard slot is not already full. if it is, display an error message and make them change that one first. how to do that with jQuery? I'm thinking it will have something to do with the each() function, but not sure exactly how the logic should work.
View 4 Replies View Relatedi dont want my visitor to see pop up more than one time in 24 hours period
View 2 Replies View RelatedI want to create a UL that has a certain amount of LI elements, but instead of showing every LI element, I want to either display 5 of them or whatever the containing DIV will allow just before activating the "overflow or scroll".
So in other words, let's say I have a div with a height of about 300px. If the UL generates a few list items, in turn, creating a UL that supersedes this height value, a scroll bar will be generated (depending, of course, on how the CSS and whatnot is written). So, what I would like to do is generate a "Read More" link at the bottom of the UL and display only whatever number of list items it can take that will fit appropriately within the DIV element.
It was my understanding that things like this are usually done with JavaScript because I can't see how PHP would govern the height of an element unless you somehow replaced the height attribute of the CSS with some sort of PHP variable (which would mean I would have to change the CSS extension and do a bunch of stuff I think would be outside my scope at the given moment). What do you think? What's your perspective on this?
How do I ensure a number has no more than 4 digits and 2 decimal places (adds .0 or .00 as necessary) onblur using reg expressions?
View 8 Replies View RelatedIs there any way that I can add a limit for the amount of time that a javascript loader bar stays on screen?
The specific loading screen I am using is [URL].. This loading box actually activates once the page is loaded apparently, but in my instance, it is loading then disappearing in the matter of a second, but I wouldnt mind leaving it up for a couple of seconds, say 3-5.
If I get a percentage result on a form, for example: 95.44186046511628
Is there a way I can limit it to only 2 decimal places like 95.44? It won't always be 95.44186046511628, so it just wouldn't apply to just that one percentage. I need it to only have 2 decimal places with whatever the value is.
how do i limit this textfield to three words?
<input type='text' size='40' name='search' style='font-size:16px; font-family:Arial;font-weight:bold;' />
i only want three words to be allowed entered.
I've came across this code on the vbulletin forums probably a year or two ago and everything has been working great however I would like to change the output a bit. Right now the script will output the entire thread title on my home page (html page).What I'd like to know from any of your javascript programmers, is there a way to limit the thread title length? Say instead of the entire thread title maybe only show the first 15 characters?
Code:
<script type="text/javascript" src="http://www.domain.com/forum/external.php?type=js"></script>
<script type="text/javascript">
[code]....
Is it possible with javascript to limit the screen size of IE ? I know how to do a fixed screen size, but I just want to limit the maximum size.
View 2 Replies View RelatedI have a script which allow a user to move users from one multiple selectbox to another and it works fine, but...
I want to be able to restrict a user to only move x amount of users from one box to another. I want to create an alert when the user try to add a user to much...
The javascript:
$().ready(function() {
$('#add').click(function() {
return !$('#box1 option:selected').remove().appendTo('#box2');
[Code].....
I have written some code using transient cookies to send an edited
essay from one html page to another. Each paragraph of the essay is
saved in separate cookie. If the essay is 4 paragraphs long then I
write 4 different cookies.
This works on a Macantosh in Internet Explorer but for some reason on
a PC the cookies turn up empty. If I make the essay shorter then it
works on a PC, so it looks as if I am running up against the size
limitation on cookies? Is 4kb the limit of the total number of cookies
on a page? Do transient cookies have the same size limit as cookies
with an expiration date? I dont even think the essays are 4kb long.
Should I give up on cookies to move so much data and if so what
technology would you recommend I use? (No Database).
I was wondering if there was a way to limit a drag from a zone :for example I have a div zone with elements inside :<div> <my dragable element/> </div> and I don't want to be able to drag the element out from the div.I read the doc but didn't see anything...
View 2 Replies View RelatedInternet Explorer (in particular IE6) has some limit on maximum URL length. This is very hard to debugging if you don't know what to search for. Maybe jQuery could throw some self-explaining exception when URL is too long?
View 1 Replies View RelatedIm working on a store locator and I was wondering if its possible for jquery to limit the results show in the sidebar and add a "more results" option. Right now the sidebar is one large div with overflow hidden so it doesnt show too many results.
View 42 Replies View RelatedI wrote a short javascript code to try to solve a math puzzle. It involves iterating 50,000 times through a for loop. Nested in each of those iterations is another for loop with 50,000 iterations of its own. I think that's 2.5 billion altogether. Each times it compares two numbers that are being incremented.
I'm doing this in JS because I can't any of the Java I learned a few years ago...
I tested the code with much smaller numbers and it worked. With the big numbers my browsers are not responding, not surprisingly (I'm using the latest firefox on the latest mac os).
Will the code finish running tonight? Next week? In 10 years?
I am going to include a google maps to my web with markers, the map works perfect, the problem is that I dont want people to be able to do max zoom for security reason, so I need to put an limit zoom in it, and I cant find out how to on internet, I dont know javascript to do it for myself.
This is the script I use:
Have a dynamic table in JS that adds rows. Want a max of 8 rows. How can that be done?
[CODE]
<script language="Javascript" type="text/javascript">
function addRow()
{
[Code]....
I want to make a word limit on textarea in the below.
editing below code:
I have the following requirement for a textarea:Limit the number of lines to 8 Limit the number of characters to 20 per line Force a line beak when the user reaches he end of a line but break the line at the start of the last word (not half way through the word).Allow pasting into the field and auto-format the line/character countKeep he cursor where it should be (don't move it to the end of the field after any formatting)
View 6 Replies View RelatedHere is a script for limiting text area input. It also shows the remaining characters. Simply change the start value for "Characters remaining" to adjust the max length of the form.
<html>
<head>
<script type="text/javascript">
//Original Script By: Adam Matthews
//Date: 05/05/2005
//Posted at: http://www.codingforums.com
var max=0;
function showChar(obj)
{
var obj3=document.getElementById("char");
if(max==0)
{
max=obj3.firstChild.nodeValue*1;
}
len=obj.value.length;
var cur=max*1;
cur=cur-len;
if(cur<0)
{
var obj2=document.forms[0].elements['comm'];
var str=obj2.value.substring(0,max*1);
obj2.value=str;
showChar(obj2,max);
return false;
}
else
{
var obj2=document.getElementById('char');
var str=document.createTextNode(cur);
obj2.replaceChild(str,obj2.firstChild);
return true;
}
}
</script>
</head>
<body>
<form>
<textarea name="comm" cols="20" rows="3" value="" onkeyup="showChar(this);" onblur="showChar(this);"></textarea>
<br />
Characters Remaining: <span id="char">200</span>
</form>
</body>
</html>
We contract security services with Thawte and have become frustrated with their servers showing lag time. Our site basically runs a script to go to Thawte's site, executes code and returns a value to show protection. If their server is running very slow or down, the script line takes down our entire site because it can not complete execution. Here is the code:
<!-- THAWTE CODE - Comment Out when Thawte is having issues ********************* -->
<tr>
<td>
[code]....
I'm using the following code to display the latest threads from my vBulletin forum in my footer, however I'd like to limit the number of characters that are shown in the Thread title.
Can anyone show me what needs to be changed to say limit it to the first 20 or so characters?code...
How to limit file size before uploading it? This script works fine, but you have to configure first your browser to make the alert window appear. Which is not good at all This script only runs in IE6/7/8.
function IELimmit(calculate)
How to make the alert window appear without any browser configurations?