473,406 Members | 2,377 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,406 software developers and data experts.

Position <DIV> Based on Click Link/Cell

10
I am not really sure how to do this, but I need to create <DIV>'s that correspond to a given week that is clicked. So, when my ASP is generating the page, it will create the hidden divs. When a week number is clicked, I want the DIV to show up for that week next to it, like I have in the following example:

http://www.bowlingballsandmore.com/bsa/EditScores.gif

Can anyone point me in the right direction or give me an example?
Mar 13 '07 #1
21 4425
drhowarddrfine
7,435 Expert 4TB
If this is an asp question you should ask in the asp board. But you can hide/unhide the div using css and the visibility property.

Another possibility is making the week numbers on the left hand side :hover and then display the contents.
Mar 13 '07 #2
BLarche
10
If this is an asp question you should ask in the asp board. But you can hide/unhide the div using css and the visibility property.

This is not an ASP question. I will be generating a div for each week using ASP, but that is not my question.

Once the DIV's are created, how do I get them to position/display next to each week as I have shown in the sample graphic??

Also, I understand how to hide/unhide the DIV's, that is no problem either. It is completely a positioning problem.
Mar 13 '07 #3
drhowarddrfine
7,435 Expert 4TB
I edited my previous post with an added idea.

What you want to do is more involved than I have time for but not difficult. You can enclose the week numbers and the data in one div and use the :hover property to make the data visible/hidden. :hover does not work 100% in IE6 so you may want to surround the whole div in a <a> and hover that which will work in all browsers.
Mar 13 '07 #4
BLarche
10
I still cannot get this to work. You can view my code here:

http://www.bowlingballsandmore.com/bsa/test.asp

It tries to insert the table into the main table's TD rather than on top of it. Does anyone have any suggestions??
Mar 13 '07 #5
drhowarddrfine
7,435 Expert 4TB
First problem is you are not using a doctype and that puts IE into quirks mode. You are using a xhtml namespace yet don't declare xhtml.

Second, validate your code because you are missing some end tags and other things.

Third, some of the tags you are using are deprecated.
Mar 13 '07 #6
BLarche
10
First problem is you are not using a doctype and that puts IE into quirks mode. You are using a xhtml namespace yet don't declare xhtml.

Second, validate your code because you are missing some end tags and other things.

Third, some of the tags you are using are deprecated.

I don't believe that has anything to do with it, but I did remove the xhtml namespace. Also, the validation of the code should have nothing to do with the divs not displaying correctly... I believe it is logic and not code.
Mar 13 '07 #7
AricC
1,892 Expert 1GB
Also, the validation of the code should have nothing to do with the divs not displaying correctly
Validation and DocType have everything to do with the way your code is displayed.
Mar 13 '07 #8
drhowarddrfine
7,435 Expert 4TB
You will never get IE to pretend it's a modern browser without a proper doctype. It's difficult enough to work with valid code than to have to deal with one containing errors.

Just a few hours ago, I pointed out validation to someone who insisted it had nothing to do with his problem. But he fixed his errors anyway and the problem went away.
Mar 13 '07 #9
BLarche
10
Validation and DocType have everything to do with the way your code is displayed.

I still disagree. Anyways, I am obviously missing the boat on this one. Does anyone have an example of what I am trying to accomplish?
Mar 13 '07 #10
drhowarddrfine
7,435 Expert 4TB
You need to read this.
Mar 13 '07 #11
AricC
1,892 Expert 1GB
I still disagree. Anyways, I am obviously missing the boat on this one. Does anyone have an example of what I am trying to accomplish?
I don't see how you disagree Doctypes and Validation have everything to do with the way a browser is going to render your page. Here are the results of your page through the validator as you can see you have no Doctype and some other errors.
Mar 13 '07 #12
BLarche
10
I don't see how you disagree Doctypes and Validation have everything to do with the way a browser is going to render your page. Here are the results of your page through the validator as you can see you have no Doctype and some other errors.

Because my "validation" and "no doctype" are not critical in this error. They are not causing the page to "not work". I know enough about HTML to know that... trust me. This is a logical error in the way I am writing my DIVs and TABLEs. Plus, I looked through my HTML, and I am missing ZERO opening and closing tags....
Mar 13 '07 #13
BLarche
10
Here, is this better? Is this validated and include the proper doc types??

http://www.bowlingballsandmore.com/bsa/test.asp
Mar 13 '07 #14
AricC
1,892 Expert 1GB
Here, is this better? Is this validated and include the proper doc types??

http://www.bowlingballsandmore.com/bsa/test.asp
I think this is what you are looking for:
[html]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<?xml version="1.0" encoding="utf-8" ?>
<head>
<title>Layout Test</title>
<style type="text/css">
.clsWeeks
{
width: 100px;
height: 20px;
border: 1px solid black;
float: left;
}
.clsData
{
width: 500px;
height: 20px;
border: 1px solid black;
}


</style>


</head>

<body>
<div class="clsWeeks">
Week 1
</div>
<div class="clsData">
Some Data
</div>
<div class="clsWeeks">
Week 2
</div>
<div class="clsData">
Some Data
</div>
<div class="clsWeeks">
Week 3
</div>
<div class="clsData">
Some Data
</div>



</body>
</html>
[/html]

HTH,
Aric
Mar 14 '07 #15
BLarche
10
That still does not get me to where I need to be with the edit scores portion. I need the table in the BG to stay as is, and the "edit scores" layer to layer on top of the others... just like the picture:

http://www.bowlingballsandmore.com/bsa/EditScores.gif

Or does it?
Mar 14 '07 #16
BLarche
10
How do I get the "Some Data" layer to display over the Game 1, Game 2, and Game 3 scores???

http://www.bowlingballsandmore.com/bsa/test1.asp
Mar 14 '07 #17
AricC
1,892 Expert 1GB
How do I get the "Some Data" layer to display over the Game 1, Game 2, and Game 3 scores???

http://www.bowlingballsandmore.com/bsa/test1.asp
Do you want 'Some Data' layer above the Game 1 etc...? Or you want that to appear on top of Game 1....
Mar 14 '07 #18
BLarche
10
Do you want 'Some Data' layer above the Game 1 etc...? Or you want that to appear on top of Game 1....
For each week number, I will have a layer that has to appear next to the week number on TOP of the game scores, so, for instance, on top of 175, 200, and 300 in the example I provided. I need it to show/hide WITHOUT altering (expanding) the table beneath it...
Mar 14 '07 #19
drhowarddrfine
7,435 Expert 4TB
My first thought is this isn't going to be possible with CSS alone because the data traverses table cells. Maybe there's something I'm not thinking of so I'm going to look around a bit.
Mar 14 '07 #20
devsusen
136 100+
Hi,

to design the page u require DIV tag, CSS, and Javascript too. Your table will be in a div tag and there will be another hidden div tag. Using CSS you can make a div visible and hidden. to make the div tag appear on the table you need to use z-index property.

Now for each week link u need to call a Javascript function and u need to pass some argument which can identify the week number within the function. Now depending on the parameter passed within the function u need to calculate the location where you will show the 2nd div. Then you need to set the position of the div, put the form content (update form) in the div and then make it visible.

You need to have good concept of CSS and Javascript to design this. I hope this will help to design your page.

susen
Mar 14 '07 #21
AricC
1,892 Expert 1GB
My first thought is this isn't going to be possible with CSS alone because the data traverses table cells. Maybe there's something I'm not thinking of so I'm going to look around a bit.
I also think Javascript would be the best way to go about this, you probably could do this in CSS only, but it will be a huge pain.
Mar 14 '07 #22

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Craig | last post by:
Hi, What I'm trying (quite poorly) to do is make it so when a link is clicked the text inside a div or p changes. I've tried numerous things, most of which work in IE but none of which work in...
61
by: Toby Austin | last post by:
I'm trying to replace <table>s with <div>s as much as possible. However, I can't figure out how to do the following… <table> <tr> <td valign="top" width="100%">some data that will...
1
by: nick | last post by:
In the web site http://greywolfdesign.com , there is a pop-up menu (when mouse over 'Portfolio' menu item), it always works well when using IE (6). However, when using Mozilla 1.6, the popup...
44
by: Jim M | last post by:
I have had great success with using <iframe> with overflow-y set to auto. I can get a similar look with the <iframe> tag. BUT... In all cases I need to have fixed heights. Is there a way to...
3
by: chris1606 | last post by:
I have an image gallery that pops up an enlarged version of a picture when someone clicks on it. That bit works, but it should also load the picture's caption into the floating layer. Instead the...
5
nathj
by: nathj | last post by:
Hi All, I'm working on a new site that has a two column layout underneath a title bar. If you check out: http://www.christianleadership.org.uk/scratch/mainpage.php using IE or Opera you will...
1
by: milas57 | last post by:
hello everyone i have a homepage which introduce the company website as shown below im having trouble to find some javascript code when i click on the header link like servives the body content...
8
prino
by: prino | last post by:
Hi all, I've written code (in REXX) that takes files in legacy languages (PL/I, COBOL, z/OS assembler, etc) and converts them into HTML in a format similar to what's displayed in the z/OS ISPF...
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.