Solved

OnClick function for tablerow excluding other links

Posted on 2006-11-17
6
168 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
  • 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
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 
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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

I've been trying to accomplish this for a while and it just struck me yesterday how to accomplish this task. I have done searches all over the internet looking for ways to email pages from my applications and finally I have done it!!! Every single s…
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
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…

743 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now