Jump to content

a href-Linkable Table Cells ?


bbr

Recommended Posts

i've tried, and failed :) i can make the mouse cursor change when you hover it over a table cell, so it looks like you can click the cell.i'd like to make the table cell, act like it was a plain a href.but.. i cant seem to include the "target" frame.http://blackrune.atspace.com/in the left navigation panel, i started with just plain straightforward images in the table.ofcourse this loads wayyyy too slow, and it's not very versatile if you need new buttons.Now i got a table, with each cell showing a single image background, and the text on top of it, centered as a plain html link. (works good enough for now)i'd like to change it so that when you mouseover the cell, the link becomes active and turns red, and when you click the link or the cell, the main frame gets updated apropiately.i got some code lying around that sort of allowed this,, but when you click the cell, there was no way i could get the " target=main " to pass trough, and only when you clicked the actual link did it work properly.(reminds himself to post the code)and,, go figure,, the Links dont highlight red on the Mac unless you visit them at least once... :)

Link to post
Share on other sites

I know exactly what you mean, and what you want.Unfortunately, the code you request is the "Highlight cells" one form iFusion (some code forum for Invisionfree) and it is too big for me to remember and to write it down here. You might want to become a member of the forums over there though, so you can do it all by your self :)And of cours LOADS of other professional scripts, codes, hacks and RPGs, all work fine for InvisionFree boards, but most of them adjustable for own website use.Go here: http://s9.invisionfree.com/iFusionAnd have fun :)

Link to post
Share on other sites

I would suggest you get rid of any anchors in your cells and have plain text, then for each <td> have:onmouseover="this.style.color='red'"onmouseout="this.style.color='white'"onclick="location.href='somepage.htm'"and then in css, make each cell use the pointer cursor... but it sounds like you already had that one figured out.

Link to post
Share on other sites

Well, that should work, but the script I mean searches for that anchor link and gices the cell the target of that link, but automatically. Then you won't have to give each of those cells the onmouseover etc attributes, which is painly already :( So :DI would check it out if I were you :)But I searched it for you and here it is, without you allowing to delete or edit its credits!

<script>/*Highlight Cells v1.2Created by WebworldxThanks to RazorIce's Highlight Cells v3*/var statusMessage = "iFusion Forum";var iBackColor = "F5F5F5";function iMouseOver(obj){var iAddition=''obj.style.backgroundColor=iBackColorobj.style.cursor='hand'; if(obj.className.match('2')) call=1 else call = 0if(obj.getElementsByTagName('A')[call].href.match(/showuser=/i)){ iAddition +='Last Post by: '} else if (obj.getElementsByTagName('A')[call].href.match(/showforum=/i) ){ iAddition +='Forum Title: '} elseĀ  { iAddition +='Topic Title: '} window.status=iAddition + obj.getElementsByTagName('A')[call].innerHTML;}var iTD= document.getElementsByTagName('TD');for (i=0;i<iTD.length;i++){if (iTD.className.match(/row(2|4)/i) && iTD.innerHTML.match(/(showforum|showtopic)=/i) ){ iTD.onmouseover=function(){ iMouseOver(this) } iTD.onmouseout=function(){ this.style.backgroundColor=""; window.status=statusMessage;} iTD.onclick = function(){ window.location.href = this.getElementsByTagName('A')[0].href;}}}window.status = statusMessage</script>
This is EXACTLY the code James (WWX) wrote by himself, the owner of iFusion. It should be adjusted to you website before completely working properly, as it was meant for InvisionFree Board users.Good Luck, all you need is this code :) You might remove some little code that is unuseful to you :) Exept for the copyright!
Link to post
Share on other sites
onmouseover="this.style.color='red'"onmouseout="this.style.color='white'"onclick="location.href='somepage.htm'"
i think i had something like that before,, but couldnt figure out how to make the link direct to: "target=main"as well as a different htm page.i'l have to look at the ifusion when i get home.but i can see where it's used : http://s9.invisionfree.com/iFusion/index.php?act=idx
Link to post
Share on other sites
  • 2 weeks later...
i think i had something like that before,, but couldnt figure out how to make the link direct to: "target=main"as well as a different htm page.i'l have to look at the ifusion when i get home.but i can see where it's used : http://s9.invisionfree.com/iFusion/index.php?act=idx

onclick="window.open('page.htm','main')"onclick='window.open("page.htm","main")'

Just so you can use either single or double quotes... :)

Link to post
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...