• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 183
  • Last Modified:

OnClick function for tablerow excluding other links

I have a big list of items in a table... if you click the row... it will proceed to the next page... which is what i want... but i also have a icon called "stereo.jpg" which opens a popup... when you click that icon it will open the popup along with proceed to the next page.. i need it just top open the popup.


<tr id="tr3" class="cls" onClick="window.location = '/details.php?file_id=9480293027'" onMouseOver="this.className='clsover'" onMouseOut="this.className='cls'" valign="middle">
<td width="40">
      <a href="/details.php?file_id=9480293027"><img src="/images/download.jpg" border="0"></a>
      <a href="javascript:Start('http://somesite.com/preview.php?file_id=9111480258');"><img src="/images/stereo.jpg" border="0"></a>
</td>
<td><a href="/details.php?file_id=9480293027" class="link1"><b>Crazy B*tch - Buckcherry</b></a></td>
<td width="160">
blahblahb test blahblah
</td>
</tr>
0
remlab
Asked:
remlab
  • 3
  • 2
1 Solution
 
b0lsc0ttCommented:
remlab,

I'm not 100% sure this will work in your case but the easiest way to would be to add a return false at the end of the event in the anchor tag.  You would need to change the tag some to do it.  Try the code below ...

<tr id="tr3" class="cls" onClick="window.location = '/details.php?file_id=9480293027'" onMouseOver="this.className='clsover'" onMouseOut="this.className='cls'" valign="middle">
<td width="40">
     <a href="/details.php?file_id=9480293027"><img src="/images/download.jpg" border="0"></a>
     <a href="#" onclick="Start('http://somesite.com/preview.php?file_id=9111480258'); return false;"><img src="/images/stereo.jpg" border="0"></a>
</td>
<td><a href="/details.php?file_id=9480293027" class="link1"><b>Crazy B*tch - Buckcherry</b></a></td>
<td width="160">
blahblahb test blahblah
</td>
</tr>

Let me know if that doesn't work.  Let me know if you have any questions or need more information.

b0lsc0tt
0
 
remlabAuthor Commented:
nope didnt work b0lsc0tt. same result popup and next page :(
0
 
remlabAuthor Commented:
figureed it out on my own... i moved the mouse onclick to the <td> tags instead of using the table. please close question.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
b0lsc0ttCommented:
I'm glad to hear it.  You can post a message (no points required) in the Community Support topic area to have the moderators take care of this.  Make sure you include the URL of this question and let them know what you want.  I don't object and you should be able to get the points refunded.  Let me know if you have any questions.

bol
0
 
b0lsc0ttCommented:
By the way, your other open question (http:Q_22086354.html) isn't allowed.  Sorry!  I understand what you are trying to do but us experts can even get in trouble for replying.  Please delete it on your own.  You should be able to as long as noone responds.

If you want to change it you can ask for recommendation on how to find a CSS coder for pay.  You will need to leave your email address out of the message though.  That isn't allowed either.

One note, if there is an expert you have found very helpful you can click on the their name to view their profile and look to see if they have contact info there.  Some will even have info on hiring them.

Let me know if you have any questions.

bol
0
 
kodiakbearCommented:
Closed, 500 points refunded.
kb
Experts Exchange Moderator
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now