Adjusting SelectIndex In A Select Box?

Apr 16, 2010

I have a large Select box for all the accounting items in the program. It's long so it makes it hard for the user to find the one they want. There are 6 categories that the accounts are in. They are:

ASSETS
LIABILITIES
REVENUE

[code]....

In an attempt to simplify the selected process I put in a false option so the user can find their way easier. Example:

---- LIABILITIES ---
Bank loan
Fry's account

For each account the value is the ID from the table and the Name is the associated name in the table.This of course adds a count to the selectIndex for the box.I made a variable for each of those categories.

ASSETS = 1
LIABILITIES = 2
etc.

The problem is that I have to adjust the select index for that variable. Example, if a liability is selected, I would have to subtract 2 from the index.

View 2 Replies


ADVERTISEMENT

Adjusting For Timezone

Aug 30, 2005

I'm (still) working on an ISO 8601 date parser. I want to convert at least
the formats described here:

http://www.w3.org/TR/NOTE-datetime

Well.. I've got most of it working (via RegEx's) good enough for me but I'm
having a brain block when it comes to TimeZone.

The datetime may come with an optional timezone offset (from GMT) as here
(the offset is +1 hour from GMT):

1997-07-16T19:20:30+01:00

So... that's the current time there... but my spec is that timezone
information, if present, should be used to convert the given time to local
time. For me, for example, this would be -5:00 from GMT.

I've already split the Timezone information: I've got indiviual access to
the sign (plus or minus), the hour offset and the minute offset.

So I'm sure there's a nice, simple formula for this... but it eludes me. Or
I'm lazy... I can't decide which.

Any pointers?

View 7 Replies View Related

Adjusting A Form Input's Value?

Nov 8, 2009

I should start out by saying that my javascript skills suck beyond description. Even after Googling for help, I'm still struggling.

I'd like to adjust a numeric form input field by buttons, i.e. clicking the +1 button increase the numeric value in the field by one, clicking -1 does the reverse. I'll probably use <a> or <button> elements for the +1/-1.

View 2 Replies View Related

Adjusting A Picture To The Size Of A Window

Jul 20, 2005

I'm a newbie...I'm having trouble changing the size of an image when I
use different window sizes when loading the and resizing the browser window.

View 3 Replies View Related

Adjusting Function For Multiple Calls?

Oct 17, 2010

I have a search function which works when I only want to have only one search per page, but as it involves a string call I'm not sure how to modify it to multiple search requests on a page.

The below works fine for one call:

<script type="text/javascript">
function showHint(str){
if (str.length==0){

[code]...

The above doesn't work and I am not sure what do about the showHint(str) as clearly I am not representing it properly in my attempt to modify the script.

View 6 Replies View Related

Adjusting The Volume Of An Embedded Object?

May 18, 2011

I have a javascript sound board that I've made for a Church skit but I'm wanting to be able to smoothly fade out the longer SFX without having to do it manually with the volume slider.

The Object: <span id="player_holder"><embed id="player" hidden="true" autostart="true" loop="false" volume="100"/></span>

How do I modify the volume value from: document.getElementById('player')

View 4 Replies View Related

Adjusting Disable Form Script

Nov 19, 2007

this script play on the disable option of form elements...

but in order to set it up i need to write all the "name" of all form elements inside the
<input type="checkbox" name="control1" onclick="enableDisable(this,'day','month','year','hour','min')" />

'day','month','year','hour','min' - those are just examples...i got much more of elemets...

how can i make this script recognize all the elements inside <form name="example1"> by itself...with no need from my side to specify all elements like this (this,'day','month','year','hour','min')" Code:

View 2 Replies View Related

Stop Website BG From Adjusting On Load?

Jan 13, 2009

The problem: When the website loads, the background shifts up to incorporate the catfish popup and allow the content to not be masked. This is a cool function, though I don't want this to happen.

Question: How do I stop the website from adjusting up?

(I tried modifying this: catfishheight = 90; // total height of catfish in pixels catfishoverlap = 90; // height of the overlap portion only (semi-transparent)

This does allow the catfish to cover up the content, though the background image still shifts with the catfish load.

View 1 Replies View Related

Adjusting Calendar For Booking Form

Apr 15, 2010

I have a javascript calendar which will be used for a booking form. The booking form is for the months of october, november and december.

The code is:
//Global variables
var winCal;
var dtToday;
var Cal;
var MonthName;
var WeekDayName1;
var WeekDayName2;
var exDateTime;//Existing Date and Time
var selDate;//selected date. version 1.7
var calSpanID = "calBorder"; // span ID
var domStyle=null; // span DOM object with style
var cnLeft="0";//left coordinate of calendar span
var cnTop="0";//top coordinate of calendar span
var xpos=0; // mouse x position
var ypos=0; // mouse y position
var calHeight=0; // calendar height
var CalWidth=208;// calendar width
var CellWidth=30;// width of day cell.
var TimeMode=24;// TimeMode value. 12 or 24
var StartYear =2010; //First Year in drop down year selection
var EndYear = 5; //End Year offset. i.e. Current Year + 5 .....

//use the Month and Weekday in your preferred language.
var MonthName=["October", "November", "December"];
var WeekDayName1=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];
var WeekDayName2=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"];
The only problem is when I look at the tcalendar in frontpage preview it shows 9 other months as 'undefined'.

View 5 Replies View Related

Adjusting The Width And Height Of A Popup Window

Jul 20, 2005

Im working on a site for a friend, and we've setup a popup window for a couple pages, but with the code we have, the variables for the width and height are in the <script> portion of the code, and not on each individual popup code segment. Is there a way I can add "width=400" or something to each popup to change its width? Code:

View 1 Replies View Related

JQuery :: Adjusting Speed Parameter Does Not Have Any Effect

Sep 14, 2010

I can't change the speed on any jQuery functions that use that parameter, for example fadeIn(). No matter if I add slow, fast, 100, 180000... my tags/images/whatever always fade in at the same speed which is something between half and one second. Is this a bug?

View 2 Replies View Related

JQuery :: Adjusting The Preview Slider In Wordpress?

Jan 31, 2011

I'm using a preview slider on my Wordpress site, but it doesn't work the way I want it to. As soon as the preview is changing it shows the next preview on the rightand the previous on the leftside of the center preview.

[Code]...

View 1 Replies View Related

JQuery :: Detecting SWF Height And Adjusting Padding

May 31, 2010

So, I'm new to jQuery, but have a pretty good understanding. Still, I've come across an issue that I'm not quite sure how to resolve. I'm using wordpress, and have a .swf inside of a div, "player." The player class has no height spec, as the height of the .swf is different depending on the page. What I need to do is detect the height of the .swf on each page, and then apply that number as padding-top to another class?

View 1 Replies View Related

JQuery :: Adjusting Superfish Menu Alignment

Jul 23, 2009

The issue I am having is that my menu is aligning to the right, instead of to the left where the normal menu was. I have worked with the CSS for some time now, but have not been able to figure it out. I would also like to make the menu colors black text with a transparent background, and white text with a #333 background on hover. The web site address is: [URL]

View 1 Replies View Related

Adjusting IFrame Height Relative To Its Content

Aug 16, 2010

<html>
<head>
<title>< /title>
</head>

<body>
<iframe name="j" id="j" src="ANOUNCEMENT.html" onload="this.style.height = j.document.body.scrollHeight + 12"></iframe>
</body>
</html>

Am I doing it right? I am trying it now but the j.document.body.scrollHeight seems doesn't work for me.

View 3 Replies View Related

Show/Hide Div Footer Below It Not Adjusting Consistently In IE?

Jul 31, 2009

My problem is on this page using IE 7 & 8:[URL].. If you click the tabs, you'll see that the footer doesn't adjust accordingly. Only in IE. Works fine in Firefox (Mac & PC) and Safari Mac.

Here's the javascript:

<script type="text/javascript" charset="utf-8">
$(function () {
var tabContainers = $('div.imgswap > div');
tabContainers.hide().filter(':first').show();
$('div.imgswap ul.tabNavigation a').click(function () {

[Code]...

View 2 Replies View Related

Adjusting Form Based On User Input

Feb 3, 2001

This is probably easy, but I flipped through the first 100 posts and couldn't find a similar question.

I would like to set up a form with multiple radio boxes in a table. The first row containing two selections, second containing 2..... Once the 1st row/column is selected, the 1st row/2nd column automatically displays the information from the first selection.

I am not necessarily looking for exact code on how to do this, just reference points to go to, and preferably suggestions on the best(meaning quickest) language to do this with.

View 1 Replies View Related

Show/Hide Div. Footer Below It Not Adjusting Consistently In IE?

Jul 31, 2009

I just found out I can't post a link. But it's a tinyurl dot com with /m8ajyp If you click the tabs, you'll see that the footer doesn't adjust accordingly. Only in IE. Works fine in Firefox (Mac & PC) and Safari Mac.Here's the javascript:

Code:

<script type="text/javascript" charset="utf-8">
$(function () {
var tabContainers = $('div.imgswap > div');

[code]....

the menus page /menus (which should be identical code and structure as the other page) it looks like the footer adjusts on the FIRST click of a different tab. But then it doesn't adjust again. On /special-events the footer doesn't adjust even the first time.

View 5 Replies View Related

JQuery :: News Slider - Auto Adjusting Height?

Mar 21, 2010

I try to make a news slider with cycle plugin here's the structure
//---------------------//
<div id="myNewsDisplay">
<ul id="aContent">
<li>short text</li>
<li>moderate text</li>
<li>long text</li>
</ul>
<div id="aFooter"></div>
</div>
//---------------------//
I want to make the #myNewsDisplay to animate height based on #aContent height the problem is that, everytime the news showing up at the beginning the height is automatically set by the last long text height. How to make the #myNewsDisplay height auto adjust the height of every news height?

View 5 Replies View Related

JQuery :: Superfish - Adjusting Top Menu Width Attributes?

May 1, 2010

How do I standardise the width of the top menu items in a (Superfish) Suckerfish style menu (V 1.4.8) as each is sizing to the text and I would like all to be equal

View 3 Replies View Related

Auto-Adjusting Menu Image Based On Browser Size Possible With JS?

Oct 8, 2010

I have a background image that auto-resizes based on browser window / screen resolution. I want my top header menu, which requires links, to act in the same way and be in roughly the same position/size based on browser window. Is this possible? In the sample below, the image is just part of the background image to give you an idea of the look I am trying to duplicate.Is there a Javascript out there that will help me or will I be stuck having to rework my design?

View 6 Replies View Related

Adjusting In-text Carat Properties And Preventing Arrow Key Scrolling

Apr 12, 2010

For those without the time or patience to read the full post i have summarised a list of my issues, for the full description of the reasons behind them please read on.

Disabling the text cursor in a specific text field (not the mouse cursor but the one which is controlled by the keyboard inside the field)

Adjust the blink rate or the colour of a carat.

Anyone who has some in-depth knowledge about browser based games who would like to tell me about how they stop arrow keys from scrolling around the page.

I am currently constructing a page which displays a gallery of images and I have been trying to correct one final issue for some time now.

I have used a pair of buttons to navigate through the table cells in which the images are stored by using a getElementByTagName function and having the buttons adjust the index of the desired image. This works fine.

My issue arises from the fact that I also assigned the arrow keys using onkeydown and the relevant keycodes to call the same function so that the user can navigate the table via those keys. It all worked perfectly until I tested the page while it was zoomed in far enough that the browser scrollbars kicked in and with each arrow key press the page would scroll while also changing the selected image.

This in itself kind of highlighted the fact that I shouldn't really be hijacking default browser functions, so the logical solution was to a) provide the user with the option to enable arrow key navigation and b) prevent the document from scrolling about while this option is enabled.

So for:

a) I created a button which when pressed activates the onkeydown functions for the arrow keys and then changes into a button which will deactivate them again onclick.

b) was a hell of a lot more difficult to fix but in the end I found what I will call a "back door" method where I insert a read only text field, set it to match the background (which is conveniently black) so it is invisible, and force the document focus into the text field while the button is active. This disables the scrolling completely while the navigation is turned on and works perfectly... in firefox.

Someone extremely clever at Microsoft decided to code IE to make the text entry cursor contrast with whichever background is selected for the field, as a result I'm stuck with a blinking white carat next to my buttons which may be one of the most irritating things I have ever seen on a black background.

So again, I would be extremely happy if someone could suggest a solution to any of the following:

Disabling the text cursor in a specific text field (searched far and wide about this and the only answer anyone gets seems to be 'why bother using a text box at all' or 'removing my carat would make me extremely angry as a user' but usually because they dont specify why they want to hide it).

At least adjust the blink rate or the colour of the carat to make it less annoying or invisible (seen one example about the blink rate in JS but it seemed angled towards game coding and I couldnt get it to work on my page - tips appreciated).

An alternative or all-round better way to approach the navigation function issue as I'm not too pleased about having an invisible, barely functioning text field in the middle of my page - I've seen a few posts about setting up a div which acts as its own window but I haven't yet seen it working.

Anyone who has some in-depth knowledge about browser based games who would like to tell me about how they stop arrow keys from scrolling around the page.

One thing that I am fixed on keeping is that it is the arrow keys which navigate the table, I know an instant solution would be to use ASDW but I've been bashing away at this for so long that it's getting personal now.

View 3 Replies View Related

Adjusting Code To Use Either Server-side Or Client-side Validation--NOT BOTH?

Sep 11, 2009

I have the following PHP code, which uses server-side validation, which works fine. It the user leaves the text field empty it stores an error in a session array which is outputted on the page where the $_GET['id'] variable came from. I also implemented a snippet of javascript code that just checks to see if the cell is empty and throws up alert box. The problem is that both the javascript code and php error validation are both running when I click submit. The PHP code should be a backup to the javascript code in case the user has javascript turned off. The client-side validation should be the default. Not sure if this change should be made in my PHP Code or Javascript Code.

PHP CODE:
session_start();
require_once("../Modules/Connection_Functions.php");[code].....

View 1 Replies View Related

JQuery :: Select All / Select None *text* Links In A Form That Call A Jquery Function To Select All Or Select No Checkboxes?

Jun 16, 2011

I've seen a variety of implementations around that enable selecting all or no checkboxes by using a checkbox to toggle that choice. However, I'm trying to find a way like this: I have two text links on my page: Select All, and Select None. How can I get those links to call a jquery function to select all or select no checkboxes in my form? As a little food for thought:

<head>
$(function() {
//function for selecting all or none...is there a way to make a single function that passes in a parameter to differentiate between selecting all or selecting none, or do I need a separate function for both?[code]....

View 2 Replies View Related

Multiple Select Boxes :: Make The Select Boxes Appear AFTER You Select The Field Before?

Jul 24, 2009

<script language="JavaScript" type="text/javascript">
<!--
/*[code]....

// This script supports an unlimited number of linked combo boxed

// Their id must be "combo_0", "combo_1", "combo_2" etc.

// Here you have to put the data that will fill the combo boxes

// ie. data_2_1 will be the first option in the second combo box

// when the first combo box has the second option selected

// first combo box

data_1 = new Option("Business Cards", "$");
data_2 = new Option("Club Flyers", "$$");[code].....

I have this code, and I was wondering if it is possible to make the select boxes appear AFTER you select the field before.

View 8 Replies View Related

Pass Text From One Select Box To Another Select Box Using The For Loop To Check The Existence Of An Item But It Is Not Working?

Aug 28, 2010

i am trying to pass text from one select box to another select box. The logic is if 10 are added, no more passing must happen. Also if an item is already added, it mustn't be added again.I am using the for loop to check the existence of an item but it is not working: what am i doing wrong?

Code:
function PassSelectValues(){
//pass values from select boxes to select boxes
var counter;[code]....

why isn't counter incrementing at all? The alert message box does appear saying item exists but the item gets added anyway.

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved