Jump to content

Jaswinder

Members
  • Posts

    124
  • Joined

  • Last visited

Jaswinder's Achievements

Member

Member (2/5)

0

Reputation

  1. Hi all The issue is, I want to show a map on google map site with marker on the location, when someone click on the link on my site. The problem is map is showing correctly, but no marker is there. Here is the link I am using <a href="https://www.google.com.au/maps/dir/-31.944951,115.803171">Map</a> Any help ?
  2. Hello friends, I am trying to achieve a simple thing, but I do not know jquery/javascript much. When I click on a forst list item in one div , I want to show corresponding 1st li in the second div. I have 6 list items in total and related 6 li in second div. Also when I click on any list item in first div, it will be borderd, this I achieved. But I am not able to bring the related li in the second div. Hope I make myself clear. Here is my code <style> .selected img { border:2px solid #090; } .visible { display:block; } .invisible { display:none; } </style> <div id="all"> <ul> <li class="selected"><img src="image1.JPG" /></li> <li><img src="image2.JPG" /><br /></li> <li><img src="image3.JPG" /><br /></li> </ul> </div> <div class="container"> <ul> <li class="visible"><img src="related_image1.JPG" /></li> (In these list items there may be img or content) <li class="invisible"><img src="related_image2.JPG" /></li> <li class="invisible"><img src="related_image3.JPG" /></li> </ul> </div> <script type="text/javascript"> $('#all ul li').on('click', function(){ $(this).addClass('selected').siblings().removeClass('selected'); $('.container ul li:nth-child(1)').fadeout(); // Don't know this line is correct or not }); </script> Any help guys ?
  3. Hi all Its my first project in CodeIgniter and I tried to make it live from local Issue is, In local server, site URI is running without index.php, but live it is giving error. e.g http://localhost/ci_basic/site/about folder name - ci_basic Controller name - site Function name - about In .htaccess file RewriteEngine On RewriteBase /ci_basic/ Now i uploaded the file in a folder named - chikabana ( folder in my root directory assigned to the chikabana.com ) In .htaccess file RewriteEngine On RewriteBase /chikabana/ I also changed the base url to - chikabana.com in config file and also removed index.php from config file. But this URL not working - http://chikabana.com/site/about this is working - http://chikabana.com/index.php/site/about Also my second question is - how i remove the controller name from url?
  4. Thanks for your suggestions. I started with codeIgniter as to have an understanding, how a framework works.
  5. Hi guys I am a php programmer and in a big confusion. I want to learn a framework, but can't figure out which one start ? CakePHP Codelgniter Symfony laravel I am new to them, so you can suggest me which one to start 1st and move on to other. Or If i miss any other framework , you can tell me that also. Any help is appriciable. Thanks
  6. Thanks kicken and Jacques1 Both of you helped me in learning new.
  7. Hey thanks for clearing me. i knew there are booleans but i need yes/no in my project
  8. thanks for reply, array_intersect_assoc() works But i am not clear, As you said - array_intersect() only checks values - not keys and here i am trying to compare the values only, and all values are different, so why i cant be able to use array_intersect() here ?
  9. Hi guys , Again i facing array comparison problem i got this after var_dump() $a and $b array(4) { ["q1"]=> string(3) "yes" ["q4"]=> string(2) "no" ["q3"]=> string(2) "no" ["q2"]=> string(2) "no" } array(4) { ["q1"]=> string(2) "no" ["q4"]=> string(3) "yes" ["q3"]=> string(3) "yes" ["q2"]=> string(3) "yes" } But when i use array_intersect($a,$b).. it results this array(4) { ["q1"]=> string(3) "yes" ["q4"]=> string(2) "no" ["q3"]=> string(2) "no" ["q2"]=> string(2) "no" } Don't know why, but there is no same value in both
  10. Hey thanks guys , i found why its coming, there were spaces in the value of my input fields and this is the most silly mistake i ever done.
  11. i tried var_dump() , and i found some problem array(3) { ["q1"]=> string(2) "no" ["q2"]=> string(10) " yes" ["q3"]=> string(10) " yes" } array(3) { ["q1"]=> string(2) "no" ["q2"]=> string(3) "yes" ["q3"]=> string(3) "yes" } After array_intersect() array(1) { ["q1"]=> string(2) "no" } Why it showing string(10), there is only 3 I think there is something messy in the value of input field
  12. Hi thanks for reply guys, nothing helping, I explain you what i am doing I entered some questions in database with answer yes or no After that i asked the same question from visitors and get their answer also .., then i compared them , Now in the same example , if i take some numeric values, instead of yes/no, the functions results correct i.e returning all the same values. i think character comparison is giving problem ? isn't it ?
  13. Hi i am trying to compare to arrays $a = Array ( [q1] => no [q3] => yes [q2] => yes ); $b = Array ( [q1] => no [q3] => yes [q2] => yes ); But when i intersect them it results in one element only, dont know why??? $c = array_intersect($a,$b); print_r($c); output - Array ( [q1] => no )
×
×
  • 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.