473,385 Members | 2,210 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,385 software developers and data experts.

Loose Focus/no Focus onclick set focus to nothing/opening a page where there is none!

200 100+
Hi, I would like to do the following.

I have an href where onclick the focus is on the href:
I got it to change focus to another object but i don't really want that.

It must be as if the user clicked nothing. The href is what i use for my tooltip so it's only surppose to work onmouseover!

This is the jscript:
onClick="document.getElementById('__Submit').focus();"

The __Submit' is another object - i' setting the focus to


XSLT code i'm using:

Expand|Select|Wrap|Line Numbers
  1. <a>         
  2. <xsl:attribute name='href'>#</xsl:attribute>
  3. <xsl:attribute name='rel'>ttip_<xsl:value-of select='@name' /></xsl:attribute>
  4. <xsl:attribute name='onClick'>document.getElementById('__Submit').focus();</xsl:attribute>
  5.  <img src="images/help.jpg" align="texttop" style='border : none;'></img>
  6. </a>
  7.  
Please Help!

Regards
Jan 19 '08 #1
2 3296
ismailc
200 100+
I found that i had to add the onBlur as it did not work without that!

code:
Expand|Select|Wrap|Line Numbers
  1. <a style="outline-style:none; cursor:default;">
  2. <xsl:attribute name='href'>#</xsl:attribute>
  3. <xsl:attribute name='rel'>ttip_<xsl:value-of select='@name' /></xsl:attribute>
  4. <xsl:attribute name='onClick'>this.blur();return false;</xsl:attribute> 
  5. <img src="images/help.jpg" align="texttop" border="0" style='border : none; cursor:default; outline-style:none;'></img>
  6. </a>

Regards
Jan 21 '08 #2
acoder
16,027 Expert Mod 8TB
Thanks for posting the solution. Just wondering, though, why you need this behaviour.

Please remember to use code tags when posting code. Thanks!
Jan 21 '08 #3

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

Similar topics

2
by: Fred Snider | last post by:
Help! Opening a new window using the window.open( ) command works great for opening new windows and having them on top and having the focus. The window.focus command brings any existing...
9
by: Randell D. | last post by:
Folks, I'm working on a contact name/address database whereby a slimed down list is shown in the main window. When a record is selected, the complete record is displayed in a new window via a...
31
by: Benno Bös | last post by:
If I use the following construct in the frame "main" for a link to an extern site: <A HREF="http://www.any.xy" TARGET="extern"> the Browser is creating the window "extern", loading the page...
7
by: mcanedo | last post by:
Hi: I have several text elements in a form. Some of they are filled by the user, and then some are automatically filled based on the user input. Therefore I do not want the user to be able to...
2
by: sck10 | last post by:
Hello, I have a content page (I am using a Master Page) that has a control "ddlRequestType". In my code behind, I am using the following to create an image and assign JavaScript to it that...
4
by: PK9 | last post by:
I have a button at the top of my page that I have an onClick event handler for which makes some new controls (at the bottom of my page) visible. When the user clicks the button I make the new...
16
by: Stuart | last post by:
I have a page where I utilise the left and right cursor keys to change an image, also on this page is a groups of radio buttons, unfortunately when a radio button is clicked the focus for the...
6
by: Nx | last post by:
i've got it all working nicely in firefox, but whenever i test it in IE none of the onclick events are triggered. i'm using an xsl to transform an rss feed into a photogallery. when i try to...
4
by: pablorp80 | last post by:
Hello, Here is what I need: I need the focus and the cursor set to a textbox named txtGT, every time no matter if it is the first page load or whether it is a postback. Here is the problem: I...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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?
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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,...

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.