473,406 Members | 2,217 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.

How to position a DIV at a specific position when a link is clicked ?

296 100+
Hello ,

I have two DIVs .

The second DIV appears when a link present in the first DIV is clicked .

The problem is that the DIV's position is fixed .
Suppose I scroll down at the bottom and click on a link the page moves to the top to show the DIV .

How to display the DIV at that portion of the page ?
Jan 30 '07 #1
5 2197
pankajit09
296 100+
Why noone is replying ?
Jan 30 '07 #2
acoder
16,027 Expert Mod 8TB
Post the code you have so far. In your div-showing function, you need to set the position of the div to the current location.
Jan 30 '07 #3
acoder
16,027 Expert Mod 8TB
Why noone is replying ?
People can be busy with work commitments. To take time out of that to solve problems is not always easy or possible.
Jan 30 '07 #4
pankajit09
296 100+
ok tell me how to do this -->

Expand|Select|Wrap|Line Numbers
  1. document.getElementById('placeholder').style.top = "'"+y+"'";
  2.  
The integer "y" on the RHS is not working.

Please tell me how to put the integer "y" on the RHS ?
Jan 30 '07 #5
acoder
16,027 Expert Mod 8TB
Use
Expand|Select|Wrap|Line Numbers
  1. document.getElementById('placeholder').style.top = y+"px";
instead.
Jan 30 '07 #6

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

Similar topics

1
by: Mat | last post by:
How can I detect when a link has been clicked but the new page is still in the process of loading? The document.location.href property still displays the current location (understandably) not the...
1
by: Chris Leonard | last post by:
Hi. I have a number of links on my page. When I click on one of them I am scrolling in a picture from the lefthand side. I have got this to work nicely now following some suggestions made last...
4
by: Newbie | last post by:
Is it possible to set up an event handler or something else so that when *any* link on the page is clicked it 'fires-up', executes some JS and then continues to process the link that was clicked?...
5
by: junky_fellow | last post by:
What is a position independent code ? What are the basic guidelines to keep in mind while writing a position independent code ? thanx for any help ....
0
by: Oenone | last post by:
I would like to set the caret position in a (single-line) textbox to a position based on the number of pixels from the left of the control. For example, I want the caret to be positioned 50...
2
by: mmdst23 | last post by:
I'm working on a video player app, and I want to implement a trackbar that behaves like the one in Media Player, that is the cursor position moves to where the user clicked instead of moving in...
1
by: stefano.troiani | last post by:
Hi, I have a left div where there the menu is, and it is quite long, longer than the web page, so it has a scroll bar. My question is, is there a way to remember the div position once clicked...
9
by: newbiegalore | last post by:
Hello everyone :-) , Thanks to the gentle people on this group for helping me out with previous issues. :-D This time round I am facing what I perceive as a simple problem, which I have not found...
1
by: sypher04 | last post by:
Hi, new here as a member, but have visited frequently as a guest. I'm a C# developer from Canada. I primarily work on ASP.net and Pocket PC. I am currently in the process of writing a new mobile...
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?
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
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,...
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
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.