• 0

DHTML block positioning


Question

I'm sure there is a way to do this...

I have all these values scattered on the page in a table. I'd like the user to be able to change those values while they are looking at the table. Most of the fields will have a set of values, some will only have user input, and others will have both set values or user input. For that reason I don't want to make them all simple SELECT boxes, because of the variety of different input, and also for display reasons.

So I've contructed these little <div> blocks that contain all the html to allow the user to modify each field. The <div> display property is "none;" initially... and there is a little link next to each field in the table that when the user clicks on the display becomes block and the user can then change the value of the field in the table. Basic DHTML and server side scripting stuff. Got that worked out.

Currently I have the <div>'s embedded into the same table cell as the fields. When they appear the browser adjusts the table to make room for this "control" <div>. This gives it a kinda aquard sloppiness that i'd like to fix. I would like it if the <div> hovered over the table when it is visible, as if it were a pop-up drop-down thing like a fancy dhtml menu system. But I'm not sure how to (or if I can) "position it."

The position of the div needs to be relative to the field (obviously), which I know nothing about at render time. On top of that, I've got some fancy javascript sorting going on when the user clicks on one of the headers. This isn't a problem with the control <div> embedded into the cell, because all the content of the cell gets rearanged with the sort funciton. It seems that an absolute positioning strategy won't work.

I hope i've made myself clear. Any help would be awesome!

-nic

Link to comment
https://www.neowin.net/forum/topic/329390-dhtml-block-positioning/
Share on other sites

1 answer to this question

Recommended Posts

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • If the entire industry adhered to the fundamental principles of Microsoft's Next-Generation Secure Computing Base (NGSCB), there may not have been a basis of the existence of this article.
    • Ashes of the Singularity II announced promising even larger battles, new faction, and more by Pulasthi Ariyasinghe A sequel for the 2016-released Ashes of the Singularity has officially been confirmed, and the original developer and publisher duo, Oxide Games and Stardock Entertainment, are back for this release too. Check out the debut trailer above. Ashes of the Singularity II is under development with a significantly expanded team compared to the original, according to today's announcement. It will be adding in a range of fresh units and gameplay systems for real-time strategy fans to dive into. More options for strategic gameplay, more intricate base building, and better enemy AI are listed as features for the new game as well. "Ten years ago, we set a new, literal benchmark for RTS games with massive battles and groundbreaking technology," said Brad Wardell, CEO of Stardock Entertainment. "With Ashes of the Singularity II, we’re raising the bar even higher, delivering strategic gameplay depth that RTS fans have always dreamed of.” The storyline of Ashes of the Singularity II will take place in 2031, with a complete single-player campaign, as well as cooperative and competitive multiplayer modes, being confirmed as features today. Moreover, a third faction is joining the fray this time, with Humans joining the fight alongside the original games' Post-Human Coalition and the Substrate. "Obviously, in the first game, the number one request was to have a human faction," adds Wardell. “Back then, we just couldn’t support having thousands of organic, walking, squishy people in the world and thus had to design in favor of machines. We’re really excited to bring the humans into the war and watch how they fare against the massive mechanical armies of the Substrate and PHC.” Ashes of the Singularity II is targeting a broad 2026 release window, with the team hoping to launch the title as the original celebrates its 10th anniversary. Its Steam store page is already up for wishlisting over here. Disclaimer: Neowin's relationship to Stardock
    • How exactly is a FREE image generation model a... Ponzi scheme?!?! I don't love all of these Gen-AI things flooding the market but there's nothing "ponzi" about it.
    • I can't decide if this is tacky or a really fun move for more casual players like myself to enjoy. I'll be curious to see how we are to fly to fictional land masses on a real globe.
  • Recent Achievements

    • One Month Later
      SamZrize earned a badge
      One Month Later
    • Week One Done
      SamZrize earned a badge
      Week One Done
    • One Year In
      SamZrize earned a badge
      One Year In
    • One Year In
      barracuda earned a badge
      One Year In
    • One Month Later
      barracuda earned a badge
      One Month Later
  • Popular Contributors

    1. 1
      +primortal
      725
    2. 2
      +FloatingFatMan
      189
    3. 3
      ATLien_0
      180
    4. 4
      Xenon
      113
    5. 5
      neufuse
      109
  • Tell a friend

    Love Neowin? Tell a friend!