Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About count_herout

  • Rank
  1. The rotating round-card girl problem is solved (though perhaps not in a way that will help many others). Turns out the solution is the easiest one could imagine: Scrap all the functions and most of the javascript. Although not every region of the template responds to the strange "double-dollar" function -- e.g., <td id=$$No$$..., &c. (where "$$No$$" returns an incrementing integer), this area of the template does; so, all one has to do is go back to using "img src=..." instead of "img id=..." Thus, img src="../../images/RCG$$No$$.png" (for whatever reason) does the trick. Tha
  2. Well, the question was how to place them, since right now they're all being vectored into the one slot. Apparently, this is the only thing left to fix. I was able to change the IDs to "RGC[round number]", viz., <td id="RGC$$No$$"...><a id="RGC$$No$$"...>, which is in the form, "RGC1", "RGC2", &c. So, instead of anchor "name" we have anchor id, which now begins with a letter instead of a number. Book said that was required but didn't say why.
  3. Beginner's mistake already abandoned. I examined your program. Not sure I understand it completely, but in any event, it does not look like I can use it. As I understand it, in the head, you've created several variables -- cardgirl1, cardgirl2, cardgirl3, &c. -- and assigned each to the several members of the array. No real problem there. But, it doesn't look to me like the proposal in the body is doable. The body is the template, itself, that comes with the game and allows the next frame (if there be one) to be tacked onto the page. It simply does not appear possible to add a
  4. Good question; however, in the game we're discussing, "name" always is used the same way, regardless of where it appears. In other words, you always see: <[some html] <a name=$$number$$ [some html]/>[some html]>, &c. The name increments with the round display and always is in the form, "1", "2", "3".
  5. P.S. In answer to your original question: The sports log scrolls but all on a single page. Which suggests the error might lie in the line, <td id=img><a name=$$number$$... As I understand it, such an ID is good only once per page. Perhaps that is vectoring everything into the first frame?
  6. Hit the wrong button... for(k=0; k<cardgirls.length; k++) { document.getElementById(cardgirl1).src=cardgirls[k].src; } // query: Would a dollar function be better here for returning the entire array? //Now match the two together somehow -- when(k==round-1) { document.write(cardgirl1)} ...and somehow vector the image display to the correct location.
  7. I'm away from my regular computer for the weekend (it's Mother's Day in America). I'll give both your ideas a try. The second one seems like brute force, though, since the idea is to be able to put up a girl, cheerleader, baseball, whatever, regardless of how many innings or rounds there are. If use of the anchor seemed strange, it probably was. It was used elsewhere in the template, so it was available. Wouldn't it be possible to pull the anchor name with something like getAttribute("name"), then link that somehow to the display? I've yet to try that either, but the thought crosse
  8. Yes, I agree, and that's what I need to iron out. The template has an anchor tag attached to it. Every time the template runs, the anchor increments by one. So, first time it runs, <a name="1">; second time it runs, <a name="2">; third time, <a name="3">, &c. This distinguishes each run of the template, which otherwise is identical, round to round or inning to inning. Query: How do I link this change in the anchor tag to the desired image location so that each time the function cycles, it will, indeed, vector the next image to the desired location?
  9. Yes, you are right -- in the attempted program, the elements you cite do have quotation marks around them (viz., cardgirls[0].src="../../images/RCG1.png"). Sorry if that were confusing; it is not what's causing the problem. Re the second one, I used the form in the text. I've also seen it your way without the ".src" component. The form I used worked for two other cycle functions on the same page, though both of those selected ONE random image from an array of images, viz., var j=Math.floor(Math.random()*creditbanners.length); function(){ document.getElementById(creditbanner1).s
  10. I've a beginner's problem maybe someone can help with. Imagine a game simulating a sporting event (baseball, boxing, football, &c.). The games, themselves, are divided into time periods -- innings, rounds, quarters, &c. -- and one cannot know ahead of time how many periods actually will be played. So, for example, baseball is a nine-inning game -- unless there is rain or the need for extra innings if a tie; boxing is so many rounds -- unless there is a knockout or other fight-ending incident. The simulation addresses this within the game via a template -- the template describ
  • Create New...