Search Results

Search found 239 results on 10 pages for 'muhammad sajid'.

Page 3/10 | < Previous Page | 1 2 3 4 5 6 7 8 9 10  | Next Page >

  • Show hide DIVs : jQuery

    - by Muhammad Sajid
    Hi, I have two links & I want to show / hide them one at a time, my code is : <!DOCTYPE html> <html> <head> <script class="jsbin" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script> <script type="text/javascript" src="js/jquery.js"></script> <script type="text/javascript"> // we will add our javascript code here $(document).ready(function() { $(function(){ $('#link').click(function(){ $('#colorDiv').slideToggle('slow'); return false; }); }); }); </script> <meta charset=utf-8 /> <title>JS Bin</title> <!--[if IE]> <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script> <![endif]--> <style> #dv { width:100px; height:100px; border:1px solid; } </style> </head> <body> <table cellspacing="2"> <tr><td><a href="#" id="link">Color</a></td><td><a href="#" id="link">Car</a></td></tr> <tr><td><div id="colorDiv">Red</div></td><td><div id="carDiv">PRADO</div></td></tr> </table> </body> </html> by default first div should me shown. hanks.

    Read the article

  • Fetch all emails in PHP.

    - by Muhammad Sajid
    Hello. I want to fetch all my emails available in different online accounts eg:(gmail, yahoo, hotmail, aol, etc..) using PHP such that if necessary to reply any email then I could reply. How it is possible?

    Read the article

  • MySql Retrive data from same table.

    - by Muhammad Sajid
    Hi, I have a table which contains id, name, parentId of Top level Menus & their children like: -------------------------------------- id | name | parentId -------------------------------------- 1 | Color | 0 -------------------------------------- 2 | Flower | 0 -------------------------------------- 3 | Red | 1 -------------------------------------- 4 | pink | 1 -------------------------------------- 5 | Rose | 2 -------------------------------------- 6 | Lily | 2 -------------------------------------- And I want to fetch these record some thing that the resultant array must be like --------------------------------------------------------------- id | Pname | parentId | child | childId --------------------------------------------------------------- 1 | Color | 1 | Red | 3 --------------------------------------------------------------- 2 | Color | 1 | Pink | 4 --------------------------------------------------------------- 3 | Flower | 2 | Rose | 5 --------------------------------------------------------------- 4 | Flower | 2 | Lily | 6 --------------------------------------------------------------- my query was like: SELECT name AS Pname FROM myTbl WHERE id = (SELECT parentId FROM myTbl WHERE parentId = 1 ) but mysql say #1242 - Subquery returns more than 1 row Could anyone solve it. Thanks..

    Read the article

  • What transaction manager should I use for JBDC template When using JPA ?

    - by Sajid
    I am using standard JPA transaction manager for my JPA transactions. However, now I want to add some JDBC entities which will share the same 'datasource'. How can I make the JDBC operations transactional with spring transaction? Do I need to swith to JTA transaction managers? Is it possible to use both JPA & JDBC transactional service with same datasource? Even better, is it possible to mix these two transactions?

    Read the article

  • How to get <select> options either (value or text) using jQuery

    - by Muhammad Sajid
    Hello, i have a code for <select id='list'> <option value='1'>Option A</option> <option value='2'>Option B</option> <option value='3'>Option C</option> </select> and i want that how ever i select any option, it will show in an alert message. i have try <script type='text/javascript'> //var value = $("#list option[value=2]").text(); //var value = $("#list option:selected").text(); //var value = $('#list').val(); var value = $(this).val(); alert(value); </script> but fail.

    Read the article

  • Array filteration PHP

    - by Muhammad Sajid
    I have an array with values like: Array ( [0] => Array ( [parent] => Basic [parentId] => 1 [child] => Birthday [childId] => 2 ) [1] => Array ( [parent] => Basic [parentId] => 1 [child] => Gender [childId] => 3 ) [2] => Array ( [parent] => Geo [parentId] => 10 [child] => Current City [childId] => 11 ) [3] => Array ( [parent] => Known me [parentId] => 5 [child] => My personality [childId] => 7 ) [4] => Array ( [parent] => Known me [parentId] => 5 [child] => Best life moment [childId] => 8 ) ) And I want to filter this array such that their filtration based on parent index, and the final result would be like: Array ( [0] => Array ( [parent] => Basic [parentId] => 1 [child] => Array ( [0] => Birthday [1] => Gender ) ) [1] => Array ( [parent] => Geo [parentId] => 10 [child] => Array ( [0] => Current City ) ) [2] => Array ( [parent] => Known me [parentId] => 5 [child] => Array ( [0] => My personality [1] => Best life moment ) ) ) For that I coded : $filter = array(); $f = 0; for ($i=0; $i<count($menuArray); $i++) { $c = 0; for( $b = 0; $b < count($filter); $b++ ){ if( $filter[$b]['parent'] == $menuArray[$i]['parent'] ){ $c++; } } if ($c == 0) { $filter[$f]['parent'] = $menuArray[$i]['parent']; $filter[$f]['parentId'] = $menuArray[$i]['parentId']; $filter[$f]['child'][] = $menuArray[$i]['child']; $f++; } } But it results : Array ( [0] => Array ( [parent] => Basic [parentId] => 1 [child] => Array ( [0] => Birthday ) ) [1] => Array ( [parent] => Geo [parentId] => 10 [child] => Array ( [0] => Current City ) ) [2] => Array ( [parent] => Known me [parentId] => 5 [child] => Array ( [0] => My personality ) ) ) Could anyone point out my missing LOC?

    Read the article

  • Show values in TDropDownList in PRADO.

    - by Muhammad Sajid
    I m new to PRADO, I have a file Home.page with code: <%@ Title="Contact List" %> <h1>Contact List</h1> <a href="<%= $this->Service->constructUrl('insert')%>">Create New Contact</a> <br/> <com:TForm> <com:TDropDownList ID="personInfo"> <com:TListItem Value="value 1" Text="item 1" /> <com:TListItem Value="value 2" Text="item 2" Selected="true" /> <com:TListItem Value="value 3" Text="item 3" /> <com:TListItem Value="value 4" Text="item 4" /> </com:TDropDownList> </com:TForm> & Home.php with code <?php class Home extends TPage { /** * Populates the datagrid with user lists. * This method is invoked by the framework when initializing the page * @param mixed event parameter */ public function onInit($param) { parent::onInit($param); // fetches all data account information $rec = ContactRecord::finder()->findAll(); } } ?> the $rec contain array of all values. Now I want to show all name in Dropdown list. I tried my best but fail. Can anyone help me? Thanks

    Read the article

  • Replace images in a DIV using javascript.

    - by Muhammad Sajid
    Hi, I want to show different images in a DIV, the turn of an image depend on a random number. The image name is like 1.gif, 2.gif, .. 6.gif to do that I coded var img = document.createElement("IMG"); img.src = "images/1.gif"; document.getElementById('imgDiv').appendChild(img); but it does not replace the old image how ever it add an another image right in the bottom of first image. syntax for DIV is: <div id="imgDiv" style="width:85px; height:100px; margin:0px 10px 10px 375px;"></div> may u halp me ?

    Read the article

  • Define variables outside the PHP class.

    - by Muhammad Sajid
    Hello, I m using zend. I want to define the below code outside the controller class & access in different Actions. $user = new Zend_Session_Namespace('user'); $logInArray = array(); $logInArray['userId'] = $user->userid; $logInArray['orgId'] = $user->authOrgId; class VerifierController extends SystemadminController { public function indexAction() { // action body print_r($logInArray); } } How it is possible.

    Read the article

  • Change array structure in PHP.

    - by Muhammad Sajid
    Refers to my previous question : Show values in TDropDownList in PRADO. ok fine the array i receive from query is an object array like : ContactRecord Object ( [id] => 1 [name] => leo [_recordState:protected] => 1 [_connection:protected] => [_invalidFinderResult:protected] => [_e:TComponent:private] => Array ( ) ) ContactRecord Object ( [id] => 2 [name] => ganda [_recordState:protected] => 1 [_connection:protected] => [_invalidFinderResult:protected] => [_e:TComponent:private] => Array ( ) ) If I convert it in to array like: Array ( [key 1] => leo [key 2] => ganda ) then I can populate values into TDropDownList. Now can anyone help me to convert array structure which I need ... ? Again thanks

    Read the article

  • How to set readonly property of textbox from css.

    - by Muhammad Sajid
    i create css code like .inputHide { font-size : 100px; width : 100px; height : 100px; border : none; background : transparent; readonly : true; } But it does not work. Although if i use font-size of 1px then by using tab i can access that textbox & can change it's value. Is there any way to make textbox readonly just using css..

    Read the article

  • AJAX: Permission denied to access property in iframe

    - by Muhammad Sajid
    Hi I created an php website which uses for AJAX post and was live at http://sprook.com.au/ but my client change it's domain to http://www.sprookit.net/ from his service provider Godaddy and now the firebug says: Permission denied to access property 'stopAjax' here stopAjax is my method name. script is there: <div class="post_area"> <form action="post.php" method="post" id="addVideo" enctype="multipart/form-data" target="post" onsubmit="return startAjax(this);"> <iframe id="post" name="post" src="#" style="width:0;height:0;border:0px solid #fff;"></iframe> <table width="860" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="435">POST YOUR AD FREE<br /> <em>Paste embed code from YouTube</em></td> <td width="322"><input type="text" id="videoLink" name="videoLink" class="input_textbox" /> </td> <td width="95"><input type="submit" name="set_video_link" id="set_video_link" value="" class="submt_post" /> </td> </tr> <tr> <td>&nbsp;</td> <td><div id="process"> Connecting please wait <img src="images/loading.gif" /><br/> </div></td> </tr> </table> </form> </div> And all content comes from old domain i removed index file and it stoped working, therefore it is cleared that scripts run from old domain.

    Read the article

  • Localhost doesnot work.

    - by Muhammad Sajid
    Hi, I installed wamp server on xp. During the installation it did not show any error/warning message. Then i start it & type http://localhost/ in url bar but it just show a blank page. I also checked notepad C:\WINDOWS\system32\drivers\etc\hosts their is no restriction for localhost. Help. Thanks...

    Read the article

  • Flash Video Gallery using Jquery

    - by Muhammad Sajid
    Hi, my question referenced to my friend. I am trying to use jquery to show flash videos(swf) like a showcase and this is what I am trying to do: Show a video by default and then have "" below that so when an user click on prev or next, it will show the next one and so on. When a video is clicked after making the selection it can either open the video on top of it in a bigger size Or play the video once right there once they click the play button. I have seen examples for images and I tried those but it did not work with flash files. Please let me know if anyone can guide me. I prefer using jquery as there are applications on the site that uses jquery. Also, I just remembered one thing, how to stop the video if they navigate to the next one. This makes me think if its a good idea to do the gallery or showcase for flash videos. Please clarify my questions. thanks

    Read the article

  • Pass value to an include file in php.

    - by Muhammad Sajid
    Hi, How do you pass a parameter into an include file? I tried the following but it doesn't work. include "myfile.php?var=123"; and in myfile.php, I try to retrieve the parameter using $_GET["var"]. include "myfile.php?var=123"; will not work. PHP searches for a file with this exact name and does not parse the parameter for that I also did this: include "http://MyGreatSite.com/myfile.php?var=123";but it does not also work. Any hints? Thanks.

    Read the article

  • Threads in PHP.

    - by Muhammad Sajid
    Hello.. I am creating a web application using zend, here i create an interface from where user-A can send email to more than one user(s) & it works excellent but it slow the execution time because of which user-A wait too much for the "acknowledged response" ( which will show after the emails have sent. ) In Java there are "Threads" by which we can perform that task (send emails) & it does not slow the rest application. Is there any technique in PHP/Zend just like in Java by which we can divide our tasks which could take much time eg: sending emails. Thanks..

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10  | Next Page >