Jump to content

aniltc

New Members
  • Posts

    6
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

aniltc's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. hi all I have some problems with php and Prototype.I am trying to implement listbox population (second dropdown box values depend on first dropdown) using php,Mysql and Prototype.But i have no idea how to implement . I hope you have sucessfully done this, please show me an example Thanks & Regards ANIL
  2. hi all iam new to ajax . I am facing some problem.i am not able to put the div in the correct postion in the program (actualy i don't know where to put the div in this program.Now i have given the div for all pages.) The aim of the program is when i click on a picture (i am getting around 6 images from server) without reload the page I want to display that image in the center of the page.I have done the coding part,entire thing is working.I am getting picture from server and ajax also working.But when i am clicking on a particular image the entire picture in a row is refershing.I want to referesh only a particular area in the page using ajax.i know its not ajax problem.what i am facing here div's problem.i have not given div in a proper position please help me............. see the code below-php code <div id='txtHint'> <script src="nam_detail.js"></script> <?php //$id=$_GET['id']; //header('Content-type: text/html'); require_once 'MDB2.php'; $dsn = 'mysql://root:@localhost/mathew'; $options = array( 'debug' => 2, 'portability' => DB_PORTABILITY_ALL, ); $mdb2 =& MDB2::factory($dsn, $options); if (PEAR::isError($db)) { die($db->getMessage()); } $res =& $mdb2->query("SELECT * FROM images"); //echo "<div id='txtHint'>"; while ($row = $res->fetchRow(MDB2_FETCHMODE_ASSOC)) { echo "<img src='$row[image_path]' name=\"top6\" width=\"125\" height=\"85\" border=\"0\" onclick=\"showUser($row[id])\">"; echo "</img>"; } //echo "</div>"; $id=$_GET['id']; $res1 =& $mdb2->query("SELECT * FROM images where id='$id' "); ?> <table width="200" border="0"> <tr> <td></td> <td></td> </tr> <tr> <td><?php while ($row1 = $res1->fetchRow(MDB2_FETCHMODE_ASSOC)) { echo "<img src='$row1[image_path]' name='top4' width='125' height='85' border='0'>"; } ?></td><div align="center" id="as"></div> <td> </td> </tr> </table> </div> JAVASCRIPT CODE //Create a boolean variable to check for a valid Internet Explorer instance. var xmlhttp = false; //Check if we are using IE. try { //If the Javascript version is greater than 5. xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); //alert ("You are using Microsoft Internet Explorer."); } catch (e) { //If not, then use the older active x object. try { //If we are using Internet Explorer. xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); //alert ("You are using Microsoft Internet Explorer"); } catch (E) { //Else we must be using a non-IE browser. xmlhttp = false; } } //If we are using a non-IE browser, create a javascript instance of the object. if (!xmlhttp && typeof XMLHttpRequest != 'undefined') { xmlhttp = new XMLHttpRequest(); //alert ("You are not using Microsoft Internet Explorer"); } function showUser(str) { //document.images['top2'].src=null; //'dbcon.php' var url='image.php'; url=url+"?id="+str; url=url+"&sid="+Math.random(); xmlhttp.open("GET",url,true); xmlhttp.onreadystatechange = function() { //alert("test"); if (xmlhttp.readyState == 1 || xmlhttp.readyState == 2 || xmlhttp.readyState == 3) { document.getElementById("as").innerHTML="<img src=images/ajax-loader.gif>"; //document.images['top2'].src='images/ajax-loader.gif'; } if (xmlhttp.readyState == 4 && xmlhttp.status == 200) { document.getElementById("txtHint").innerHTML=xmlhttp.responseText ; // alert("test"); } } // alert(obj.innerHTML); xmlhttp.send(null); }
  3. Hi I am not geeting what u r saying.Can u plz explain little bit.my field type is varchar ATC
  4. hi all       I am new to php. I have a problem in my site.I have a news and Events section in my home page,in which i want to display the latest news and events based on  current server  date.I am storing entire date in the database. [u]database structure[/u] Input to Mysql database DATE(dd-mm-yyyy) News and EVENTS 8-10-2005                 XXXXXXXXXX 8-10-2006                 XXXXXXXXXX 1-11-2006                 XXXXXXXXXX 14-11-2006                 XXXXXXXXXX 16-11-2006                 XXXXXXXXXX 18-11-2006                 XXXXXXXXXX 30-12-2006                 XXXXXXXXXX ######################################################### I need the o/p in the following format(consider 16-11-2006 is the current Server date) DATE(dd-mm-yyyy) News and EVENTS 16-11-2006               XXXXXXXXXX 18-11-2006               XXXXXXXXXX 30-12-2006               XXXXXXXXXX 14-11-2006               XXXXXXXXXX 01-11-2006                    XXXXXXXXXX 8-10-2006                 XXXXXXXXXX 8-10-2005                 XXXXXXXXXX       please help me  the logic or providing the code >:(
  5. hi all I am new to php. I am having a problem. I have a textarea in my webpage.I have to put some data into that text area.what i have done, I copied the data from the MS-Word and paste into the textarea.Then I clicked the submit button.so this time the data should be added to the database.so data insertion is not happening. But when i typed the entire data from the keyboard.the data is inserted into the database.I tried this with long data and short data,it has been added and working smoothly.So that means there is no problem in my PHP insertion code. The problem is while i am coping data from word to textarea is not taking.I am realy wondering.Is there any solution to this problem.p lease help me......:(
  6. hi all i am new to php how can we do the site search in php ? My page is not storing in database ?please help me...............
×
×
  • 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.