Search Results

Search found 64 results on 3 pages for 'udaya'.

Page 1/3 | 1 2 3  | Next Page >

  • why my image and first name disappears in this code?

    - by udaya
    Hi This is my foreach function <? foreach($Selected as $row) $value = $row['dPath']; $imgp = base_url()."images"."/".$value; {?> <td> <?=$row['dFrindName'].'</br>';?> <?php */?> <img src="<?=$imgp ?>" name="b1" width="90" height="80" border="0"/> </td> <? }}?> Print_r($Selected); results in `Array ( [0] => Array ( [dFrindName] => chandruCP [dPath] => m11on.gif ) [1] => Array ( [dFrindName] => udaya [dPath] => logo.jpg ) )` but only my last value of the array is displayed on image I can get the name udaya and logo.jpg on the screen But i cant get chandruCP and m11on.gif why it is so how can i get all the values and image on scrren

    Read the article

  • How to get the headers for all the pages of the exported data from php to pdf

    - by udaya
    Hi I am exporting data from php page to pdf when the datas exceeed the page limit the header is not available for the consecutive pages function where i call the export to pdf is function changeDetails() { $bType = $this-input-post('textvalue'); if($bType == "pdf") { $this->load->library('table'); $this->load->plugin('to_pdf'); $data['countrytoword'] = $this->AddEditmodel1->export(); $this->table->set_heading('Country','State','Town','Name'); $out = $this->table->generate($data['countrytoword']); $html = $this->load->view( 'newpdf',$data, true); pdf_create($html, $cur_date); } } This is my view page from which i export data to pdf Name Country State Town Here I am getting the result as page:1 Name country State Town udaya india Tamilnadu kovai chandru srilanka columbo aaaaa page:2 vivek england gggkj gjgjkj in the page 2 i dont get the headers name, country ,state and town

    Read the article

  • How to retain headers for all the pages of an exported pdf in php?

    - by udaya
    Hi I am exporting data from php page to pdf when the datas exceeed the page limit the header is not available for the consecutive pages function where i call the export to pdf is function changeDetails() { $bType = $this-input-post('textvalue'); if($bType == "pdf") { $this->load->library('table'); $this->load->plugin('to_pdf'); $data['countrytoword'] = $this->AddEditmodel1->export(); $this->table->set_heading('Country','State','Town','Name'); $out = $this->table->generate($data['countrytoword']); $html = $this->load->view( 'newpdf',$data, true); pdf_create($html, $cur_date); } } This is my view page from which i export data to pdf Name Country State Town Here I am getting the result as page:1 Name country State Town udaya india Tamilnadu kovai chandru srilanka columbo aaaaa page:2 vivek england gggkj gjgjkj in the page 2 i dont get the headers name, country ,state and town

    Read the article

  • Exporting data from php page to word document

    - by udaya
    Hi I exported data from php page to word document but the problm is the header is not available in all pages I got the same problem while i am exporting the datas to pdf but i got the result for that one by using fpdf library In pdf i got the results like this ex page1 slno name 1 udaya 2 sankar In page 2 slno name 3 chendu 4 Akila I want the same kind of result in word how to get that This is the function i used function changeDetails() { $bType = $this-input-post('textvalue'); if($bType == "word") { $this-load-library('table'); $data['countrytoword'] = $this-AddEditmodel1-export(); $this-table-set_heading('Name','Country','State','Town'); $out = $this-table-generate($data['countrytoword']); header("Content-Type: application/vnd.ms-word"); header("Expires: 0"); header("Cache-Control: must-revalidate, post-check=0, pre-check=0"); header("Content-disposition: attachment; filename=$cur_date.doc"); echo ''; echo 'CountryList'; print_r($out); } } Name Country State Town

    Read the article

  • How to retain headers for all the pages of an exported word document in php?

    - by udaya
    Hi I exported data from php page to word document but the problm is the header is not available in all pages I got the same problem while i am exporting the datas to pdf but i got the result for that one by using fpdf library In pdf i got the results like this ex page1 slno name 1 udaya 2 sankar In page 2 slno name 3 chendu 4 Akila I want the same kind of result in word how to get that This is the function i used function changeDetails() { $bType = $this->input->post('textvalue'); if($bType == "word") { $this->load->library('table'); $data['countrytoword'] = $this->AddEditmodel1->export(); $this->table->set_heading('Name','Country','State','Town'); $out = $this->table->generate($data['countrytoword']); header("Content-Type: application/vnd.ms-word"); header("Expires: 0"); header("Cache-Control: must-revalidate, post-check=0, pre-check=0"); header("Content-disposition: attachment; filename=$cur_date.doc"); echo '<br><br>'; echo '<strong>CountryList</strong><br><br>'; print_r($out); } } <? if(isset($countrytoword)) { ?> <table align="center" border="0"> <tr> <td> Name </td> <td> Country </td> <td> State </td> <td> Town </td> </tr> <? foreach($countrytoword as $dsasffd) { ?> <tr> <td><?= $dsasffd['dbName'] ?></td> <td><?= $dsasffd['dbCountry']; ?></td> <td><?= $dsasffd['dbState']; ?></td> <td><?= $dsasffd['dbTown']; ?></td> <? } } ?> </tr> </table>

    Read the article

  • how to club the data split by split function

    - by udaya
    Hi my data is dat1; the split statement is var splitstr = dat1.split("-"); I have splited the data from this format 2010 -02-02 to Element 0 = 2010 Element 1 = 05 Element 2 = 22 this format..Using split function, i want to arrange that like 2010,02,02 how can i do that

    Read the article

  • why my print doesn't work?

    - by udaya
    hi In this below program i am printing the contents of the div when i click the print button i am receiving an alert message printer error not available why it is so <html> <head> <script type="text/javascript" src="http://jqueryjs.googlecode.com/files/jquery-1.3.1.min.js" > </script> <script type="text/javascript"> function PrintElem(elem) { Popup($(elem).text()); } function Popup(data) { var mywindow = window.open('', 'my div', 'height=400,width=600'); mywindow.document.write('<html><head><title>my div</title>'); /*optional stylesheet*/ //mywindow.document.write('<link rel="stylesheet" href="main.css" type="text/css" />'); mywindow.document.write('</head><body >'); mywindow.document.write(data); mywindow.document.write('</body></html>'); mywindow.document.close(); mywindow.print(); return true; } </script> </head> <body> <div id="mydiv"> This will be printed. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque a quam at nibh adipiscing interdum. Nulla vitae accumsan ante. </div> <input type="button" value="Print Div" onclick="PrintElem('#mydiv')" /> </body> </html>

    Read the article

  • Jquery ajax success function returns null?

    - by udaya
    I use the following the jquery statements to call my php controller function, it gets called but my result is not returned to my success function.... function getRecordspage() { $.ajax({ type: "POST", url:"http://localhost/codeigniter_cup_myth/index.php/adminController/mainAccount", data: "{}", contentType: "application/json; charset=utf-8", global:false, async: true, dataType: "json", success: function(result) { alert(result); } }); } My controller method, function mainAccount() { $_SESSION['menu'] = 'finance'; $data['account'] = $this->adminmodel->getaccountDetails(); if(empty($data['account'])) { $data['comment'] = 'No record found !'; } $json = json_encode($data); return $json; } I get the alert(1); in my success function but my alert(result); show null... Any suggestion...

    Read the article

  • curl_init undefined?

    - by udaya
    Hi I am importing the contacts from gmail to my page ..... The process doesnot work due to this error 'curl_init' is not defined The suggestion i got is to 1.uncomment destination curl.dll 2.copy the following libraries to the windows/system32 dir. ssleay32.dll libeay32.dll 3.copy php_curl.dll to windows/system32 After trying all these i refreshed my xampp Even then error occurs This is my page where i am trying to import the gmail contacts ` // set URL and other appropriate options curl_setopt($ch, CURLOPT_URL, "http://www.example.com/"); curl_setopt($ch, CURLOPT_HEADER, 0); // grab URL and pass it to the browser curl_exec($ch); // close cURL resource, and free up system resources curl_close($ch); ? "HOSTED_OR_GOOGLE", "Email" = $_POST['Email'], echo "Passwd" = $_POST['Passwd'], "service" = "cp", "source" = "tutsmore/1.2" ); //Now we are going to post these datas to the clientLogin url. // Initialize the curl object with the $curl = curl_init($clientlogin_url); //Make the post true curl_setopt($curl, CURLOPT_POST, true); //Passing the above array of parameters. curl_setopt($curl, CURLOPT_POSTFIELDS, $clientlogin_post); //Set this for authentication and ssl communication. curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_ANY); //provide false to not to check the server for the certificate. curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false); //Tell curl to just don't echo the data but return it to a variable. curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); //The variable containing response $response = curl_exec($curl); //Check whether the user is successfully login using the preg_match and save the auth key if the user //is successfully logged in preg_match("/Auth=([a-z0-9_-]+)/i", $response, $matches); $auth = $matches[1]; // Include the Auth string in the headers $headers = array("Authorization: GoogleLogin auth=" . $auth); // Make the request to the google contacts feed with the auth key $curl = curl_init('http://www.google.com/m8/feeds/contacts/default/full?max-results=10000'); //passing the headers of auth key. curl_setopt($curl, CURLOPT_HTTPHEADER, $headers); //Return the result in a variable curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); //the variable with the response. $feed = curl_exec($curl); //Create empty array of contacts echo "contacts".$contacts=array(); //Initialize the DOMDocument object $doc=new DOMDocument(); //Check whether the feed is empty //If not empty then load that feed. if (!empty($feed)) $doc-loadHTML($feed); //Initialize the domxpath object and provide the loaded feed $xpath=new DOMXPath($doc); //Get every entry tags from the feed. $query="//entry"; $data=$xpath-query($query); //Process each entry tag foreach ($data as $node) { //children of each entry tag. $entry_nodes=$node-childNodes; //Create a temproray array. $tempArray=array(); //Process the child node of the entry tag. foreach($entry_nodes as $child) { //get the tagname of the child node. $domNodesName=$child-nodeName; switch($domNodesName) { case 'title' : { $tempArray['fullName']=$child-nodeValue; } break; case 'email' : { if (strpos($child-getAttribute('rel'),'home')!==false) $tempArray['email_1']=$child-getAttribute('address'); elseif(strpos($child-getAttribute('rel'),'work')!=false) $tempArray['email_2']=$child-getAttribute('address'); elseif(strpos($child-getAttribute('rel'),'other')!==false) $tempArray['email_3']=$child-getAttribute('address'); } break; } } if (!empty($tempArray['email_1']))$contacts[$tempArray['email_1']]=$tempArray; if(!empty($tempArray['email_2'])) $contacts[$tempArray['email_2']]=$tempArray; if(!empty($tempArray['email_3'])) $contacts[$tempArray['email_3']]=$tempArray; } foreach($contacts as $key=$val) { //Echo the email echo $key.""; } } else { //The form ? " method="POST" Email: Password: tutsmore don't save your email and password trust us. ` code is completely provided for debugging if any optimization is needed i will try to optimize the code

    Read the article

  • how to limit the number of datas in pdf

    - by udaya
    Hi I am exporting data from php page to word,, there i get 'n' number of datas in each page .... How to set the maximum number of data that a word page can contain ,,,, I want only 20 datas in a single page This is the coding i use to export the data to pdf In mysql_table.php the table for the pdf document is be generated <?php require('mysql_table.php'); class PDF extends PDF_MySQL_Table { function Header() { //Title $this->SetFont('Arial','',18); $this->Cell(0,6,'Country details',0,1,'C'); $this->Ln(10); parent::Header(); } } //Connect to database mysql_connect('localhost','root',''); mysql_select_db('cms'); $pdf=new PDF(); $pdf->AddPage(); //First table: put all columns automatically $pdf->Table("SELECT (SELECT COUNT(*) FROM tblentercountry t2 WHERE t2.dbName <= t1.dbName and dbIsDelete='0') AS SLNO ,dbName as Namee,t3.dbCountry as Country,t4.dbState as State,t5.dbTown as Town FROM tblentercountry t1 join tablecountry as t3, tablestate as t4, tabletown as t5 where t1.dbIsDelete='0' and t1.dbCountryId=t3.dbCountryId and t1.dbStateId=t4.dbStateId and t1.dbTownId=t5.dbTownId order by dbName"); $pdf->AddPage(); //Second table: specify 3 columns $pdf->AddCol('rank',20,'','C'); $pdf->AddCol('name',20,'tablecountry'); $pdf->AddCol('pop',20,'Pop (2001)','R'); $prop=array('HeaderColor'=>array(255,150,100), 'color1'=>array(210,245,255), 'color2'=>array(255,255,210), 'padding'=>2); //$pdf->Table('select dbCountry,dbCountryId from tablecountry limit 0,10',$prop); $pdf->Output(); ?> How to limit the number of datas in a page

    Read the article

  • why this Javascript function doesn't work?

    - by udaya
    I use the following javascript function, function get_check_value(formId,checkboxId,TxtboxId) { alert(formId); var c_value = ""; for (var i=0; i < document.formId.checkboxId.length; i++) { if (document.formId.checkboxId[i].checked) { c_value = c_value + document.formId.checkboxId[i].value + "\n"; } } alert(c_value); document.getElementById(TxtboxId).value= c_value; // alert(c_value.value); } and my php page has this, <form name="orderform" id="orderform"> <input type="text" name="chId" id="chId" > <table align="center" border="0"> <tr> <td>Country</td> </tr> <? foreach($country as $row){ ?> <tr> <td><?= $row['dbCountry']; ?></td> <td><input type="checkbox" name="CountrycheckId" id="CountrycheckId" value="<?= $row['dbCountryId']; ?> " onClick="get_check_value('orderform','CountrycheckId','chId')"></td> <? } ?> </tr> </table> </form> I am getting formname,checkboxid,textid in alerts inside the javascript function... But the problem is with the line for (var i=0; i < document.formId.checkboxId.length; i++) Webdeveloper toolbar shows this error document.formId is undefined

    Read the article

  • retriving hearders in all pages of word

    - by udaya
    Hi I am exporting data from php page to word,, there i get 'n' number of datas in each page .... How to set the maximum number of data that a word page can contain ,,,, I want only 20 datas in a single page This is the coding i use to export the data to word i got the data in word format but the headers are not available for all the pages ex: Page:1 slno name country state Town 1 vivek india tamilnadu trichy 2 uday india kerala coimbatore like this i am getting many details but in my page:2 i dont get the headers like name country state and town....But i can get the details like kumar america xxxx yyyy i want the result to be like slno name country state town n chris newzealand ghgg jkgj Can i get the headers If it is not possible Is there anyway to limit the number of details being displayed in each page //EDIT YOUR MySQL Connection Info: $DB_Server = "localhost"; //your MySQL Server $DB_Username = "root"; //your MySQL User Name $DB_Password = ""; //your MySQL Password $DB_DBName = "cms"; //your MySQL Database Name $DB_TBLName = ""; //your MySQL Table Name $sql = "SELECT (SELECT COUNT(*) FROM tblentercountry t2 WHERE t2.dbName <= t1.dbName and t1.dbIsDelete='0') AS SLNO ,dbName as Namee,t3.dbCountry as Country,t4.dbState as State,t5.dbTown as Town FROM tblentercountry t1 join tablecountry as t3, tablestate as t4, tabletown as t5 where t1.dbIsDelete='0' and t1.dbCountryId=t3.dbCountryId and t1.dbStateId=t4.dbStateId and t1.dbTownId=t5.dbTownId order by dbName limit 0,50"; //Optional: print out title to top of Excel or Word file with Timestamp //for when file was generated: //set $Use_Titel = 1 to generate title, 0 not to use title $Use_Title = 1; //define date for title: EDIT this to create the time-format you need //$now_date = DATE('m-d-Y H:i'); //define title for .doc or .xls file: EDIT this if you want $title = "Country"; /* Leave the connection info below as it is: just edit the above. (Editing of code past this point recommended only for advanced users.) */ //create MySQL connection $Connect = @MYSQL_CONNECT($DB_Server, $DB_Username, $DB_Password) or DIE("Couldn't connect to MySQL:" . MYSQL_ERROR() . "" . MYSQL_ERRNO()); //select database $Db = @MYSQL_SELECT_DB($DB_DBName, $Connect) or DIE("Couldn't select database:" . MYSQL_ERROR(). "" . MYSQL_ERRNO()); //execute query $result = @MYSQL_QUERY($sql,$Connect) or DIE("Couldn't execute query:" . MYSQL_ERROR(). "" . MYSQL_ERRNO()); //if this parameter is included ($w=1), file returned will be in word format ('.doc') //if parameter is not included, file returned will be in excel format ('.xls') IF (ISSET($w) && ($w==1)) { $file_type = "vnd.ms-excel"; $file_ending = "xls"; }ELSE { $file_type = "msword"; $file_ending = "doc"; } //header info for browser: determines file type ('.doc' or '.xls') HEADER("Content-Type: application/$file_type"); HEADER("Content-Disposition: attachment; filename=database_dump.$file_ending"); HEADER("Pragma: no-cache"); HEADER("Expires: 0"); /* Start of Formatting for Word or Excel */ IF (ISSET($w) && ($w==1)) //check for $w again { /* FORMATTING FOR WORD DOCUMENTS ('.doc') */ //create title with timestamp: IF ($Use_Title == 1) { ECHO("$title\n\n"); } //define separator (defines columns in excel & tabs in word) $sep = "\n"; //new line character WHILE($row = MYSQL_FETCH_ROW($result)) { //set_time_limit(60); // HaRa $schema_insert = ""; FOR($j=0; $j<mysql_num_fields($result);$j++) { //define field names $field_name = MYSQL_FIELD_NAME($result,$j); //will show name of fields $schema_insert .= "$field_name:\t"; IF(!ISSET($row[$j])) { $schema_insert .= "NULL".$sep; } ELSEIF ($row[$j] != "") { $schema_insert .= "$row[$j]".$sep; } ELSE { $schema_insert .= "".$sep; } } $schema_insert = STR_REPLACE($sep."$", "", $schema_insert); $schema_insert .= "\t"; PRINT(TRIM($schema_insert)); //end of each mysql row //creates line to separate data from each MySQL table row PRINT "\n----------------------------------------------------\n"; } }ELSE{ /* FORMATTING FOR EXCEL DOCUMENTS ('.xls') */ //create title with timestamp: IF ($Use_Title == 1) { ECHO("$title\n"); } //define separator (defines columns in excel & tabs in word) $sep = "\t"; //tabbed character //start of printing column names as names of MySQL fields FOR ($i = 0; $i < MYSQL_NUM_FIELDS($result); $i++) { ECHO MYSQL_FIELD_NAME($result,$i) . "\t"; } PRINT("\n"); //end of printing column names //start while loop to get data WHILE($row = MYSQL_FETCH_ROW($result)) { //set_time_limit(60); // HaRa $schema_insert = ""; FOR($j=0; $j<mysql_num_fields($result);$j++) { IF(!ISSET($row[$j])) $schema_insert .= "NULL".$sep; ELSEIF ($row[$j] != "") $schema_insert .= "$row[$j]".$sep; ELSE $schema_insert .= "".$sep; } $schema_insert = STR_REPLACE($sep."$", "", $schema_insert); //following fix suggested by Josue (thanks, Josue!) //this corrects output in excel when table fields contain \n or \r //these two characters are now replaced with a space $schema_insert = PREG_REPLACE("/\r\n|\n\r|\n|\r/", " ", $schema_insert); $schema_insert .= "\t"; PRINT(TRIM($schema_insert)); PRINT "\n"; } } ?

    Read the article

  • Hi how to show the results in a datatable while we are using yui

    - by udaya
    Hi I am using yui to display a datagrid ... <?php $host = "localhost"; //database location $user = "root"; //database username $pass = ""; //database password $db_name = "cms"; //database name //database connection $link = mysql_connect($host, $user, $pass); mysql_select_db($db_name); //sets encoding to utf8 $result = mysql_query("select dStud_id,dMarkObtained1,dMarkObtained2,dMarkObtained3,dMarkTotal from tbl_internalmarkallot"); //$res = mysql_fetch_array($result); while($res = mysql_fetch_array($result)) { //print_r($res); $JsonVar = json_encode($res); echo "<input type='text' name='json' id='json' value ='$JsonVar'>"; } //print_r (mysql_fetch_array($result)); //echo "<input type='text' name='json' id='json' value ='$JsonVar'>"; ?> <html> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8"> <title>Client-side Pagination</title> <style type="text/css"> body { margin:0; padding:0; } </style> <link rel="stylesheet" type="text/css" href="build/fonts/fonts-min.css" /> <link rel="stylesheet" type="text/css" href="build/paginator/assets/skins/sam/paginator.css" /> <link rel="stylesheet" type="text/css" href="build/datatable/assets/skins/sam/datatable.css" /> <script type="text/javascript" src="build/yahoo-dom-event/yahoo-dom-event.js"></script> <script type="text/javascript" src="build/connection/connection-min.js"></script> <script type="text/javascript" src="build/json/json-min.js"></script> <script type="text/javascript" src="build/element/element-min.js"></script> <script type="text/javascript" src="build/paginator/paginator-min.js"></script> <script type="text/javascript" src="build/datasource/datasource-min.js"></script> <script type="text/javascript" src="build/datatable/datatable-min.js"></script> <script type="text/javascript" src="YuiJs.js"></script> <style type="text/css"> #paginated { text-align: center; } #paginated table { margin-left:auto; margin-right:auto; } #paginated, #paginated .yui-dt-loading { text-align: center; background-color: transparent; } </style> </head> <body class="yui-skin-sam" onload="ProjectDatatable(document.getElementById('json').value);"> <h1>Client-side Pagination</h1> <div class="exampleIntro"> </div> <input type="hidden" id="HfId"/> <div id="paginated"> </div> <script type="text/javascript"> /*YAHOO.util.Event.onDOMReady(function() { YAHOO.example.ClientPagination = function() { var myColumnDefs = [ {key:"dStud_id", label:"ID",sortable:true, resizeable:true, editor: new YAHOO.widget.TextareaCellEditor()}, {key:"dMarkObtained1", label:"Name",sortable:true}, {key:"dMarkObtained2", label:"CycleTest1"}, {key:"dMarkObtained3", label:"CycleTest2"}, {key:"dMarkTotal", label:"CycleTest3"}, ]; var myDataSource = new YAHOO.util.DataSource("assets/php/json_proxy.php?"); myDataSource.responseType = YAHOO.util.DataSource.TYPE_JSON; myDataSource.responseSchema = { resultsList: "records", fields: ["dStud_id","dMarkObtained1","dMarkObtained2","dMarkObtained3","dMarkTotal"] }; var oConfigs = { paginator: new YAHOO.widget.Paginator({ rowsPerPage: 15 }), initialRequest: "results=504" }; var myDataTable = new YAHOO.widget.DataTable("paginated", myColumnDefs, myDataSource, oConfigs); return { oDS: myDataSource, oDT: myDataTable }; }(); });*/ </script> <?php echo "m".$res['dMarkObtained1']; echo "m".$res['dMarkObtained2']; echo "m".$res['dMarkObtained3']; echo "Tm".$res['dMarkTotal']; {?><? }?> </body> </html> </body> </html> This is my page where i am fetching the data's from the database function generateDatatable(target, jsonObj, myColumnDefs, hfId) { var root; for (key in jsonObj) { root = key; break; } var rootId = "id"; if (jsonObj[root].length > 0) { for (key in jsonObj[root][0]) { rootId = key; break; } } YAHOO.example.DynamicData = function() { var myPaginator = new YAHOO.widget.Paginator({ rowsPerPage: 10, template: YAHOO.widget.Paginator.TEMPLATE_ROWS_PER_PAGE, rowsPerPageOptions: [5, 25, 50, 100], pageLinks: 10 }); // DataSource instance var myDataSource = new YAHOO.util.DataSource(jsonObj); myDataSource.responseType = YAHOO.util.DataSource.TYPE_JSON; myDataSource.responseSchema = { resultsList: root, fields: new Array() }; myDataSource.responseSchema.fields[0] = rootId; for (var i = 0; i < myColumnDefs.length; i++) { myDataSource.responseSchema.fields[i + 1] = myColumnDefs[i].key; } // DataTable configuration var myConfigs = { sortedBy: { key: myDataSource.responseSchema.fields[1], dir: YAHOO.widget.DataTable.CLASS_ASC }, // Sets UI initial sort arrow paginator: myPaginator }; // DataTable instance var myDataTable = new YAHOO.widget.DataTable(target, myColumnDefs, myDataSource, myConfigs); myDataTable.subscribe("rowMouseoverEvent", myDataTable.onEventHighlightRow); myDataTable.subscribe("rowMouseoutEvent", myDataTable.onEventUnhighlightRow); myDataTable.subscribe("rowClickEvent", myDataTable.onEventSelectRow); myDataTable.subscribe("checkboxClickEvent", function(oArgs) { var hidObj = document.getElementById(hfId); var elCheckbox = oArgs.target; var oRecord = this.getRecord(elCheckbox); var id = oRecord.getData(rootId); if (elCheckbox.checked) { if (hidObj.value == "") { hidObj.value = id; } else { hidObj.value += "," + id; } } else { hidObj.value = removeIdFromArray("" + hfId, id); } }); myPaginator.subscribe("changeRequest", function() { if (document.getElementById(hfId).value != "") { /*if (document.getElementById("ConfirmationPanel").style.display == 'block') { document.getElementById("ConfirmationPanel").style.display = 'none'; }*/ document.getElementById(hfId).value = ""; } return true; }); myDataTable.handleDataReturnPayload = function(oRequest, oResponse, oPayload) { oPayload.totalRecords = oResponse.meta.totalRecords; return oPayload; } return { ds: myDataSource, dt: myDataTable }; } (); } function removeIdFromArray(values, id) { values = document.getElementById(values).value; if (values.indexOf(',') == 0) { values = values.substring(1); } if (values.indexOf(values.length - 1) == ",") { values = values.substring(0, values.length - 1); } var ids = values.split(','); var rtnValue = ""; for (var i = 0; i < ids.length; i++) { if (ids[i] != id) { rtnValue += "," + ids[i]; } } if (rtnValue.indexOf(",") == 0) { rtnValue = rtnValue.substring(1); } return rtnValue; } function edityuitable() { var ErrorDiv = document.getElementById("ErrorDiv"); var editId=document.getElementById("ctl00_ContentPlaceHolder1_HfId").value; if(editId.length == 0) { ErrorDiv.innerHTML = getErrorMsgStyle("Select a row for edit"); //alert("Select a row for edit"); return false; } else { var editarray = editId.split(","); if (editarray.length != 1) { ErrorDiv.innerHTML = getErrorMsgStyle("Select One row for edit"); //alert("Select One row for edit"); return false; } else if (editarray.length == 1) { return true; } } } function Deleteyuitable() { var ErrorDiv = document.getElementById("ErrorDiv"); var editId=document.getElementById("ctl00_ContentPlaceHolder1_HfId").value; if(editId.length == 0) { ErrorDiv.innerHTML = getErrorMsgStyle("Select a row for Delete"); return false; } else { return true; } } function ProjectDatatable(HfJsonValue){ alert(HfJsonValue); var myColumnDefs = [ {key:"dStud_id", label:"ID", width:150, sortable:true, sortOptions:{defaultDir:YAHOO.widget.DataTable.CLASS_DESC}}, {key:"dMarkObtained1", label:"Marks", width:200, sortable:true, sortOptions:{defaultDir:YAHOO.widget.DataTable.CLASS_DESC}}, {key:"dMarkObtained2", label:"Marks1", width:150, sortable:true, sortOptions:{defaultDir:YAHOO.widget.DataTable.CLASS_DESC}}, {key:"dMarkObtained3", label:"Marks2", width:200, sortable:true, sortOptions:{defaultDir:YAHOO.widget.DataTable.CLASS_DESC}}, {key:"dMarkTotal", label:"Total", width:150, sortable:true, sortOptions:{defaultDir:YAHOO.widget.DataTable.CLASS_DESC}}, {key:"", formatter:"checkbox"} ]; var jsonObj=eval('(' + HfJsonValue + ')'); var target = "paginated"; var hfId = "HfId"; generateDatatable(target,jsonObj,myColumnDefs,hfId) } // JavaScript Document This is my script page when i load the page i do get the first row from the database but the consequtive data's are not displayed in the alert box how can i receieve the data's in the datagrid

    Read the article

  • why i dont get the check nvalue in check box?

    - by udaya
    Hi I have a check box when check that check box the id corresponding to the check box is placed on a text box ... but when there is only single value in the database i cant get the check value why? here is my code <? if(isset($AcceptFriend)) {?> <form action="<?=site_url()?>friends/Accept_Friend" name="orderform" id="orderform" method="post" style="background:#CCCC99"> <input type="text" name="chId" id="chId" > <table border="0" height="50%" id="chkbox" width="50%" > <tr> <? foreach($AcceptFriend as $row) {?> <tr> <td>Name</td><td><?=$row['dFrindName'].'</br>';?></td> <td> <input type="checkbox" name="checkId" id="checkId" value="<? echo $row['dMemberId']; ?>" onClick="get_check_value()" ></td> </tr> <? }}?> </tr> <tr> <td width="10px"><input type="submit" name="submit" id="submit" class="buttn" value="AcceptFriend"></td></tr> </table> </form> This is the script i am using function get_check_value() { var c_value = ""; for (var i=0; i < document.orderform.checkId.length; i++) { if (document.orderform.checkId[i].checked) { c_value = c_value + document.orderform.checkId[i].value + "\n"; } } alert(c_value); document.getElementById('chId').value= c_value; }

    Read the article

  • hi how restrict the year in jquery datepicker?

    - by udaya
    Hi I am using jquery.datePicker.js js file to create a date picker This is whati have in my view page <input type="text" style="font-family: verdana; width: 80px;" id="txtArrivalDate" class="startDate" name="txtArrivalDate" value="<?php echo $_POST['txtArrivalDate'] ?>" /> when i click on the arrival date text box the year column starts on current year say 2010 but the years less than 2010 also available on the year select box how to get rid of the years below current year

    Read the article

  • how to get additional response in ajax?

    - by udaya
    Hi I am using ajax to showing the error message ...I am getting the values in success: function(msgqq) This is my ajax if want to get another response then how to get ex: I want success: function(msgqq) and success: function(msg) This is my ajax function UserNameAvailablity(inp) { $.ajax({ type: "GET", url: "<?=base_url()?>/system/application/views/ssitAjax.php", cache: false, data: "txtUserName="+inp, success: function(msgqq){ document.getElementById('showErrmessage').innerHTML=msgqq; $("#showErrmessage").html(msgqq); if(txtUserName.value =="") { document.getElementById('txtUserName').focus(); document.getElementById('txtUserName').value=""; } } }); }

    Read the article

  • how to open a function in new window ?or new tab?

    - by udaya
    Hi I am calling a function in my controller from a button click .... I want the function to be opened in a new window how can we get that ex: now my url is "http://localhost/codeigniter_cup_myth/index.php/adminController/adminDegree" with a button click i am calling a function degreechk in my adminController I want the url "http://localhost/codeigniter_cup_myth/index.php/adminController/degreechk " to be opened in a new window How can i get the new url in a new window

    Read the article

  • cascading dropdown value doesn't seem to get posted to my php page?

    - by udaya
    i am using cascading dropdownlist for showing states of a country... I get the country dropdown value but not the state dropdown value.... I am populating state values via ajax... echo $country = $this->input->post('country'); echo $state = $this->input->post('state'); When inspected through firebug it shows all the option values of my state dropdown then why doesn't it get posted? <select onchange="getCity(1,this.value)" name="state"> <option value="0">Select State</option> <option value="1">Andhra Pradesh</option> <option value="2">Arunachal Pradesh</option> <option value="3">Assam</option> <option value="4">Bihar</option> <option value="5">Chandigarh</option> <option value="6">Chhattisgarh</option> <option value="7">Dadra and Nagar Haveli</option> <option value="8">Daman and Diu</option> <option value="9">Delhi</option> <option value="10">Goa</option> <option value="11">Gujarat</option> <option value="12">Haryana</option> <option value="13">Himachal Pradesh</option> <option value="14">Jammu and Kashmir</option> <option value="15">Jharkhand</option> <option value="16">Karnataka</option> <option value="17">Kerala</option> <option value="18">Lakshadweep</option> <option value="19">Madhya Pradesh</option> <option value="20">Maharashtra</option> <option value="21">Manipur</option> <option value="22">Meghalaya</option> <option value="23">Mizoram</option> <option value="24">Nagaland</option> <option value="25">Orissa</option> <option value="26">Puducherry</option> <option value="27">Punjab</option> <option value="28">Rajasthan</option> <option value="29">Sikkim</option> <option value="30">Tamil Nadu</option> <option value="31">Tripura</option> <option value="32">Uttar Pradesh</option> <option value="33">Uttarakhand</option> <option value="34">West Bengal</option> </select>

    Read the article

  • how to split a data from database based on character

    - by udaya
    Hi I have a data april/2010 to jan/2011 Is there any way to split the data with character to and select the date as The value before "to" as FROM and The Value after "to" as TO how to selet the splited value......... while i am selecting the data as it is as select date from mytbl how to select the date as two values

    Read the article

  • Why is the value not passed to my controller page in codeigniter?

    - by udaya
    I am selecting state from country and city from state. This is my country select box: <td width=""><select name="country" onChange="getState(this.value)" class="text_box_width_190"> <option value="0">Select Country</option> <? foreach($country as $row) { ?> <option value="<?=$row['dCountry_id']?>"><?=$row['dCountryName']?></option> <? } ?> </select></td> This is my state select box: <select name="state" id="state" class="text_box_width_190" > <option value="0">Select State</option> </select> This is my city select box: <td width=""><div id="citydiv"><select name="city" class="text_box_width_190"> <option>Select City</option> </select></div></td> This is my script: <script 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="http://localhost/ssit/system/application/views/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="http://localhost/ssit/system/application/views/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> This is my find state page: <? $country=intval($_GET['country']); $link = mysql_connect('localhost', 'root', ''); //changet the configuration in required if (!$link) { die('Could not connect: ' . mysql_error()); } mysql_select_db('ssit'); $query="Select dStateName,dState_id FROM tbl_state Where dCountry_id='1'"; $result=mysql_query($query); ?> <select name="state" onchange="getCity(<?=$country?>,this.value)"> <option value="0">Select State</option> <? while($row=mysql_fetch_array($result)) { ?> <option value=<?=$row['dState_id']?>><?=$row['dStateName']?></option> <? } ?> </select> This is my find city page: <? $countryId=intval($_GET['country']); $stateId=intval($_GET['state']); $link = mysql_connect('localhost', 'root', ''); //changet the configuration in required if (!$link) { die('Could not connect: ' . mysql_error()); } mysql_select_db('ssit'); $query="Select dCityName,dCity_id FROM tbl_city Where dState_id='30'"; $result=mysql_query($query); ?> <select name="city"> <option>Select City</option> <? while($row=mysql_fetch_array($result)) { ?> <option value><?=$row['dCityName']?></option> <? } ?> </select> When I post a country, I can receive it but I can't receive my state and city. How to receive them?

    Read the article

  • Dynamic generated file upload control<using javascript> doesn't post?

    - by udaya
    Hai I am having a form which contains a filetype like this on submit i am calling a script function addRowToTable() { var tbl = document.getElementById('uploadTab'); var lastrow = tbl.rows.length; var iteration = lastrow; var row = tbl.insertRow(lastrow); var cell2 = row.insertCell(0); var e2 = document.createElement('input'); e2.type = 'file'; e2.name = 'ufile[]'; e2.id = 'ufile[]'; e2.size='50'; cell2.appendChild(e2); } This script generates The tr on a button click... In my view generatedsource tool i get the "" like this <tr><td><input size="50" id="ufile[]" name="ufile[]" type="file"></td></tr> when i submit the form i dont get the file name for the generated file type in my view page But i get the file name foe the one that is default What may be the problem?

    Read the article

1 2 3  | Next Page >