Sections Not Collapsing Properly In Firefox

Jul 23, 2005

I've got a page that shows a number of packages available for sale. Each
package has a little description, and then a (sometimes long) list of
features for each package. I thought it would be a good idea to let
visitors hide the details for each package, so that they can see just
the summaries together. So I borrowed some code (can't remember from
where), which was designed for expandable/collapsible menu trees, and
used it to show/hide the details of the packages.

The code works fine, but the only problem is that when you hide a
section, the page doesn't resize itself. The text underneath moves up,
but below that a huge empty space is left. The scroll bars should change
to reflect the page's new (smaller) length, but instead they stay the
same, and let you scroll through all the empty nothing at the bottom of
the page.

I've tested the page is IE6 and Firefox 0.9 - I only have this problem
in Firefox, in IE the whole page shrinks and the scroll bars change
accordingly. Any suggestions? I though maybe I need to call some
javascript function to refresh/recalculate the page - I tried using
document.normalize() straight after the section got hidden, but it
didn't help. Any other such functions that might do the trick?

Here's the code:

View 4 Replies


ADVERTISEMENT

Pre-loading Images Properly (IE + FireFox)

Oct 25, 2007

I am seeking a easy to maintain and more importantly *working* way to
pre-fetch images, so the pages I develop load smoothly without seeing
the images kick in flicker as they usually do. Important - I need
this to work on Internet Explorer 6.0+ and FireFox.

I am presently using at the head of the page,

pic100= new Image;
pic100.src="./imageme.gif";

However, it doesn't seem to work on FireFox at all. I've tried
different combinations with the URL path, but I don't know what I am
doing wrong. Can someone please assist me with this boggle?

View 23 Replies View Related

Script Not Working Properly In Firefox

Aug 18, 2011

I am having an issue with some javascript that works fine in IE, but in FF is not working properly. The script is used to display a list of check boxes, the user can expand, which can checked to enable a users selection of products.

This is the script:
<script type="text/javascript">
var xcNode = [];
// m = Parent UL ID
// c =
function xcSet(m, c, q, isCompletedLength) {
if (document.getElementById && document.createElement) { .....

Works fine in IE, but not in Firefox where the expanded list is not showing the current number of items (checkboxes), it shows 34 check boxes in IE but only 17 in firefox.

View 9 Replies View Related

InnerHTML Function Not Working Properly In Firefox?

Oct 15, 2010

I'm having an issue with Firefox and the innerHTML code. My index file has the following html body code in it:
Code:
<div id="testBox" style="text-align: center; color:white;">
test text
</div>

Then, in a separate html document loaded through an iframe, I have the following code that works great in IE but not in Firefox:
Code:
<SCRIPT type="text/javascript">
function ChangeML(){
parent.testBox.innerHTML ='text has been changed';
};
</script>

The function ChangeML is called on a click event using MooTools, but I figured that part isn't what's causing the problems because everything else works fine. No error seems to be reported ... it just skips right over this piece of code.

View 5 Replies View Related

JQuery :: Drop Menu Not Working Properly In IE And Firefox?

Jun 1, 2011

i am trying to create a very simple drop menu using jquery, bt when i am attaching the event to li's which have further ul inside it, it showing very strange behavior in firefox and in IE, it not showing propely the sub menu, zindex problem.

the complete code is here

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Untitled Page</title>
<style type="text/css">

[Code].....

View 1 Replies View Related

Dynamically Adding Form Elements Does Not Work Properly In Firefox?

Mar 10, 2010

Im using a JavaScript function to dynamically add rows of user-input data to a form, but Im having problems getting it to work properly with Firefox (works well in IE, though). We are using Struts 1.3 and JSPs, if that makes a difference.

The JavaScript function seems to work initially because the newly added row will show up on the JSP after the user enters their data and clicks a button that uses an onclick event to call the function. However, when I submit the form the new elements dont get included in the request. The result is that when I use the following code in my Struts Action Class to get all the parameter names submitted in the request, I dont receive the new form elements that were added by the JavaScript function and I cant process those newly added records:

Enumeration e = request.getParameterNames();

Here is the JavaScript code for the function that I call to dynamically add rows of data to the form.

function addData(tableId, distBedsCode, empCode, fte) {
var tbl = document.getElementById(tableId);
//grab how many rows are in the table
var lastRow = tbl.rows.length;

[Code].....

Ive tried using hiddenElem.setAttribute(name,) at the end of the above code, instead of something like hiddenElem.name = , but that didnt work. There is just some difference between the way Firefox handles things and the way IE handles them

View 3 Replies View Related

Expanding And Collapsing

Jul 25, 2007

Is there a way to expand and collapse in JavaScript? What's the best way?

View 1 Replies View Related

Open Window Not Working Properly In Firefox But Is Working In IE

Feb 6, 2009

The Open Window in Javascript is not working properly in Firefox but is working in IE. What could the reason be?

[Code]...

View 1 Replies View Related

Table With Collapsing Rows

Nov 20, 2006

I write a simple javascript to expand / collapse some rows of a table.
The problem is that when I click more than one time the link to expand
/collapse the rows I get an unwanted extra space after such rows. Code:

View 2 Replies View Related

How To Create Collapsing Boxes

Jun 24, 2010

I would like to create collapsing boxes.I would like for them to have different colors.

Box1 Box 3
Link 1 Link 1
Link 2 link 2
Link 3 Link 3

[code]....

I got the code to do the first column (box 1 and 2). But I don't know how to add a second column (box 3 and 4).

View 1 Replies View Related

Expanding / Collapsing <div> Tags

Sep 29, 2006

Ive got the follwoing javascript code that will expand/collapse a section of my site that is enclosed within a <div> tag.

function showorhide(id) {
if (document.getElementById(id).style.display == "none")
{
document.getElementById(id).style.display = "block";
}
else
{
document.getElementById(id).style.display = "none";
}
I am using asp.net 2.0 to code my site with, the above code works fine (example below:

<a href="#" Personal and Contact Details</a>
<div id="basicdetails">

</div>
All that is enclosed within the <div id="basicdetails"> is expanded / collapsed.

HOWEVER, im geting a few problems with this method: 1. On a page load, the div tags are always displayed, is there any way of having them collapsed on page_load?

2. When i put 2 seperate <div> tags (i.e. 2 seperate expand/collapse sections on the same page), one is collapsed and one is expanded, when working within the expanded one and a button is clicked (for saving of info from a form), both divs are then expanded?

View 10 Replies View Related

Collapsing Menus - Alert Does Not Show Up

Sep 21, 2009

I was told to use some Javascript to achieve collapsing menus. This is my current try, but it doesn't seem to be working. The end result should be like the menus on this site: [URL]

This is my code so far:
<HTML><HEAD>
<title>Test</title>
</HEAD><BODY>
<script type="text/javascript">
var hide = 0;

function Show(){
alert("Test");
if ( hide == 0 ){
document.write("<a href=\"county.htm\">County</a>");
hide = 1;
} else {
document.write("");
hide = 0;
}}
</script>
<input type="button" onclick="Show()" value="Services" />
</BODY></HTML>

For some reason, Show isn't being called. The alert doesn't even show up. Though I'm under the impression the script should go above the first time it's used in the document.

View 1 Replies View Related

Reordering DIV Sections

Jan 31, 2006

I have 12 div sections on a page and I want the user to be able to
specify the order in which they appear on the page. I'm thinking of
something like this but want to ask what people think of this approach
and maybe suggest another way or an article on how to do this.

// grab the innerhtml by:
var theSpan1 = getElementById("span1")
var theSpan1HTML = theSpan1.innerHTML

// then grab the innerHTML of the span you want to "swap" it to:
var theSpan2 = getElementById("span2")
var theSpan2HTML = theSpan2.innerHTML

// and switch the innerHTML's of the span by:
theSpan1.innerHTML = theSpan2HTML
theSpan2.innerHTML = theSpan1HTML


<form>
<span id="span1">
<div id="div1">
<select size="1" name="ddlOrder1">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
</select>
Span1/Div1
</div>
</span>

<br />

<span id="span2">
<div id="div2">
<select size="1" name="ddlOrder2">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
</select>
Span2/Div2</div>
</span>

<br />

<span id="span3">
<div id="div3">
<select size="1" name="ddlOrder3">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
</select>
Span3/Div3</div>
</span>
<input type="submit" value="Save Profile" class="smalltext"
name="btnSaveProfile" onclick="changeOrder()">
</form>

View 2 Replies View Related

Collapsing Images On Click / Then Displaying Links

Nov 1, 2009

When someone clicks on an image here (URL...), the rest of the images collapse and become invisible.Also, there will be a "show other images" button which will then show the rest of the images.

View 4 Replies View Related

Collapsing Table Rows Based On Row Color?

Jun 21, 2011

Is there a way to collapse only certain colored rows? So far all the rows collapse...I was thinking I could put another if statement in the for loop, but is there a way to test for color?

Code:
<html>
<script type="text/javascript">
var rowVisible = true;
function toggleDisplay(tbl) {

[Code]...

View 9 Replies View Related

Make Various Sections Of Image Clickable

Dec 8, 2011

I created this thread on the html forum but I'm not sure if it can be done with javascript, so I'll post here as well. I was wondering if there's a way to make various sections of the image clickable? The sections on the image are not rectangular so I can't make divs. I don't think I can use imagemap either since that only works for making one clickable area right? I already cut out these sections in photoshop and saved them with alpha background, and created a "glowing" version of each section, since I want to make it so that when mouse hovers over it, it will glow. But I can't stack them on top of each other, since if I do that only the topmost layer will be clickable for those areas where they will overlap with rectangular divs. This is example of what I mean: [URL]

View 6 Replies View Related

Make Various Sections Of Image Clickable?

Dec 8, 2011

I created this thread on the html forum but I'm not sure if it can be done with javascript, so I'll post here as well. I was wondering if there's a way to make various sections of the image clickable? The sections on the image are not rectangular so I can't make divs. I don't think I can use imagemap either since that only works for making one clickable area right? I already cut out these sections in photoshop and saved them with alpha background, and created a "glowing" version of each section, since I want to make it so that when mouse hovers over it, it will glow. But I can't stack them on top of each other, since if I do that only the topmost layer will be clickable for those areas where they will overlap with rectangular divs.

View 1 Replies View Related

Hide / Unhide DIV Sections With Check Box

Mar 7, 2003

I was wondering if someone could tell me what i'm doing wrong here. Real simple code, but it doesn't work. BTW, I really only care for this to work with IE 6+.

View 14 Replies View Related

Password Protect Files / Sections On Web Page ?

Nov 2, 2009

I wanted to know is it possible to password protect some files in web page?For example, If someone wants to download file, browsers requests password(one for all visitors), idea is that some files and/or sections of web site is accessible to those who know the password..

View 9 Replies View Related

JQuery :: Accordion Starts With All Sections Closed Until Clicked?

Jun 16, 2011

I've created an Accordion but by default the first menubar is open, is there a way to have all menu bars closed?

Is it the "active: 0" option? How can I disable it so that the accordion starts with all sections closed until clicked?

View 3 Replies View Related

Script Quiz To Grade Individual Sections Of It Rather Than Grading As A Whole?

May 12, 2011

I am looking for a javascript quiz script that will allow me to grade individual sections of a quiz rather than grading the quiz as a whole.

I am looking to setup an online test consisting of a number of sections but the output must grade each section individually.

View 3 Replies View Related

JQuery :: Opening Tabs And Linking To Sections Within Show / Hide

Mar 25, 2011

1. I am trying to figure out how to open a tab, open a show/hide within that tab, and link to a particular person from an incoming link.
2. I also am trying to figure out how to open a tab and then a pane within that tab from an incoming link.

This is the code used for the tabs
<script type="text/javascript">
$(document).ready(function() {
$("ul.main.tabs").tabs("div.main.panes > div", {tabs: 'a.main', history: true });
$("ul.nested.tabs").tabs("div.nested.panes > div", {tabs: 'a.nested', history: true });
});
</script>

This is the code used for the toggle
<script type="text/javascript">
// Andy Langton's show/hide/mini-accordion - updated 23/11/2009
// Latest version @ [URL]
$(document).ready(function() {
var showText='+/-';
var hideText='+/-';
var is_visible = false; .....

View 9 Replies View Related

Coding Involving Div Tags - Sections That Have 'Not Available' As The Answer To Not Show Up On The Live Page

Feb 24, 2010

I am relatively new to Java and am going to be taking a class on it next fall. For now though, I am trying to code for a client I am currently working with and am hopelessly lost. The client I am working with has an ecommerce site with Network Solutions which uses aspx. It allows you to code html and link to css, java (pretty much anything except php). The problem I am having is that they currently have their product descriptions coded in div tags:

<div id='alternatebg'>
<div id='detailsgreybox'><div id='alternatename'><p>Alternate Name</p></div></div>
<div id='pd2'><p>Not Available</p></div>
</div>
<div id='usebg'>
<div id='detailsgreybox'><div id='use'><p>Use</p></div></div>
[Code]....

What they want to happen is for the sections that have 'Not Available' as the answer to not show up on the live page. I have tried to use <ns:if condition="..."> but do not know how to call for it to see if the div says 'Not Available'.

View 16 Replies View Related

JQuery :: Making Multiple Divs Appear Or Disappear When Diff Sections Of Site Are Scrolled To?

Jul 14, 2011

I am trying to create a fixed crest at the top of my site that changes depending on where the viewer of the site scrolls to.

I found the following script/plugin on StackOverflow that works well for making one element fade in and fade out.

PART ONE:

function isScrolledIntoView(elem) {
var docViewTop = $(window).scrollTop();
var docViewBottom = docViewTop + $(window).height();
var elemTop = $(elem).offset().top;

[Code].....

I then duplicated part two and changed the variables to make a different div appear in this position depending on where the viewer was in the site but it did not work past the first transition. see the following link to get a better idea what I am trying to achieve.

[URL]

Is there any way I can adjust the script to make it work with multiple transitions?

View 2 Replies View Related

JQuery :: Selecting Sections - Delete (actually Hide) Either A Salesperson Or Client Depending On Which Link The User Clicked

Jul 18, 2011

I am building a web application using PHP. It lists each salesperson and below it, the clients assigned to them. There are only about 5 or 6 salespeople. There could be any number of clients for a salesperson. Each salesperson is given their own div and client information (name, email, phone) is grouped with an unordered list:

Code:
<div id="salesperson-1">
<h1>Salesperson 1</h1>
<ul>
<li>Steve Smith</li>
<li>steve@company-a.com</li>
<li>555-5555</li>
<li><a href="#">Delete Client</a></li>
</ul>
<a href="#">Delete Salesperson</a>
</div>

I would like to be able to delete (actually hide) either a salesperson or client depending on which link the user clicked. I have been using JQuery throughout my site so far and I can accomplish the task for the salespeople by creating individual events for 6 salespeople. If there are only 5 people, the 6th event will never be triggered. If there are 6, everyone is covered. The tricky part are the clients since I can't guarantee a specific number of them. I would like to fit best practices as much as possible and reduce the complexity of my code if I can. Keeping that in mind...Is there a better way to handle the salespeople rather than rewriting the function 6 times? Can I pass a variable to a JQuery function using the onClick binder on the <a> tag --> <a href="#" onClick=deleteClient(10)> and use the variable to determine which client to delete? Would using a function in plain javascript and ignoring JQuery for this entirely be better?

View 2 Replies View Related

JQuery :: UI Accordion Option "collapsible:true" Not Collapsing?

Apr 23, 2009

I have a simple Accordion which I have given the settings:

$("#accordion").accordion({
event: "mouseover",
header: "h3",

[code]....

View 1 Replies View Related







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