473,486 Members | 2,427 Online
Bytes | Software Development & Data Engineering Community
Create 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 1957
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
5684
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...
17
61398
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...
21
4426
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...
1
3655
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...
4
4360
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...
0
2294
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...
6
15454
by: tomaz | last post by:
<SCRIPT LANGUAGE=javascript> function tdclick (ObjTD) { ArrLinks = ObjTD.getElementsByTagName ("A"); document.getElementById("link").onclick(); } </SCRIPT>
0
7175
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
7330
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...
1
4865
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...
0
4559
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...
0
3070
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...
0
3070
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1378
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 ...
1
598
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
262
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...

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.