473,549 Members | 2,588 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

click on a link with onClick

6 New Member
hi,

i'm trying to open a lightbox within a table cell with onClick, here is the code that works in firefox.. but it's not working in chrome.. is there a way?
or a better way to do this altogether?

Expand|Select|Wrap|Line Numbers
  1. <td onClick="document.getElementById('zorba').click()">Knye</td>
  2.  
  3. <a style="display: none;" href="knye.htm" title="Knye" id="zorba" rel="lightbox">Knye</a>
  4.  
Feb 12 '12 #1
8 1959
Dormilich
8,658 Recognized Expert Moderator Expert
what does Chrome's Error Console say?
Feb 13 '12 #2
alihaydar
6 New Member
it says:
Uncaught TypeError: Object file:///F:/1002/kunye.htm has no method 'click'
Feb 13 '12 #3
Dormilich
8,658 Recognized Expert Moderator Expert
Object file:///F:/1002/kunye.htm
that's some strange kind of object ... can you put that page on a public server?
Feb 13 '12 #4
alihaydar
6 New Member
sure;

http://kutubhane.com/deneysel/exp/1002/gezinti.htm

it's the second top link from left.. "Künye"
Feb 13 '12 #5
Dormilich
8,658 Recognized Expert Moderator Expert
according to the HTML-DOM there is indeed no click() method on the <a> element (ref.). however, Mozilla states that according to the new HTML5 specification (though I couldn't find that part) there should be and therefore Mozilla supports it. (ref.)
Feb 13 '12 #6
alihaydar
6 New Member
thank you very much..

is there any other way to call that lightbox without using <a> ?
Feb 13 '12 #7
Dormilich
8,658 Recognized Expert Moderator Expert
why don't you bind the lightbox directly to that (calling) element?
Feb 13 '12 #8
alihaydar
6 New Member
i don't know how to do that :)
Feb 13 '12 #9

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

Similar topics

4
5690
by: Blue® | last post by:
http://asianmachinetrader.com/dbase/add.htm For the "Category" field in the page above, is it possible to click on the category (in the "Show me" popup window) and have the category inserted into the field? I have searched http://developer.irt.org/script/form.htm but could not find anything related. Thanks.
17
61408
by: Mike Gratee | last post by:
Is it possible to use JavaScript to cause the browser to click a link on a page and have the browser act exactly like the user had clicked on the link directly? In other words, I need to programmatically issue a JavaScript statement which causes the browser to act just like the user clicked on a link in my page. And if that link has an...
21
4439
by: BLarche | last post by:
I am not really sure how to do this, but I need to create <DIV>'s that correspond to a given week that is clicked. So, when my ASP is generating the page, it will create the hidden divs. When a week number is clicked, I want the DIV to show up for that week next to it, like I have in the following example: ...
1
3664
by: Miroslav Stampar [MCSD.NET / Security+] | last post by:
I have a problem that is best described by following code: <a href="http://www.google.com" onclick="new Image().src=\'http:// www.example.com/process.cgi?p=1\'">Google</a> I want to call cgi script before a link is clicked. Upper example works as a standalone (AS IS), but... But, when I attach onclick event programmaticaly, clicked link...
4
4365
by: Mark Anderson | last post by:
Hi. I've had to turn an IFrame-embedded page into a an Object using the data attribute to hold the page to meet XHTML STRICT validation. The <object>'s embedded page is a query URL returning a basic HTML page to hold an <alink enclosing a thumbnail of a latest added record in a picture database. So far, so good. What I need is that clicking...
0
2301
by: GS | last post by:
IN the application I developing, I have to deal with some https website that uses JavaScript function with parameters in link to open new window when the link is clicked. The default is that the new window will We cannot process your request. Please sign in again. .... How Can I correct this, somehow intercept the click link action and...
6
15459
by: tomaz | last post by:
<SCRIPT LANGUAGE=javascript> function tdclick (ObjTD) { ArrLinks = ObjTD.getElementsByTagName ("A"); document.getElementById("link").onclick(); } </SCRIPT>
0
7461
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7730
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. ...
0
7971
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7823
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...
0
5101
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...
0
3509
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...
0
3491
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1068
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
776
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.