Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. scorpio66

    Need help on replace using regular expression

    Use an intermediate step. stringvar.replace(/££/g,'_').replace(/£/g, '€').replace(/_/g, '£');
  2. scorpio66

    calculating holidays

    Actually, the extra bank holiday was in 2002 for the Queens Golden Jubilee. They added an extra day (June 3rd) and moved the end of May holiday to June 4th for a 4 day weekend. See what I mean. Chaz
  3. scorpio66

    calculating holidays

    It's really difficult to get Easter calculations right - there is a whole page of information about calculating Easter here: http://www.cs.rutgers.edu/pub/soc.religion.christian/faq/easter-date and more here: http://www.bbc.co.uk/dna/h2g2/A653267 Actually, public holidays are a pain in...
  4. scorpio66

    How to read selected listbox value ?

    And what you really want is the value of the selected index. function fn(ele) { var selected = ele.options[ele.selectedIndex].value; alert(selected) } </script> <select id='dropdiv' onchange="fn(this)"> <option value=1>1</option> <option value=2>2</option> </select> Chaz
  5. scorpio66

    problem with array statement

    Sorry, cut and paste error. Line in loadImg should read: document.getElementById('caption').innerText = arImgData[idx][1];
  6. scorpio66

    problem with array statement

    Out of interest, why not keep your image data and caption together in a single array? var arImgData = [ ['pix01', 'comment01'] , ['pix02', 'comment02'] , ['pix03', 'comment03'] ... ] // Tell browser where to find the image var myImgSrc = "/dogdaysinla/"; // Tell browser the type of...
  7. scorpio66

    SQL Server - hide password

    All excellent points Denny. I've never considered the possibility that MS would change the hashing algorithm so that definitely deserves a star. Kate, if you do decide to use pwdencrypt (and seriously consider Denny's concerns) then you do the authentication on the server. For example...
  8. scorpio66

    SQL Server - hide password

    All excellent points Denny. I've never considered the possibility that MS would change the hashing algorithm so that definitely deserves a star. Kate, if you do decide to use pwdencrypt (and seriously consider Denny's concerns) then you do the authentication on the server. For example...
  9. scorpio66

    Rich Text Editor

    One that I use and like is FCKEditor. http://www.fckeditor.com
  10. scorpio66

    SQL Server - hide password

    Kate, There is one more thing - SQL2K supports some undocumented encryption functions which can be used to obscure the password. As stated, these are undocumented - I don't know if they're in SQL2K5. select pwdencrypt('HELLO WORLD') select pwdcompare('HELLO WORLD', encrypted_value) You'd...
  11. scorpio66

    SQL Server - hide password

    Could you not create a view containing all of the columns except your password col and lock down the original table so that no-one could select from it? That would stop someone casually looking through the passwords (except a DBA, of course) Chaz
  12. scorpio66

    Propercase?

    I have another, slightly smaller and possibly quicker function for this: CREATE FUNCTION dbo.FN_PROPER(@STR_IN NVARCHAR(4000)) RETURNS NVARCHAR(4000) AS BEGIN DECLARE @POS INT , @RETVAL NVARCHAR(4000) , @LEN INT SELECT @POS = CHARINDEX(' ', @STR_IN, 0), @RETVAL = UPPER(LEFT(@STR_IN...
  13. scorpio66

    How to model an address?

    Address TEXT ;-)
  14. scorpio66

    Need suggestions on datatypes...

    Oh, one more thing. If the definition of TBL is TBL_ID int identity, field1 datatype, field2 datatype, field3 datatype, ... status char(1) the definition of TBL_HIST we use is TBL_HIST_ID int identity, TBL_ID int, field1 datatype, field2 datatype, field3 datatype, ... status char(1) You...
  15. scorpio66

    Need suggestions on datatypes...

    bessebo, follow ptheriaults advice - honestly, it's the best way of auditing. Where I'm working we have TBL_RAW, TBL_HIST and a view TBL. TBL_RAW contains the base data, TBL_HIST the historic data. However, for this audit to work correctly you must never physically delete data. Therefore, in...
  16. scorpio66

    code won't get called! Arrrggg!!!

    I'll definitely give it a go.
  17. scorpio66

    code won't get called! Arrrggg!!!

    I don't know if this is relevant but we've had lots of problems getting drag and drop working in XP here. Nothing wrong with the code - it worked fine in W2K (slightly earlier version of IE - that might make a difference) but when we migrated to XP it all just stopped working. We ended up...
  18. scorpio66

    Create comma-delimited list from two or more combo boxes

    Glad to help. Thanks for the star. Chaz
  19. scorpio66

    &quot;Var&quot; question

    tsujis answer is a regular expression that represents what you want, but if you want to have those numbers in a structure that allows you to loop through then then put them in an array. var arItems = [1, 2, 3, 4, 5]; or alternatively var arItems = []; for (var i=startVal; i<endVal; i++)...
  20. scorpio66

    Create comma-delimited list from two or more combo boxes

    Sorry about the delay - weekend and whatever! There are several things you could do to get around this: you could have an array of valid select boxes and only use the ones that are in the array, or alternatively you could set a property in the select tag itself and check that. for example...

Part and Inventory Search

Back
Top