473,387 Members | 1,650 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Troubleshooting DHTML and Javascript

I am testing in IE7.

I display one of several spans when the user mouses over some code.
Inside the span are several tabs. Clicking on the tab triggers a JS
function that hides the "current" text for the span, then shows the
"new Current" box. It's a constantly revolving door- turn off old,
turn on new. Switch from one span to another and reset the fields.

When I switch between different "spans" then switch back, there are
ghost form elements on the screen (a text area, a blank button) that
appear near where they should be. The section that I was last on does
not display. This occurs when switching between different spans.
HOWEVER, when I set a javascript alert to display what the old visible
and new visible divs are within each span, none of these problems
occur- everything displays correctly. It's as if the alerts "reset"
the javascript display in some fashion. The errors only happen when
the alerts are not on.

Does anyone know why this might happen or if it's a common occurence
that these problems disappear when an alert is used? If I don't use an
alert, how do you display JS variables during testing. Here are some
of my JS functions. thanks in advance for any help.

Don
function onChangeSpan(sp_id){
//Triggered when a new span is selected
document.getElementById('Span'+currentSpan).style. display =
'none';
document.getElementById('Span'+Sp_id).style.displa y = 'block';
currentspan = Sp_id;

//alert(currentExamplePanel);
hideExamplePanel(currentExamplePanel);
currentExamplePanel = 'qgetsample'+tt_id+'1';
//alert(currentExamplePanel);
showExamplePanel(currentExamplePanel);
}

function showExamplePanel(examplenum){
//alert(examplenum);
hideExamplePanel(examplenum.substring(0,11)+1);
hideExamplePanel(currentExamplePanel);
document.getElementById('Examplepanel'+examplenum) .style.display =
'block';
currentExamplePanel = examplenum;
//alert('new current: ' + examplenum);
}

function hideExamplePanel(value){
//alert('hiding: ' + value);
document.getElementById('ExamplePanel'+value).styl e.display = 'none';
}

Oct 20 '06 #1
2 1238

bb*****@gmail.com wrote:
I am testing in IE7.

I display one of several spans when the user mouses over some code.
Inside the span are several tabs. Clicking on the tab triggers a JS
function that hides the "current" text for the span, then shows the
"new Current" box. It's a constantly revolving door- turn off old,
turn on new. Switch from one span to another and reset the fields.

When I switch between different "spans" then switch back, there are
ghost form elements on the screen (a text area, a blank button) that
appear near where they should be. The section that I was last on does
not display. This occurs when switching between different spans.
HOWEVER, when I set a javascript alert to display what the old visible
and new visible divs are within each span, none of these problems
occur- everything displays correctly. It's as if the alerts "reset"
the javascript display in some fashion. The errors only happen when
the alerts are not on.

Does anyone know why this might happen or if it's a common occurence
that these problems disappear when an alert is used? If I don't use an
alert, how do you display JS variables during testing. Here are some
of my JS functions. thanks in advance for any help.
Your problems seem more related to HTML and CSS - a span element is a
generic container for inline content, it should not contain block
elements like divs.

Try asking your question in:

news:comp.infosystems.www.authoring.html

or

news:comp.infosystems.www.authoring.stylesheets

They will want a link to a page that displays the error.
--
Rob

Oct 22 '06 #2
I appreciate the response. I reposted my question there and only kooks
responded I'm afraid. I solve the problem before I got a chance to
create and post this on a public-facing website.

Don

RobG wrote:
bb*****@gmail.com wrote:
I am testing in IE7.

I display one of several spans when the user mouses over some code.
Inside the span are several tabs. Clicking on the tab triggers a JS
function that hides the "current" text for the span, then shows the
"new Current" box. It's a constantly revolving door- turn off old,
turn on new. Switch from one span to another and reset the fields.

When I switch between different "spans" then switch back, there are
ghost form elements on the screen (a text area, a blank button) that
appear near where they should be. The section that I was last on does
not display. This occurs when switching between different spans.
HOWEVER, when I set a javascript alert to display what the old visible
and new visible divs are within each span, none of these problems
occur- everything displays correctly. It's as if the alerts "reset"
the javascript display in some fashion. The errors only happen when
the alerts are not on.

Does anyone know why this might happen or if it's a common occurence
that these problems disappear when an alert is used? If I don't use an
alert, how do you display JS variables during testing. Here are some
of my JS functions. thanks in advance for any help.

Your problems seem more related to HTML and CSS - a span element is a
generic container for inline content, it should not contain block
elements like divs.

Try asking your question in:

news:comp.infosystems.www.authoring.html

or

news:comp.infosystems.www.authoring.stylesheets

They will want a link to a page that displays the error.
--
Rob
Oct 24 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: viator | last post by:
Hello everybody. I am a student doing my masters in Comp. Sci. Will some explain to me why it seems completely two worlds when taking about DHTML in NN and IE. Is there any way to write truly...
3
by: Chris Leonard | last post by:
Hi. I've copied some code from a book which will enable me to make a layer around a page, my aim is to do something a little more complex but this I thought would get me started. Anyway, I've...
2
by: mr_burns | last post by:
hi there, i would like a book that will explain concepts of javascript and dhtml instead of, for example, ten tutorials on how to do specific things in js or dhtml. ideally a book thats can...
1
by: Bob T | last post by:
Hi All, I am a bit of a newbie but have a reasonable grasp of using ASP.net code. One thing I have wanted to find our for sometime is if there is a way to invoke DHTML methods from or after...
1
by: sdonohue | last post by:
I am not very good at DHTML, but I have a set of links that use DHTML and they work :) But now the customer wants to have one of my DHTML links call a javascript function when it is clicked on. ...
9
by: ninhovid | last post by:
Hi... i'm new at dhtml, and i want to use it in help windows (instead of window.open() of javascript)... i'm done it... but it works only in internet explorer.. in firefox 2 and 3 it opens the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.