Jump to content

chadmichael

Members
  • Posts

    113
  • Joined

  • Last visited

Everything posted by chadmichael

  1. I used the following in firefox to style a background image for my body. body {background: #999 url(images/snowyGate.jpg) no-repeat scroll right bottom;} The positioning aspect of this seems to fail. It failed also when I used the background-position attribute as distinct from the background shorthand notation. Does background positioning work in firefox?
  2. Hello,When I run Tidy on my document, some CDATA structure is placed around my function. However, its commented out. What would be the purpose of this CDATA structure? Is is required for XHTML compliance? I guess its not fully required or Tidy would not have made the stuff commented out. <script type="text/javascript">//<![CDATA[ function newWindow() {foodWindow = window.open("images/snowyGate.jpg", "foodWin", "width=250,height=188")} //]]> </script> Thanks,Chad
  3. The global variable works becuase the context of the function, when invoked by the setTimeout, is the global context. However, this doesn't work for me because I might have multiple instances of this code running in a page. This creates concurrency issues for global variables. The string literal doesn't work for me either becuase, in my real code, I'm passing a more complex object as my parameter. Thanks for the suggestions though.
  4. I was interested in using the setInterval ( func, interval, args ). This one takes a function instead of a string based bit of code to execute. However, I only works once and then throws an error about useless invocation of setInterval due to missing quotes? Does anyone have any experience using the setInterval function with this signature, such as <script language="javascript"> setInterval ( nextSlide ( slideShow1 ), 2000l ); </script>
  5. Thanks. But I understand the functional difference in the two. What I need to understand is how to pass a parameter to the call via the string based parameter of setTimeout. Check out the code I posted above.
  6. Hello.I'm trying to invoke a function repeatedly by putting a setTimeout call in my function that calls itself. The problem is that I can't repass my parameters due to the string based nature of the argument to the setTimeout function. I also have found that the setTimeout uses the Window context for its context; otherwise you could expect the function to find the parameterOne still defined in the call stack, which would be adequate. My code is below and if you run it you will see that "parameterOne" is undefined on the second iteration. How do I pass it in? <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><head><title>Test Page</title><script language="JavaScript">function doSomething( parameterOne ){ alert ( "parameterOne = " + parameterOne ); setTimeout ( "doSomething( parameterOne)", 2000 );}doSomething ( "hello" );</script></head><body>EMTPY HTML BODY</body></html>
  7. Ali,Hey, I speak some Turkish actually. Not well, but I spent three months in Turkiye and taught computer science to some high school kids in a science school Gumushane. Anyway, how do you get the button images and mouseover highlighting? I don't see this in the code. Okay, I just changed the background color and I recoginize that its just the normal buttons as styled by the browser. The navy background makes them look so different. Anyway,Cool calculator.
  8. I want to have an image based link / button. The link / button will fire a javascript function. I'm trying to discern if there is an obvious choice / preference between using a button element or an anchor element for this. Any suggestions or info regarding the implications of this decision?
  9. If russia is in Europe, then Turkey is surely in Europe. BUt this is a political discussion I think.
  10. I've got a couple of divs, a content and navigation column, floated left and right in a container div. On explorer, my stuff gets super wide, far wider than the content itself. A horizonatal scroll bar appears and I must go way to the right to find the end of the stuff. Note, the content doesn't go nearly as far as the blocks themselves do. Anyone have any ideas? I'll try to mock up some code that duplicates the problem; I'm unable to post the actual code right now. Sorry.
  11. Well, I took the advise above and added the <br style="clear:both"/> at the end of the containing div. Now, on explorer, the container doesn't grow to the height of the two contained divs. So, when I color the container div and expect it to color the entire thing, it just colors a horizontal band across the top of the two contained divs.Check out the following code.HTML page <html><head><link rel="stylesheet" type="text/css"href="blogTest.css" /></head><body><div id="content"> <!-- Entries --> <div id="blogEntries" > <p>askdfjasdkf ksjdfkjksa dfksajd fkjasdfkja sdfkj askdf jkas ddd ddddd ddddd ddddd dddddd dddddddddd ddddd ddddddddd ddddd</p> </div><!-- END of ENTRIES DIV --> <!-- START NAVIGATION COLUMN ---> <div id="blogMenu" > <p>asdkfj kjasdkfj skdjk kjds ksjdkf flkjakd fkajd fkajsdkj fkjasd kjf kajdsf kkkk kkkkk kkk k kkkkk kkkkk kkkk kkkk kkk kk</p> </div><!-- END of NAV COLUMN --><br style="clear: both"/> </div></body></html> And the style sheet: blogTest.css #content { background-color: #ddeecc; }#blogMenu{ width:30%; float:right;padding-right: 2%;}#blogEntries { width:65%; float:left;padding-right: 2%; } So, in firefox the coloring of the container div colors all the contained divs. But on explorer it doesn't? Does anyone know what to do?
  12. Well, I figured out why, but I'm wondering if you can protect agains the cause. I noticed that if the text doesn't have any white spaces, it just doesn't break and flows out of the containing block. Surely this can be stopped. Any suggestions?
  13. I'm no expert, but from what I know of search engines, and there business model, I think its very important to have well structured html. The search engines don't want to be tricked into finding pages, they want to be able to understand the content and categorize it in a manner that is appropriate for the actual content. The only way they can understand your content is if your document yields well structured data. I think this will increasingly be more important. For starters, make sure you use good html. Perhaps someone has more knowledge of further topics in semantic web stuff, i.e. the way you can make the semantic meaning of your pages more evident to the parsers that the bots use.
  14. yoshida,I don't know if your interested, but the whole frame thing where you get the pleasure of not having to pull down the whole page again can be accomplished in a very powerful and elegant way with Ajax type stuff. If you got the intereste you should check out a book; its a way to pull down stuff without refershing the whole page, so, in essence, you can pull down new info for just a div. And you can do a lot more.
  15. Thanks for the info. Is there some logic to this behaviour? I mean, it seems to me that they should stay in the containing div no matter what.
  16. It seems that a div goes to the full width of the container block if you don't specify a width, what about the height?How can I make the height take up the full space of the container block?
  17. Hello,I've got a question about layout flow. I've simplified my question with a code sample. The code sample simply has three divs. One div is a container div to hold the other two. My desired effect is to have a menu element to the left and then a view element that I will float right. This will leave the menu and the view elements next to each other. I've got this to work but encountered an unexpected behavour. The unexpected behavour pertains to the ordering ( with in the markup ) of the two divs that I place inside the containing div. If I put the floated div first, everything works. If I put the floated div second, it ends up getting kicked out of the contianer div altogether, and that's no good!The markup. <html><head><link rel="stylesheet" type="text/css"href="floatTest.css" /> </head><body bgcolor="777777"> <div id="container"> <div id="fullView"> </div> <div id="menu"> </div> </div></body></html> The Stylesheet: "floatTest.css" #container { background-color: #88ff33;}#menu{ background-color: #ffff22; width: 150px; height: 500px; overflow:auto;}#fullView { background-color: #991133; width: 300px; height: 300px; float:right;} Can someone explain why this happens?
  18. Can i include a javascript file in the body of an html document? I'm sure its not a best practice, but does it work?
  19. I thought innerHTML was deprecated. Is it still the prefferred and best supported method for dynamically changing text?
  20. I want to change the text of an html element when a javascript function is called. Let's say my initial html contains<div id="title"> <b>Little house on the Priarie</b> </div>How do I progammatically change the text of this to someother title? Thanks
  21. I found the CSS attribute "white-space" that is supposed to replace the stuff like <nobr> and pre.To force the overflow of my thumbnails to proceed in a horizontal fashion, I set the style of the encompassing div to include white-space: nowrap works great!
  22. chadmichael

    how do

    If you use CSS it will save you loads of time, even by the end of this week! The tutorial on the W3Schools site takes less than an hour. Just trying to save you some time that I wasted
  23. I'm working on a site that has a slideshow embedded in a page full of other content. The content does not fit on a single page unfortunately. When you visit the page you must scroll down a bit to see the slide show, then when the next request comes back to show the next slide, the whole page jumps back up when the rendering occurs. Is it possible to force the page to render to the same location? Any insights?
×
×
  • Create New...