Jump to content


DHTML Pop-up Constraints


5 replies to this topic

#1 The Creator

    Young Padawan

  • Members
  • Pip
  • 115 posts
  • Gender:Male
  • Location:England
  • Interests:Computers, Music, Technology, Sport

Posted 20 May 2007 - 08:08 AM

Basically ive made a pop-up using DHTML and i can drag it around the page...

but...

i want to constrain it to either some positions or a table...

is this possible?

if so, how?

#2 Case

    Young Padawan

  • Members
  • Pip
  • 207 posts
  • Gender:Male
  • Location:Birmingham, UK

Posted 20 May 2007 - 08:19 AM

If you used a DIV I think you can constrain it using CSS and Javascript but if you have actually made a new window (with its own instance in the toolbar) then its controlled by the OS and nothing to do with the browser.

#3 The Creator

    Young Padawan

  • Members
  • Pip
  • 115 posts
  • Gender:Male
  • Location:England
  • Interests:Computers, Music, Technology, Sport

Posted 20 May 2007 - 08:22 AM

yea, its got its own div...

do u knw the css code to constrain it?

#4 Case

    Young Padawan

  • Members
  • Pip
  • 207 posts
  • Gender:Male
  • Location:Birmingham, UK

Posted 20 May 2007 - 09:02 AM

Its its just a DIV Z-indexed above the rest of the page then you are going to need to use Javascript to detect when the "top" and "left" absolute position values change and if they get to the limits of what you want reset it back to the limit.

My JS isnt very good at the moment so I can't give you the code. Try searching for "css javascript positioning" in google for something on it.

#5 The Creator

    Young Padawan

  • Members
  • Pip
  • 115 posts
  • Gender:Male
  • Location:England
  • Interests:Computers, Music, Technology, Sport

Posted 20 May 2007 - 11:29 AM

Well, i need the code, so can someone do it for me?

pwese XD

#6 Case

    Young Padawan

  • Members
  • Pip
  • 207 posts
  • Gender:Male
  • Location:Birmingham, UK

Posted 20 May 2007 - 11:52 AM

This should be some help to you:
CSS Positioning and Dynamic Re-Positioning by Robert Crooks (Adobe)





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users