Jump to content

gagan22

Members
  • Posts

    15
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

gagan22's Achievements

Member

Member (2/5)

0

Reputation

  1. Hi all, I am in confusion i am using calender in one of my application but calender is working in all other browser but it is not working in IE . In this i am using two calender in form one calender for date from and other calender for date to . What problem can be there . Please help me . It is very urgent for me. I am sending code of calender which i am using <tr> <td> </td> <td align="left"><input name="datefrom" id="datefrom" style="WIDTH: 75px" value="" maxlength="12" readonly="" /> <img src="Images/Calendar.gif" width="22" height="24" onClick="dp_cal.toggle();"></td> <td> </td> <td><input name="dateto" id="dateto" style="WIDTH: 75px" value="" maxlength="12" readonly="" /> <img src="Images/Calendar.gif" width="22" height="24" onClick="dp_cal1.toggle();"></td> </tr> and this is code of function: <script type="text/javascript"> /*You can also place this code in a separate file and link to it like epoch_classes.js*/ var bas_cal,dp_cal,ms_cal,dp_cal1; window.onload = function () { dp_cal = new Epoch('epoch_popup','popup',document.getElementById('datefrom')); dp_cal1 = new Epoch('epoch_popup','popup',document.getElementById('dateto')); }; </script> If you have any other code for calender in which calender application can work. Please suggest me for that. Thanks, Gagan
  2. Hi all, I am in confusion i am using calender in one of my application but calender is working in all other browser but it is not working in IE . In this i am using two calender in form one calender for date from and other calender for date to . What problem can be there . Please help me . It is very urgent for me. I am sending code of calender which i am using <tr> <td> </td> <td align="left"><input name="datefrom" id="datefrom" style="WIDTH: 75px" value="" maxlength="12" readonly="" /> <img src="Images/Calendar.gif" width="22" height="24" onClick="dp_cal.toggle();"></td> <td> </td> <td><input name="dateto" id="dateto" style="WIDTH: 75px" value="" maxlength="12" readonly="" /> <img src="Images/Calendar.gif" width="22" height="24" onClick="dp_cal1.toggle();"></td> </tr> and this is code of function: <script type="text/javascript"> /*You can also place this code in a separate file and link to it like epoch_classes.js*/ var bas_cal,dp_cal,ms_cal,dp_cal1; window.onload = function () { dp_cal = new Epoch('epoch_popup','popup',document.getElementById('datefrom')); dp_cal1 = new Epoch('epoch_popup','popup',document.getElementById('dateto')); }; </script> If you have any other code for calender in which calender application can work. Please suggest me for that. Thanks, Gagan
  3. HI all, I am working on one application using ajax.When i m clicking on a link . I want that page should not be refresh . How i can do this in ajax. I know onclick event i will have to use for this. But how in correct way i should use this. I do not know . So please help me to solve this problem. Like i have two pages contact page and index page. when i am in index page when i click on contact page ,then page will not be refresh and when i will be in contact page and when i will click on index page link then again page will not be refresh . Both of page will fetch some data from database. Please help me to do this work. I am doing such type of work first time. Please help me to provide ajax code for this. If it is not possible then please suggest me. Thanks, gagan
  4. Hi all, I want to upload a notepad text file or ms-word file from my system to a server using php code. Means I want to upload a text file that can be in .txt, .xls or .doc format. That i want to upload from my system and after uploading that file and i want to show that file on that page from which page i am uploading that file. All of this i want to do using PHP code . I know just i should use move_upload function for image uploading . But i do not know in correct function of uploading text files how i should use this function. So Please help me to solve this problem. I will be thankful of that person who will he help me on this topic because i am doing such type of work first time. So please help me. Thanks, Gagan
  5. Hi, thanks for giving so much help,I have used which code is given by you. But that is also not running well. Actually i am getting some problem that my code is not calling our ajax function. What reason can be behind this. Please suggest me. Thanks
  6. thanks for help, ok sir i am sending code of forms which in which i am using this ajax code. Please try to understand my problem. So that i can solve it . But i am not getting value from 2nd select box when i am selecting first select box. Here is the code for index.php file----------- <html> <head> <title>Roshan's Triple Ajax dropdown code</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <script language="javascript" type="text/javascript"> function getXMLHTTP() { //fuction to return the xml http object var xmlhttp=false; try{ xmlhttp=new XMLHttpRequest(); } catch(e) { try{ xmlhttp= new ActiveXObject("Microsoft.XMLHTTP"); } catch(e){ try{ xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); } catch(e1){ xmlhttp=false; } } } return xmlhttp; } function getState(countryId) { var strURL="findState.php?country="+countryId; var req = getXMLHTTP(); if (req) { req.onreadystatechange = function() { if (req.readyState == 4) { // only if "OK" if (req.status == 200) { document.getElementById('statediv').innerHTML=req.responseText; } else { alert("There was a problem while using XMLHTTP:\n" + req.statusText); } } } req.open("GET", strURL, true); req.send(null); } } function getCity(countryId,stateId) { var strURL="findCity.php?country="+countryId+"&state="+stateId; var req = getXMLHTTP(); if (req) { req.onreadystatechange = function() { if (req.readyState == 4) { // only if "OK" if (req.status == 200) { document.getElementById('citydiv').innerHTML=req.responseText; } else { alert("There was a problem while using XMLHTTP:\n" + req.statusText); } } } req.open("GET", strURL, true); req.send(null); } } </script> </head> <body> <form method="post" action="" name="form1"> <table width="60%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="150">Country</td> <td width="150"><select name="country" onChange="getState(this.value)"> <option value="">Select Country</option> <option value="1">USA</option> <option value="2">Canada</option> </select></td> </tr> <tr style=""> <td>State<? echo $country=intval($_GET['country']);?></td> <td ><div id="statediv"><select name="state"> <option>Select Country First</option> </select></div></td> </tr> <tr style=""> <td>City</td> <td ><div id="citydiv"><select name="city"> <option>Select State First</option> </select></div></td> </tr> <tr> <td> </td> <td> </td> </tr> <tr> <td> </td> <td> </td> </tr> </table> </form> </body> </html> and this is code for findState.php page........... <?php echo $country=intval($_GET['country']); echo $name=$country; $link = mysql_connect('localhost', 'root', ''); //changet the configuration in required if (!$link) { die('Could not connect: ' . mysql_error()); } else echo "Successfully connected with database."; mysql_select_db('db_ajax'); echo $query="SELECT id,statename FROM state WHERE countryid='$country'"; echo "<br>"; echo $result = mysql_query($query,$link) or die('Query failed. ' . mysql_error()); echo "<select name=state onchange=getCity($country,this.value)>"; echo "<option>Select State </option>"; while($row=mysql_fetch_array($result,MYSQL_BOTH)) { echo "<option value=$row[id]>$row[statename]</option>";} echo "</select>"; ?> here when i am trying to slect country from first select box after selecting first box which country come under the selected country . It is not showing value of state. when i am trying to print the $_GET['country'] it gives 0 why ??? so please help me to solve this . i will be very thankful to you. Thanks
  7. hi all, I am using this ajax code which i am sending here. For making a application for multiple selects. But when i am selecting first drop down box value then it is showing blank value regarding that it should show some value which come under first select box. please help me where is i am wrong . But when i am using this code this is not working very well. Please help me to solve this problem. I will be very thankful to that person. Because last some days i am facing this problem .But i am unable to solve this. Thanks
  8. Hi all, I have made 2 drop down box naming client, project . All values in this drop down box are coming from database. I am fetching all value through sql query. First drop down box is showing all client which are in database. Second drop down box is also showing all project which are in database. For example, I have three client whose name are sam,due,joy. Each of have these have different project . Like sam have project like pro2, pro3 and due have DTL,Pro1 and joy have pro5,CMM,PPC like this. Now problem is that when i select First client from drop down then it should only show that project in second drop down box which project come under first client .But this is showing all projects which exists in database. I do not know what event i will have to use for this . As i think like onchange or onselect event and what type of code i will have to use for these events. So how i can do this in javascript code. Please help me. Thanks, Gagan
  9. Hi all, I have made 2 drop down box naming client, project . All values in this drop down box are coming from database. I am fetching all value through sql query. First drop down box is showing all client which are in database. Second drop down box is also showing all project which are in database. For example, I have three client whose name are sam,due,joy. Each of have these have different project . Like sam have project like pro2, pro3 and due have DTL,Pro1 and joy have pro5,CMM,PPC like this. Now problem is that when i select First client from drop down then it should only show that project in second drop down box which project come under first client .But this is showing all projects which exists in database. I do not know what event i will have to use for this . As i think like onchange or onselect event and what type of code i will have to use for these events. So how i can do this . Please help me. Thanks, Gagan
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.