Jump to content

jesh

Members
  • Posts

    2,293
  • Joined

  • Last visited

Everything posted by jesh

  1. jesh

    libxslt function

    I don't fully understand how the PHP engine handles conditionals. In C#, however, I understand that the compiler optimizes some code and using a switch can be MUCH faster than a series of if ... else if ... elses.Maybe something like this would increase performance: switch($option){ case "removeEmptyXMLNS": // code to handle this case. break; case "someothervalue": // code to handle "someothervalue". break; default: // code to handle all other cases. break;}
  2. jesh

    libxslt function

    Does this link help? http://us2.php.net/foreach
  3. jesh

    search engine

    These two articles helped me understand how to build a search engine for a couple of sites that I built. They are mostly in C# and .NET, but even if you don't happen to know C# or use .NET, they talk about how search engines work and can provide insight for your project.http://www.codeproject.com/aspnet/Searcharoo.asphttp://www.codeproject.com/aspnet/Spideroo.asp
  4. I must admit that I haven't used Access in 10 years so I don't know if you can run SQL queries in it, but here is what a sample INSERT query could look like: INSERT INTO PlayerStatistics (FirstName, LastName, Hits, AtBats, BattingAverage) VALUES('Albert', 'Einstein', 37, 56, 37 / 56) If you are entering data into the table using a query, you can calculate the average right in the query using division ("/"). If you are not using an INSERT query, maybe there's a setting on the table itself that you could specify the default value as being [Hits]/[AtBats] so when a record is added to the table, the default value is the value in the Hits column divided by the value in the AtBats column.
  5. jesh

    dragdrop

    As far as I know, the only way you're going to be able to accomplish this is to use client-side code (e.g. javascript) to write a bunch of event handlers (onmousedown, onmousemove, onmouseup, etc.).Try this for a start: http://www.codeproject.com/aspnet/drag_drop.aspThis Google search may help too.The only other advice I can offer is that you write a hidden input value with the names/ids of the images that get dropped into your box so that when you submit the form, your codebehind will know which images were placed in the box.Good luck!
  6. I agree. You might also want to read about SQL injection, if you don't already know about it.
  7. I guess I'm lucky, our library system rules! 744 results found for "programming".Our library system encourages us to offer suggestions on books that they should purchase to make the library better. Maybe yours does too.Enough about the libraries from me though.
  8. I'd say they were two separate tasks. How is a web designer to know what content the client wants/needs on the website? If the client wants you to include copy, then I would suggest that be a separate charge.
  9. Are you certain that you are using .NET 2.0? I don't know about Visual Web Developer, but in Visual Studio, when I create a new Web Site, most, if not all, of the System DLLs are referenced automatically and don't show up in my bin directory.The Page class is in System.Web.UI, and all of the web controls (like <asp:Button />) are in System.Web.UI.WebControls. If you are able to access those classes then you have System.Web referenced correctly. Therefore, if you have System.Web referenced correctly, then you should be able to access ClientScriptManager unless you are not using 2.0.
  10. I didn't find it to be too difficult. You'll have to use server-side script to make it work - PHP, ASP, ASP.NET, etc. Check out the tutorial here: http://www.w3schools.com/php/php_file_upload.aspYou can also try searching Google for "file upload tutorial".
  11. I'm reading AI for Game Developers. Needed a break from all the .NET stuff. :)I agree that you can find a lot of information on the internet, but sometimes you can't beat a well written book. If you don't want to purchase one, check it out at your local library. I haven't bought a book in years.
  12. Temporarily modify your code to debug it. Rather than: ...$add_member = $db_object->query($insert);if (DB::isError($add_member)) {die($add_member->getMessage());} Try: ...echo $insert;//$add_member = $db_object->query($insert);//if (DB::isError($add_member)) {//die($add_member->getMessage());//} This will display on the screen the SQL INSERT command that you are attempting to run against the database. Looking at that command as it would appear to the database may help you determine where the error is.
  13. jesh

    Constant Refreshing

    Try looking into the setTimeout and setInterval functions in the HTML DOM. You can use these to set up a timer on your page that executes a code block (i.e. an AJAX call) at certain intervals.
  14. You are SO close. This: var namevalue1= pair1.split("="); window.alert("Welcome, "+namevalue[1]+"!"); Should be: var namevalue1= pair1.split("="); window.alert("Welcome, "+namevalue1[1]+"!"); You set a variable named "namevalue1", so, when you try to run the alert, you need to reference "namevalue1" rather than "namevalue".
  15. These two sites have helped me:http://www.regular-expressions.info/http://regexlib.com/Good luck!
  16. jesh

    ActiveX problem

    As far as I know, ActiveX will only function on Internet Explorer. As for why you don't recieve that message when you test it at home, it's most likely because the security settings on your browser are different for pages that come from your own computer than for pages that you access on the internet.
  17. Try this link: http://www.google.com/search?hl=en&q=p...+based+greeting
  18. Whenever I get an error like this, it's usually because I'm missing something simple like quotes around a parameter or I've forgotten to place a comma in there. Try echo'ing out the SQL to your screen rather than running it on your DB to see if it is formatted correctly. Then, you might try manually running the SQL against your DB to see if the database generates a more helpfull error message than PHP does.
  19. Yeah, I call the "less than" (<) and "greater than" (>) symbols "angle brackets".
  20. It's .NET. The file you are looking for is System.Web.dll.
  21. Watch out for case sensitivity. datagrid1.DataSource = ds.Tables("categorylist").defaultview; should be: datagrid1.DataSource = ds.Tables("categorylist").DefaultView;
  22. Check out this link for how to do UPDATEs in SQL.It should be more like: UPDATE Login SET Password = '" + TEXTBOX3.Text + "' WHERE UserID = " + userID Beware of SQL injections though.
  23. jesh

    Add new record

    I develop in C# rather than VB so I may be mistaken here, but it looks like you have "UploadButton_Click" set up to fire on both the OnClick event of the button and also on the OnLoad event of the Page. (Handles Me.Load).When you have an event like the OnClick event, the OnLoad event of the page fires first followed by the OnClick event. Since your event handler is set up to handle both the OnClick event and the OnLoad event of the Page, it's running twice.
  24. I can't believe I forgot about that. heh.
  25. You could have some javascript do it for you:java script: function addTargets(){ var anchors = document.getElementsByTagName("a"); var count = anchors.length; for(var i = 0; i < count; i++) { anchors[i].target = "_blank"; }}window.onload = addTargets; Save that to a js file and include it in your code: <script type="text/javascript" src="myfile.js"></script>
×
×
  • Create New...