Jump to content

davej

Moderator
  • Posts

    3,988
  • Joined

  • Last visited

  • Days Won

    2

Posts posted by davej

  1. I'm displaying how many days it's been since a first aid event, a recordable, disabling, etc.[...] I have it all working and displaying to little smart monitors out front.
    Little smart monitors? What are you talking about? Is this a website or not?
  2. With Chrome you can right-click anywhere on the page and select Inspect Element to have the developer tools open and highlight that element in the markup, which will also show all of the CSS rules that apply to it.
    Yes I eventually did that, but I don't feel very comfortable with Chrome. I'm used to FF but FF was unstable on my machine and there were too many updates coming out constantly. In Chrome how do I find the Javascript?
  3. Why are you wondering when you could be using your browser's developer tools to inspect the elements and find out for yourself?
    Good question. I'm using Chrome and actually I think Chrome sucks, but yes I can see it's not an image.
  4. Oh, I had a typo. == rather than = So I wonder if the BBC div is actually an image?

    <html><head><title>hide abc</title><style type="text/css">div#hide{background-color: yellow;height: 200px;}div#def{background-color: green;height: 200px;}p{text-align:center;}</style><script type="text/javascript">window.onload = function(){$("btn_h").onclick = hide;$("btn_d").onclick = disp;$("btn_a").onclick = animate;}function hide(){if ($("hide").style.visibility=="hidden"){$("hide").style.visibility="visible";}else{$("hide").style.visibility="hidden";}}function disp(){if ($("hide").style.display!="none"){$("hide").style.display="none";}else{$("hide").style.display="";}}function animate(){if ($("hide").style.height!="0px"){//alert('['+$("hide").style.height+']');$("hide").style.height="0px";}else{$("hide").style.height="200px";}}function $(id){return document.getElementById(id);}</script></head><body><a href="#" id="btn_h">hide</a><a href="#" id="btn_d">display</a><a href="#" id="btn_a">animate</a><div id="hide"><p>abc</p></div><div id="def"><p>def</p></div></body></html>

  5. Ah, thanks! Somehow I never noticed the "none" option there. Excellent! Then there is the matter of animating the height. Style.height isn't working for me. Is there another trick? Thanks!

  6. Anyone worked much with Google maps? I have used Google Maps a little and have visited a site called http://www.mapmyride.com that allows arbitrary off-road paths to be plotted and stored and the associated distances to be measured. I would like to do something like that on my webpage. Thanks.

  7. I guess the intention of my original question was to ask whether something like Perl is still desirable to augment the server-side code of a website?

  8. Ok, I'm under the impression that almost all webservers use Apache or Microsoft IIS server software. The server software then interprets HTML files or somehow launches server-side code which might be Java/JSP, ASP, ASP.NET, PHP, or I don't know what else. Is CGI exactly the same thing or is it something different? Thanks

  9. Ok, I had scanned the Wikipedia entry before posting my question and my understanding was that CGI implies that the webserver is set up to launch some executable program in response to particular page accesses -- but why do this? Why not just use ordinary server-side code? Are there some things that the CGI approach is better at? Or is CGI an older, semi-obsolete approach? Thanks

  10. Over on Yahoo Answers someone posted this PL/SQL code, which was claimed to be functional:

    select max(c_id), req_id, exp_datefrom(select req_id, max(exp_date)from tablegroup by req_id) t1join(select c_id, req_id, exp_datefrom table) t2on (t1.exp_date = t2.exp_date)group by req_id, exp_date

    The stated purpose of the code is to eliminate duplicate REQ_ID rows and to select only rows with the most recent date and highest C_ID in a table of the form. C_ID | REQ_ID | EXP_DATE24 211 2012-7-1539 211 2012-8-1526 211 2012-9-2036 222 2012-9-20 What strikes me about this code is the use of a subquery in the FROM line. I have never written a subquery in that form. In fact I did not know it was possible. In SqlServer I tried this preliminary test;

    SELECT *FROM( SELECT C_ID  FROM mytable ) ;

    And it produced a syntax error. So what is the truth here?

  11. I suppose you might be able to say that anything that can be done properly with JS should be done with JS and PHP should be used only where necessary. In many cases it is best to use both JS and PHP working together.

  12. Actually JS is a bit odd. There is a substr() and a substring() and they are DIFFERENT.

    <!DOCTYPE html><html><body><script type="text/javascript">var str="0123456789";document.write(str.substring(1,4));document.write(" ");document.write(str.substr(1,4));</script></body></html>

    the output is "123 1234"

  13. I have only implemented MVC in Java. JSP pages presented the view. Submits were directed to servlets which were the controllers. "Business" classes used by the servlets were the models. In addition I wanted to have the database isolation of the 3-tier scheme so I tried to get all SQL code out of the servlets and into a dedicated DB class. I don't know if there is actually a name for trying to do both? [Models and Database] <=====>[Controller] <=====> [View]

  14. A great website is one that provides the information you need. No Photoshop necessary. Now maybe if you want a "beautiful and artistic" website you will need Photoshop and a person with artistic talent... But for most websites that just need simple resizing, cropping, thumbnailing, and tweaking of photos something as simple as Irfanview will work fine.

  15. I am working on a project for a non-profit organization and doing it out of my will to want to help. This is the website I am working on: http://oohforgood.com/
    Did you actually write this code? I am amazed that anyone could take something so simple and make such a complex mess out of it. Maybe you could delete all the Javascript and start over? EDIT- Maybe I am being too harsh. Maybe this was created using Dreamweaver? That tool often produces messy and almost unreadable code.
×
×
  • Create New...