473,396 Members | 1,914 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,396 software developers and data experts.

How to find the position of a link

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 week but with one problem
still remaining.

When I click the link the browser jumps to the top of the page and scrolls
my picture in from there. The reason is this is what I'm telling it to do by
setting the top property. How can I find the top property of the link I
clicked on so I can set it correctly ?

Here is a copy of the link

<A href="#" onClick="layername=makeName('<%Response.Write("pic ture" &
rcd)%>'); yhop=0; ygoal=10; xhop=40; xgoal=100; slide();">Click me</A>

I've tried:

<A id='<%Response.Write("link" & rcd)%>' href="#"
onClick="layername=makeName('<%Response.Write("pic ture" & rcd)%>'); yhop=0;
ygoal=10; xhop=40; xgoal=100; slide();">Click me</A>

and checked for the link(x).style.top but this doesn't work!!

Any help would be appreciated.

TIA.

Chris
Jul 20 '05 #1
1 3550
VK
Anchor "#" referencing the top of the current document.
Use "javascript:void(0)" instead to nullify the link:

<a href="javascript:void(0)" onClick="...">
Chris Leonard <c.*************@btinternet.com> wrote in message
news:bi**********@titan.btinternet.com...
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 week but with one problem
still remaining.

When I click the link the browser jumps to the top of the page and scrolls
my picture in from there. The reason is this is what I'm telling it to do by setting the top property. How can I find the top property of the link I
clicked on so I can set it correctly ?

Here is a copy of the link

<A href="#" onClick="layername=makeName('<%Response.Write("pic ture" &
rcd)%>'); yhop=0; ygoal=10; xhop=40; xgoal=100; slide();">Click me</A>

I've tried:

<A id='<%Response.Write("link" & rcd)%>' href="#"
onClick="layername=makeName('<%Response.Write("pic ture" & rcd)%>'); yhop=0; ygoal=10; xhop=40; xgoal=100; slide();">Click me</A>

and checked for the link(x).style.top but this doesn't work!!

Any help would be appreciated.

TIA.

Chris

Jul 20 '05 #2

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

Similar topics

4
by: Matt | last post by:
When the user resize the browser, the "Frequently Used Link" and "Table 1" and "Table 2" will shift to the left hand side, but table position is unchanged. I really have no idea how to fix that. I...
5
by: CMAR | last post by:
I have been having a problem styling a page, which you can see live at my test site: Designer Page (http://home.ne.rr.com/thespar/) (Ignore the missing pictures, which have not been uploaded.)...
2
by: glutinous | last post by:
I'm assuming that this is not possible (I haven't found a way), but if there's one thing I know for sure, one shouldn't assume anything about what people know how to do on this NG... Enough...
3
by: chris ciotti | last post by:
Hello all - I'm trying to position content at the bottom of a page (I'd like to anchor it there). The majority of the code was generated using Photoshop CS and then hand edited. I'm having...
1
by: louissan | last post by:
Hey all, I've been fighting with IE5/6 because of its being SO slow for displaying onmouseover effects and even pseudo classes such as :hover! Here is a code example: <div id="menu"> <a...
1
by: Anna K. | last post by:
Hi Experts, I'm new to JavaScript and web-based apps development, so I'll tell you right off that I don't really know my way around it as of yet. I'm trying to create a code library set with...
2
by: Martin Geisler | last post by:
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) iD8DBQBDNmLx6nfwy35F3TgRAtjIAJ9ryEjr0kaaEapRD0z1bHQYmKi+1wCdEOZC /wY2033SyIVl0za07v8RMkk= =6BZ+ -----END PGP SIGNATURE-----
2
by: agbee1 | last post by:
Hello: I've finally made the effort to ween myself from overly using tables and use CSS for my positioning. However, I am having a problem with my navigational menu properly aligning in Firefox,...
2
by: everly | last post by:
Hi, I'm helping my friends band and making their MySpace. I messed something up and I can't figure out what it is. Everything is all out of whack on the bottom half of the page. The comments...
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: 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
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
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,...

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.