Support Forum Softcomplex logo
About Us  | Services  | Download  | Order  | Support  | |
| Search | Today's Posts | Stats | Board Rules | Not logged in [ Login | Register ]
go to bottom
Last active: Never

Printable Version | Subscribe | Add to Favourites   Post new thread
Author: Subject: Problem with onClick and inline Links in a table
Snoopy
Newbie

Posts: 1
Registered: 2/24/2004
Member Is Offline
posted on 2/24/2004 at 05:12 PM Reply With Quote
Problem with onClick and inline Links in a table


Hello together

I created a table with javascript calls inside the the table and an active onClick for the complete table. When i click on the area of the inside link on a row however both javascript functions will started. I tested it with alert messages inside these both functions.
the problem ist that, both function send a form submit and i am not able to decide which code should running.
did anybody have similar problems ? which solutions exist ?? hope you can help me...

Regards

Michael
View User's Profile View All Posts By User U2U Member
Dean
Newbie

Posts: 1
Registered: 11/12/2004
Member Is Offline
posted on 11/12/2004 at 03:52 PM Reply With Quote
I'm having the same problem


Does anyone know the answer to this question?

Thanks!
View User's Profile View All Posts By User U2U Member
jchastain
Newbie

Posts: 1
Registered: 11/30/2004
Member Is Offline
posted on 11/30/2004 at 03:33 AM Reply With Quote

I am running into a similar issue. The first column of my table is a checkbox, but with the onClick function in place, clicking on the form field fires the onClick function. Is it possible to limit the onClick function to certain columns, or is there a way to abort this function based upon which column was clicked?

Any help would be appreciated.

Thanks
-- Jeff Chastain
View User's Profile View All Posts By User U2U Member
kvv
Super Administrator

Posts: 86
Registered: 6/17/2003
Member Is Offline
posted on 12/16/2004 at 10:11 AM Reply With Quote

To suppress row onclick event when checkbox is clicked you can use the
following functions:
var tmp_onclick_func = '';
function suppress_onClick(rng){
tmp_onclick_func = (rng.parentNode).parentNode.onclick;
(rng.parentNode).parentNode.onclick = false;
}
function restore_onClick(rng){
(rng.parentNode).parentNode.onclick = tmp_onclick_func;
}

So checkbox in the content array should look like the following:
'<input type="checkbox" value="1" name="checkbox1"
onclick="suppress_onClick(this)" onchange="restore_onClick(this)">'
View User's Profile View All Posts By User U2U Member
Post new thread

Related Links:
Product Page
Product Demonstrations Live Demos
Simple
XP-styled
3D designed
Product Documentation Documentation
Documenation Page
Change Log
Support Forum Technical Support
Support Forum
Customer Care System
Order Now ORDER NOW!
Add to Cart
View Cart

Go To Top


Powered by XMB 1.9.1 Nexus
Developed By Aventure Media & The XMB Group © 2002-2004