473,811 Members | 3,151 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to fire an onclick to an anchor

1 New Member
I have a form with 3 sections. there are 2 links on each sections to go to one of the others sections. (named anchors)
Because the different sections may contain data or not, I want the form to open on the section that contain data, automatically.
I need a script that fire the onclick of the links, depending of the data.
I don't want the focus() effect, because the sections are not on the top. I want the same response that clicking the link.
The script will be running onload...

Thank you for yours tips.
Dec 3 '07 #1
1 2010
acoder
16,027 Recognized Expert Moderator MVP
Welcome to TSDN!

Can you post your code, so that we have a better idea of the problem.
Dec 3 '07 #2

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

Similar topics

6
2139
by: Dufus | last post by:
<a id="MyDataList__ctl1_edit_Button" NAME="edit_Button" OnMousedown="EnableValidators('editGroup_');" href="javascript:{if (typeof(Page_ClientValidate) != 'function' || Page_ClientValidate()) __doPostBack('MyDataList$_ctl1$edit_Button','')} ">Edit</a> In the above example, the function 'EnableValidators' does not fire. Has it got something to do with the fact the id and name attributes are different? I am unable to make the id and name...
3
19016
by: Hans | last post by:
If I for example have two anchor tags <a id="anchor1" onclick=".....">Link1</a> <a id="anchor2" onclick=".....">Link2</a> In a javascript function I get the id of an anchor tag and I want to execute the onclick event (or some other event on this element). Is it possible? I would like something like this
4
16427
by: Jerry Sievers | last post by:
JS Programmers, "I'm a server-side coder PHP, Postgres etc... My question; Given the following anchor <a href="http://www.somesite.com/somefile.html">link text</a> Is there a way to code an onClick event to call a script and pass the href URL and link text? That is; We'd like to put an identical piece of JS code into each
13
2538
by: Logos | last post by:
There seems to be a serious difference between how FF an IE handle an anchor with an href containing a # and an onclick event. If the onclick event returns false, IE does not change window.location.href to include the #. FF does. (eg) <a href="#moo" onclick="alert('moo'); return false;"> After clicking in IE, location bar in browser shows "www.moo.cow/index.htm". After clicking in FF, location bar in browser shows
11
3038
by: GaryB | last post by:
Hi Guys, I've been battling with this one for hours - I hope that you can help me! My code modifies the <aon a page, from a standard document link into a link with a tailored onclick event. It works perfectly (assigning the correct images and the correct onclick events to the correct <atags):
9
3230
by: monomaniac21 | last post by:
hi all i want to use hyperlinks to 'load' content by changing the display of div tags. the problem i have is that unless i specify a href the anchor does not change the mouse pointer on hover even if display is set to block. it only look changes when there is a href there. but if i have a href there then when i click it will load the page, which i dont want. how can i get the anchor to look like a proper link where the users pointer...
9
1701
by: Todd | last post by:
Hello We have a page that loads a long list of things. Each row has an onclick where you can open a window for more information. When you do that the parent page refreshes to the top of the page....so if you were near the bottom, you would have to scroll back down to get back to where you were. I would like the parent page to hold its position when the child opens. Any suggestions? Thank You
5
3203
by: Meadock | last post by:
Here's an example of what i'm trying to do. At www.webpage.com/page1.php, there's a link that points to an anchor at www.webpage.com/page2.php. The syntax is: <a href="page2.php#anchor">Link</a> Now on page2.php I have that anchor placed inside a header tag. The syntax is: <h2><a name="anchor">Header</a></h2> The link on page1.php to the anchor on page2.php works just find in IE7. But it doesn't work in firefox. The link takes the...
1
812
by: pbd22 | last post by:
Hi. I am trying to add an "onclick" 'event to an anchor tag and this is proving harder than I imagined. The anchor HAS NO ID. And, there will be tons of them on the page. So, I cannot access it via FindControl. the tag is nested as such:
0
9734
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10652
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10137
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9211
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7673
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6895
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5561
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4346
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3874
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.