Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

td onclick Popup window and a href link in same cell 1

Status
Not open for further replies.

emozley

Technical User
Jan 14, 2003
769
GB
Hi,

I've got a calendar made up of a series of cells. I am trying to make it so you can click on anywhere in the cell to create a new event but if you click on an event that is already in the cell you will get a popup window with details of that event.

The problem is when you hover over the link you can see in the status bar that it wants to load the correct page (editeventform.asp) however this is being over ridden by

onclick="editeventform('createeventform.asp?EventDate=01/04/2008&CategoryCode=BANK');return false;"

If I right click and open the link in a new tab it works if that is relevant.

Any ideas?

Thanks very much

Ed


<td width="20%" class="lightcalcelloff"
onmouseover="this.className='lightcalcellon'" onmouseout="this.className='lightcalcelloff'"

onclick="editeventform('createeventform.asp?EventDate=01/04/2008&CategoryCode=BANK');return false;"
>
<span class="text2">
<b><a href='createeventform.asp?eventdate=01/04/2008&CategoryCode=BANK' class='menusub3lt' onclick='createevent(this.href);return false;'>1</a></b><br>

<a href='editeventform.asp?EventID=684' class='text2' onclick='editeventform(this.href);return false;'>Pension Issues For Transactional Lawyers<br></a>
</td>
 
you have an onclick set for the <td> tag, so anywhere you click on the TD tag it will triger the onclick event.

You seem to want to apply two different functions to the same onclick event, which obviously is going to cause you problems. How does it know which onclick event you mean.

Why don't you use the 'ondblclick' event for on and 'onclick' event for the other?

would that do what you want.

"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!
 
A brilliant idea - perfect!

Thanks very much indeed.

Ed
 
no probs, glad I could help :)

"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top