Jump to content

houssam_ballout

Members
  • Posts

    199
  • Joined

  • Last visited

houssam_ballout's Achievements

Member

Member (2/7)

2

Reputation

  1. Hello,I had this issue in mysql:I had made a query which select data from 3 tables, using UNION command, and its getting the results, when I want to display the results in a php page , I need to know the table that each record had been retrieved from, how can I do it?Thanks in advance
  2. I meant, when I select an item from the dopdown it will show 2 textboxes, and when I select another dropdown it will hide those 2 textboxesThanks
  3. Is there any example available to help me
  4. Hello,i had the following scenario in which I need your help: I had a drop down box: <option value="client-all.php">1</option><option value="supplier-all.php">2</option><option value="koshofat.php">3</option> <input type="button" onClick="location=document.koshofat.URL.options[document.koshofat.URL.selectedIndex].value;" value="go" class="button2"> its good for 1, 2 , but I need to show 2 textboxes when the user select 3 and hide them when user select different than 3 (After that when he click submit, I will get the values through POST variables), I need your help in scripting my issue? Thanks in advance
  5. Here it is, problem now, is that when I write 4-5 or 4-5- I need to autocomple the year with the current year: var dtCh= "-";var minYear=1900;var maxYear=2100;function isInteger(s){ var i; for (i = 0; i < s.length; i++){ // Check that current character is number. var c = s.charAt(i); if (((c < "0") || (c > "9"))) return false; } // All characters are numbers. return true;}function stripCharsInBag(s, bag){ var i; var returnString = ""; // Search through string's characters one by one. // If character is not in bag, append to returnString. for (i = 0; i < s.length; i++){ var c = s.charAt(i); if (bag.indexOf© == -1) returnString += c; } return returnString;}function daysInFebruary (year){ // February has 29 days in any year evenly divisible by four, // EXCEPT for centurial years which are not also divisible by 400. return (((year % 4 == 0) && ( (!(year % 100 == 0)) || (year % 400 == 0))) ? 29 : 28 );}function DaysArray(n) { for (var i = 1; i <= n; i++) { this = 31 if (i==4 || i==6 || i==9 || i==11) {this = 30} if (i==2) {this = 29} } return this}function isDate(dtStr){ var daysInMonth = DaysArray(12) var pos1=dtStr.indexOf(dtCh) var pos2=dtStr.indexOf(dtCh,pos1+1) var strDay=dtStr.substring(0,pos1) var strMonth=dtStr.substring(pos1+1,pos2) var strYear=dtStr.substring(pos2+1) strYr=strYear if (strDay.charAt(0)=="0" && strDay.length>1) strDay=strDay.substring(1) if (strMonth.charAt(0)=="0" && strMonth.length>1) strMonth=strMonth.substring(1) for (var i = 1; i <= 3; i++) { if (strYr.charAt(0)=="0" && strYr.length>1) strYr=strYr.substring(1) } month=parseInt(strMonth) day=parseInt(strDay) year=parseInt(strYr) if (pos1==-1 || pos2==-1){ alert("The date format should be : dd-mm-yyyy") return false } if (strMonth.length<1 || month<1 || month>12){ alert("Please enter a valid month") return false } if (strDay.length<1 || day<1 || day>31 || (month==2 && day>daysInFebruary(year)) || day > daysInMonth[month]){ alert("Please enter a valid day") return false } if (strYear.length != 4 || year==0 || year<minYear || year>maxYear){ alert("Please enter a valid 4 digit year between "+minYear+" and "+maxYear) return false } if (dtStr.indexOf(dtCh,pos2+1)!=-1 || isInteger(stripCharsInBag(dtStr, dtCh))==false){ alert("Please enter a valid date") return false }return true}function ValidateForm(){ var dt=document.getElementById("ADate");var currentTime4 = new Date()var month4 = currentTime4.getMonth() + 1var day4 = currentTime4.getDate()var year4 = currentTime4.getFullYear()var finalDate4 = ( day4 + "-" + month4 + "-" + year4 );if(dt.value == ''){ dt.value = finalDate4; }if (isDate(dt.value)==false) { dt.focus() return false } return true}/*function ValidateForm(){ var dt=document.frmSample.txtDate if (isDate(dt.value)==false){ dt.focus() return false } return true }*/
  6. I had the code for the validation dd-mm-yyyy but the auto complete is missing & when the field is empty is also missing!Thanks
  7. Hello,I need the help on the following in order to validate date on my form (validation is onBlur): - validation on form date format: dd-mm-yyyy , when I go to next field, if the date field is empty, it will be filled with today's date, and I write 9-3 and go to next field it will automatically write 9-3-2013 (where is 2013 is the current year), finally, if the date is not valid then user can't go to another field, focus must be go back to date field. Help is much appreciated. Thanks in advance
  8. Hello,I had a html form that I want to let enter key to act as TAB key in html form. Thanks in advance
  9. Hello,I need your help on the following:I had a page that I want to make it password protected using Javascript which is fine, but I want to be able to change the password when I login to that page, is that possible? Thanks
  10. I know that, but I mean when the page is scrolling down, when it reaches the end I want to make it go back again....
  11. Hello All,Please can u help me, I've this script it works fine, but what I need is that when the page reaches the end, I want to make it begin from the first and so on Thanks in advance This is the code:<script language="javascript">function pageScroll() { window.scrollBy(0,50); // horizontal and vertical scroll increments scrolldelay = setTimeout('pageScroll()',1000); // scrolls every 100 milliseconds}</script>
  12. Hello all, I am customizing a script that is used on rollover for images, but it wont work , can u help me with it? (there is no problem with images)The code is: <HTML><HEAD><TITLE>Multiple Rollovers</TITLE><script LANGUAGE = "JavaScript"><!--if (document.images) {img1On = new Image();img1On.src = "1.jpg"; // Active Imagesimg2On = new Image();img20n.src = "2.jpg";img1Off = new Image();img1Off.src = "2.jpg"; // Inactive Imagesimg2Off = new Image();img20ff.src = "1.jpg";//img1ad = new Image(); //img1ad.src = "1.jpg"; // Information Images//img2ad = new Image();//img2ad.src = "2.jpg";}// Function to 'activate' images.function imgOn(imgName) {if (document.images) {document[imgName].src = eval(imgName + "on.src");//document["holder"].src = eval(imgName + "ad.src");}} // Function to 'deactivate' images. function imgOff(imgName) {if (document.images) {document[imgName].src = eval(imgName + "off.src");//document["holder"].src = "1.jpg";}}// --></SCRIPT> </HEAD> <BODY BGCOLOR = "#FFFFFF"><!-- 1st Rollover --> <a HREF="jukebox.html" onMouseOver = "imgOn('imgl')" onMouseOut = "imgOff('img1')"> <IMG NAME= "imgl" BORDER="0" HEIGHT="24" WIDTH="100" SRC="1.jpg"></A><!-- 2nd Rollover --> <a HREF="videos.html" onMouseOver = "imgOn('img2')" onMouseOut = "imgOff('img2')"><IMG NAME= "img2" BORDER="0" HEIGHT="24" WIDTH="100" SRC="2.jpg"></A></BODY> </HTML>
  13. hello allhow could i export an outlook signature from MS OUtlook 2003?THanks
  14. Hello all,Can someone helps me with the following idea:I've a page with input boxes on it,and beside each input box there is a link that will display a small help text, and that help text will be extracted from the xml file according to the id of the text box, so , I need more help on that , How could i extract data in HTML page from an xml page?Thanks
×
×
  • Create New...