Jump to content

JasonDavis

Member
  • Posts

    23
  • Joined

  • Last visited

Everything posted by JasonDavis

  1. Hey Ben, thanks for always answering! The tutorial is here: http://www.w3schools.com/ajax/tryit.asp?filename=tryajax_first I used their code in place of mine, and it works: http://www.jasonrobertdavis.net/ajax2/ I must have been making a syntax error. I agree the placement of the GET doesn't make sense, but I attributed it to me not knowing what I was doing yet.. Even after using their code it doesn't work locally on Chrome and FF - only when I upload it to my server. And IE throws an ActiveX warning. I'm going to abandon using Ajax for the site I wanted to use it on - if I can't develop locally and have to worry about IE users getting errors, forget it. Dianikol85 - I don't know jQuery, I'm still a noob at this. But if you have a suggestion on how to use jQuery to dynamically load parts of a page I'd love to see a resource! I'm hitting Google right now. Thanks again, guys.
  2. Hi all, I'm trying to learn how to perform an AJAX request. Here's my sample project: http://www.jasonrobertdavis.net/ajax1/ There are three files: index.html, ajax.js, and ajax.txt. I'm just trying to load some text from ajax.txt. I added an alert dialog box that says "see this?" to troubleshoot - and it's popping up several times. I would expect it to pop up just once as the mrAjax onreadystatechange function runs and replaces my div text. Also when running this on my local browser I get this error: XMLHttpRequest cannot load file://(shortened)/ajax.txt. Cross origin requests are only supported for HTTP. ajax.js:30Uncaught Error: NETWORK_ERR: XMLHttpRequest Exception 101 Not sure what I'm doing wrong.. Thanks!
  3. I was still confusing myself on this issue, so I did some research and was able to find a corner border solution that I can understand. However, the site is not rendering correctly in IE. It looks fine in Chrome and Firefox. Any ideas? Site: www.jasonrobertdavis.net/cc
  4. Yea, I'm hesitant to use CSS3 to do this because of the legacy IE users. I've done it before, but this is a redesign of an existing site that uses corners. The corners were previously accomplished with tables, so I need to trash that method. Ben, thanks for the clarity on 2 and 3. So essentially, with that, we are applying TWO background images in different positions to the same DIV, right? Kind of a sneaky workaround to do that?
  5. Hi all, please reference my site for my issue: http://www.jasonrobertdavis.net/cc/ I used this site ( http://www.roundedcornr.com/ ) to generate some curved borders for myself, and realized in the process I'm missing something fundamental about CSS classes and DIVs. The HTML and CSS works properly, but I'm not satisfied to use someone else's code until I understand why this works. I cleaned it all up and still didn't get why it works. Questions: The HTML code only has DIVs for roundedcornr_top, roundedcornr_bottom, and roundedcornr_content. How on earth are the rest of the curved borders even showing up? After the roundedcornr_bottom DIV in the HTML code, there is a blank DIV section. If I remove that, the bottom right corner vanishes. Why? If nothing is in the DIV, how is it even doing anything? In the CSS code, there are two classes that have the word DIV after them (.roundedcornr_top div and .roundedcornr_bottom div). What is that all about? What does using the word DIV in a class definition in CSS mean? Thanks all for any help. Jason
  6. Yep, I use Silver at Dreamhosting. Also, I second Google Analytics. Awesome tool.
  7. Agree with Ben on GoDaddy - steer clear! This is going to sound weird, but I have used the same host since 2005 - it's in England, and definitely not well-known. In fact, the site looks a tad.. sketchy But it's cheap, and offers a huge amount of free stuff via CPanel - WordPress installs, SQL installs, Wikis, Ruby, etc. Their support is also good - I get an email response in a few hours on average. Take a look - I love them: http://www.dream-hosting.co.uk/
  8. JasonDavis

    Functions

    Hey JZL, are you sure just a giant list of functions is going to get you into coding? It might help to know the language first. I'm a complete Javascript noob, and I really like this book: http://www.amazon.com/Head-First-JavaScript-Michael-Morrison/dp/0596527748 The Head First series has an interesting philosophy on how to help you learn, vs. traditional books. It's full of silly graphics, drawings, and diagrams. Anyway, it's really helping me. Except that I'm hung up on pulling DOM objects out of HTML, which is an unanswered question in another forum post, lol.. Good luck!
  9. Hi everyone, Please reference this drop down menu that's broken: http://www.dinosaurindustries.com/menu/menu.html I have an unordered list with entries for types of dinosaurs. All fields except the top one are hidden. When I mouseover, I am trying to use a JavaScript function to change the visibility of the other list items to visible. function unhideChildren(parentid, childtype) { var parentAsElement = document.getElementById(parentid); var arrayOfChildren = parentAsElement.getElementsByTagName(childtype); var childCount = arrayOfChildren.length; for (i=0; i<=childCount; i++) { arrayOfChildren[i].style.visibility = "visible;" } } I think my issue is that when I run that for loop, the arrayOfChildren is just an array of list items, and I can't directly access the style property on them. But I'm not sure what to do about that.. Thanks!
  10. Brilliant! Thanks! Do you have a recommended debug tool to use, that told you the error so easily?
  11. Hi all, I'm a complete Javascript newbie trying to write a basic script: http://www.wvconfidential.com/temp/ All I'm trying to do is convert different types of flour from cups to grams. As you can see my constants indicate the weight equivalent for 1 cup converted to grams. Any ideas what I'm doing wrong? Thanks! Code of index.html: <html> <head> <title>The Flour Converter</title> <script type="text/javascript"> function convert() { const ALMOND = 112; const AMARANTH = 120; var almondCups = parseFloat(document.getElementById("almondcups").value); var amaranthCups = parseFloat(document.getElementById("amaranthcups").value); if (isNaN(almondCups)) almondCups = 0; if (isNaN(amaranthCups)) amaranthCups = 0; var almondGrams = almondCups * ALMOND; var amaranthGrams = amaranthCups * AMARANTH; document.getElementById("almondgrams").value = almondGrams.toFixed(2); document.getElementById("amaranthgrams").value = amaranthGrams.toFixed(2); } </script> </head> <body> <form name="input"> Almond flour in cups: <input type="text" id="almondcups" name="almondcups" /> Equivalent in grams: <input type="text" id="almondgrams" name="almondgrams" /> <br> Amaranth flour: <input type="text" id="amaranthflour" name="amaranthflour" /> Equivalent in grams: <input type="text" id="amaranthgrams" name="amaranthgrams" /> <br> <input type="button" value="Calculate!" onclick="convert();" /> </form> </body> </html>
  12. I agree with Andrea. One thing that has been extremely helpful to me as I've learned HTML and CSS is Google Chrome's "inspect element" tool. If you're more of a Firefox person I believe Firebug can do the same thing. Look at this screenshot from when I inspected that element of your site. See how Chrome is convinced your RSS image is 300x58? Something must not be closed prior to that.
  13. As always, THANKS! That did the trick. If you refresh your cache the page loads correctly: http://www.wvconfidential.com/test/ So a couple questions: why did that work? I understand the space problem. However, why did removing the height from the footer fix that part? And what does 'clear: both' have to do with anything? Just trying to understand. Andrea, about the <br> and &nbsp issue - what do I do for that part? Should I make those images a <div> as well, and give them their own padding, etc? Thanks!
  14. Hi all, I'm still trying to polish up my first hand-coded site using CSS. Here it is: http://www.wvconfidential.com/test/ So a few things are obviously wrong. Firstly, my mainframe element stretches out to the entire width of the page on Firefox. On Chrome and IE, it seems to look okay. Next, as you can see, my footer element is overlaying the reviews in all browsers. And third, more of a minor thing, in IE, I'm getting an ActiveX security warning regarding the "hack" that I tried to install in order to get the curved borders. Apparently IE doesn't natively support this. Anyone have a better way? Thanks!
  15. Also another error in the code is your target, which should read: target="_blank" You have a dash instead of equals, so the hyperlink is using the current window instead.
  16. It looks like your image source is not closed, and also, why is part of the URL pasted again at the end before you close the hyperlink? What if you change <a href="http://marketmoodforecast.com/wordpress/?feed=rss2"><img src="http://www.marketmoodforecast.com/wordpress/wp-content/themes/genesis-2/images/rss-icon.png" Target-"_blank" alt="Subscribe to RSS" align="center" border="0"http://marketmoodforecast.com/wordpress/wp-content/themes/genesis-2</a> to <a href="http://marketmoodforecast.com/wordpress/?feed=rss2"><img src="http://www.marketmoodforecast.com/wordpress/wp-content/themes/genesis-2/images/rss-icon.png" Target-"_blank" alt="Subscribe to RSS" align="center" border="0"></a>
  17. Thanks Eric, that did the trick! I also applied a margin-right to space them out nicely.
  18. Hi again, I can start a new thread if needed, but since you guys have been such a great resource in here, I thought I would show you my progress and ask another question. I've uploaded my site here: http://www.wvconfidential.com/test/ The problem I'm currently having is the three purple boxes with matching divs: blog, philosophy and book. Why do they appear underneath each other? I didn't make them absolute like the other elements. So my questions are: 1. How to fix the boxes to make them side-by-side under the top bar, and 2. Am I doing things right from a CSS standpoint so far? Thanks! Let me know if I should start a new thread since this has now deviated from the original question.
  19. Wow, thanks for the quick responses! Using padding:0; margin:0; works either with the * global setting or by placing it in the body section. But I notice when I put it in the leftbar section, it doesn't work. Why is that? Wouldn't it override the browser settings there as well?
  20. Hi, I'm Jason. I'm a systems engineer and a certified Microsoft Certified IT Professional: Enterprise Admin. I design websites on the side for fun, but always in Dreamweaver. Time to learn how to code them by hand!

  21. Hi all, I just finished the CSS tutorials on here. They were very helpful. I've been coding in Dreamweaver for years but am just now trying to learn to build pages from scratch in text. I'm trying to do that below, and I'm having a couple issues. I'm using this code for my HTML: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title>School Climate</title> <link href="style.css" rel="stylesheet" type="text/css"> </head> <body> <div id="leftbar"> </div> </body> </html> and I'm using this code for my CSS: #leftbar { position: absolute; width: 120 px; height: 100%; border-right: 1px solid white; background-color: #543a5c; } body { background-color: #fffdee; } Two things are not happening as I want. 1. I'm trying to get the left bar snug up against the left side of the browser with no space showing. I've tried setting padding, border and margin all to zero, and nothing seems to change. I still see a little background between the top and left side (but not the bottom, interestingly). 2. The border-right isn't working. I'm not sure why. I had it working at one point while I was playing around, but it seems to have stopped. I increased the size to 4px to make sure I was actually able to see it, but it still wasn't there. Any suggestions? Thanks!
  22. Thanks Andrea - the code got cutoff when I pasted it from my stylesheet. That explanation makes sense, I'll fool around with the absolute element to get a feel for how it works. That's what I was missing. Wickham - thanks, I pasted wrong from the tutorial. That answers my question!
  23. Hi all, I sent this question to Stefan regarding the CSS tutorial. He suggested I post it here. Hope someone can help! I have one question regarding part 2 (http://www.csstutorial.net/css_tutorial_part2.php) - I still don't quite understand what makes the navigation show up on the left side of the page, and what makes the content show up on the right. I changed the <div> locations in the HTML as suggested, and of course you're right - it doesn't change what the page looks like. I can't wrap my head around that - I assume it has something to do with the navigation section having a defined size and the centerDoc section only having a padding size defined? I'd love to figure that out. Thanks again! Jason Here's the CSS for your quick reference: #navigation { position: absolute; width: 210px; height: 600px; margin-top: 0px; border-right: 1px solid #C6EC8C; font-weight: normal; } #centerDoc { position: absolute; padding: 0 0 20px 235px; /*top right bottom left*/ margin-top: 50px;
×
×
  • Create New...