Jump to content

aspnetguy

Members
  • Posts

    6,787
  • Joined

  • Last visited

Everything posted by aspnetguy

  1. To elaborate on question 2. You need to understand that there are 2 methods of programming; object oriented and procedural. Procedural is just breaking your code into chucnks and functions, the code runs in a linear fashion, like: doFunction1();doFunction2()ldoFunction3(), etc, etc This works well for simple scripts that don't need to repeat the same tasks alot, Object oriented is different. To make code reuse easy you would use an object (in your case the Date object). There are functions and properties assigned to the Date object in the JS core. So when you say var d = new Date() you are transferring a copy of the functions and properties in Date to d.You can also make your own objects, like: //my objectfunction myObject(){ this.param1 = "property value"; this.func1 = function() { return "function value"; }}//create instance of myObjectvar obj = new myObject()//obj now has the proptery param1 and the function funct1//so I can do thisalert(obj.param1); //-> "property value"alert(obj.func1()); //-> "function value" hope that helps
  2. JavaScript is a client side programming language that ultimately spits out HTML. It is mostly for making sites more interactive (i.e TreeViews, Drag and Drop, etc) and flashy.Chances are if you are more interested in the "front-end" design then JS might not interest you but it will help you desaign more impressive layouts.
  3. look at the page source that is generated. Look at the first line (the doctype tag) this is what the page was meant to validate to. If there is no doctype then you are probably out of luck on validation.
  4. not sure about safari but for in loops in general can have problems when the Array and Object objects have been extended.My recommendation is stick with good old for loops
  5. well what did you write in document.write()???
  6. The PHP 4.4.4 installer is super easy to install but is not as good as PHP 5.2.0 zip package but 5.2 is much harder to install. Don't use the 5.2 installer as it will not enable MySql for you.
  7. what operating system do you have?
  8. you need to learn a server side language like PHP and SQL, this forum is for help on your scripts not to get them written for you.
  9. 1. Yes you can, the following will not work document.write("<font size="4" face="arial" color="blue">Whee!</font>"); it is wrong because it uses double quotes in double quotes. The follow 2 examples will work. document.write('<font size="4" face="arial" color="blue">Whee!</font>'); document.write("<font size=\"4\" face=\"arial\" color=\"blue\">Whee!</font>"); 2. Date() is an object, new is creating a new instance of the Date object in the specified variable.3. Try this <script type="text/javascript"><!--// this will make a message// appear if it is before noonvar d = new Date();var time = d.getHours();if (time < 12){ message();}function message(){ alert("Hey!");}//--></script>
  10. in which browser does it not show properly? Can you give us link to an example?
  11. either you need to use server side scripting or use a free counter off the web.
  12. Try reading the tutorials at www.w3schools.com, they are your teacher.
  13. Thanks, hopefully I can scrap together some time to work on it soon
  14. Your project is obviously configured for a MAC. Either change the configuration or start a new project and make sure it is configurated correctly. Are you using the Console Application Project?Or if you cut and pasted some code it may have been for MACs and will not work on windows.
  15. no honestly people get scared of C++ because it is so complex, but its complexity is what makes it so powerful. Just keep at it and it will get easier. After a while you'll forget why you thought it was hard
  16. first can you explain what your diffrent searches are? maybe it would be best to create a SP for each search and pass the SP name into the function aswell.
  17. No problem and welcome to the torture we call C++
  18. aspnetguy

    Whoa...

    true, but I am refering to things as they are now. Even when when they exercise in space it doesn't stop the deteriation of their muscles (from lack of use) it only slows the process.
  19. A Console Application is a program that runs in DOS (or other OS command line) so if that is what you want/need then use a Console Project. If you want a application with Windows, etc use Windows Application Project, this will use Win32 library.As for using namespace std; I would use it on each program unless you want to do this std::cout, etc for every std command
  20. not sure what to tell you, I never had any problems. Try an reinstall (not redownload). I am afraid simple and C++ do not go together. I think you will find VC++ is one of the simplest programs for C++, you could also try DevC++ it is pretty good. Most libraries provide a "DevPak" which is an aquto installer of the library for DevC++.
  21. So your program should look something like this#include <iostream>using namespace std;int main(){ cout << "Hello World!"; return 0;}
  22. HTML <input type="text" id="secForCountDown"/> <input type="button" value="Start" onclick="start()"/><br/><br/><input type="text" id="countDown"/> JS var sec = null;function start(){ try { if(sec == null) sec = parseInt(document.getElementById('secForCountDown').value); sec--; if(sec > 0) setTimeout(start, 1000); } catch(err){ alert(err.description + '\n\nCount down failed!'); } } Something like that. I didn't test it so it may have errors
  23. ok I misunderstood I didn't realise you were opening an existing project. It should be <iostream> not <iostream.h>
  24. aspnetguy

    Whoa...

    Except for the fact that their muscles would turn to jello
  25. If condition1 Then FillGridReg("param1")End IfIf condition2 Then FillGridReg("param2")End IfSub FillGridReg(param As String) Dim GetDataset As New GeneralReaderQuery(Constants.DATACCESSLINK, _ "STOREDPROCNAME", _ param, _ txtSearch.Text) Me.GrdVehicles.DataSource = GetDataset.FetchDataSet1Param GrdVehicles.DataBind()End Sub
×
×
  • Create New...