Solved

OnClick function for tablerow excluding other links

Posted on 2006-11-17
6
172 Views
Last Modified: 2008-03-17
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
Comment
Question by:remlab
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 54

Expert Comment

by:b0lsc0tt
ID: 17966794
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
 

Author Comment

by:remlab
ID: 17967497
nope didnt work b0lsc0tt. same result popup and next page :(
0
 

Author Comment

by:remlab
ID: 18097659
figureed it out on my own... i moved the mouse onclick to the <td> tags instead of using the table. please close question.
0
PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

 
LVL 54

Expert Comment

by:b0lsc0tt
ID: 18097975
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
 
LVL 54

Expert Comment

by:b0lsc0tt
ID: 18098046
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
 
LVL 1

Accepted Solution

by:
kodiakbear earned 0 total points
ID: 18098170
Closed, 500 points refunded.
kb
Experts Exchange Moderator
0

Featured Post

Technology Partners: 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!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Accordion won't close correctly 5 14
Jquery 7 33
Link Anchor Not working 9 51
null, truthy, falsey confusion 25 33
In Part 1 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7849-Hex-Maze.html) we covered the hexagonal maze basics -- how the cells are represented in a JavaScript array and how the maze is displayed.  In this part, we'…
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question