Jump to content

Corbeau

Members
  • Content Count

    11
  • Joined

  • Last visited

Community Reputation

0 Neutral

About Corbeau

  • Rank
    Newbie
  1. Like I said, this is a drastically simplified version of what I'm trying to do. To expand on it a bit, I'm trying to make this click-on-a-cell trigger a lot more stuff and was hoping this example would show me roughly how to do it. Basically, yeah, it's a game where the table is a part of a (much) larger map; when click happens, coordinates that were clicked on are used to move the map (ship is constantly in the centre), recalculate new coordinates, put into "visual range" (into the table on the screen) everything that needs to be put there from the database and offer additional options de
  2. Sorry, didn't mean to sound daft. I will definitely look into it. But considering the time I have at hand, it will take a lot more time than I had planned. That's what I meant by "mess": other things I'll have to reconsider. Thanks again.
  3. Gh, exactly like i said.... Bigger mess than I could possibly imagine. Thanks.
  4. Hello. I have a feeling this will end up in a much bigger mess than I can possibly imagine, but we have nothing to lose but our ignorance, so what the . I will explain what I need on a drastically simplified example. Suppose I have a basic table 2x2 that I draw using JavaScript. Furthermore, I use a function because the table will be a bit dynamic, with input parameters. One of the cells contains "X", others are empty. xmax and ymax are the number of rows and columns x0 and y0 are "coordinates" of the cell that contains an X. So, the code for this is: <script> function
  5. Thanks. It helped. And the additional advice will come in handy
  6. I have a strong desire to smash the desk with my forehead. So, I have this: .widget { color: #000000; border-top: 1px dotted #b3b3b3; font-size: 18px; font-size: 1.8rem; line-height: 1.6666666666em; margin: 0 0 1.6666666666em; overflow: hidden; padding: 1.6666666666em 0 0 0; font-style: italic; text-shadow: 1px 1px 4px;} The problem? Changing the colour doesn't work! I change the number to #ff0000 and it remains black. The rest of the block is good, I played with the font-style, shadow and size and all those work. To add insult to injury, exactly below it I have: .widget-title { colo
  7. Nope. Still "not a function". And I did check for reserved words, it seems "rad" is legit. Is there any difference if the function is placed in the <head> and the rest of the code in <body>? I tried both separately and all within <body>, neither worked.
  8. Hello. I have a problem that's making me feel like an idiot. I have this function. The exact code is maybe not that important because, if I copy/paste the exact code into the program, it is working (but still appending it just in case). However, when I put it in front of the program, I get "TypeError: rad is not a function". There are other functions so I tried putting him in the same SCRIPT tags, tried to separate them, neither is working. <script>function rad(x,y){ var temp=0; if ((y==0) || ((Math.abs(x)/(Math.abs(y)+0.01))>=2)) temp=Math.abs(x); else temp=Math.abs
  9. Actually, on a closer look, if I do it like this, I don't even need the JavaScript? At least not for this?
  10. /me slaps himself around a bit with a large trout Thank you. /me bangs his head against the wall a few times Yeah, feeling better. Much, much better.
  11. Hello. I have a table with a cell that says: --- <td id="hex" rowspan=2 height='66' background='hex.gif' onmouseover="hex-active()" onmouseout="hex-normal()"></td>--- Also, predifined functions within main document <head> tags: ---- <head><script>function hex-active(){document.getElementById("hex").innerHTML="<img src=hex-active.gif>";}function hex-normal(){document.getElementById("hex").innerHTML="";}</script></head> ---- According to everything I know, it should be working. But it isn't. Completely dead. Anyone got any idea what could
×
×
  • Create New...