I am working in my company website which it has a front o index page like Google with a search form. I would like to create the same effect as Google, once someone start looking for any product, it will switch from having a search form in the center of page to having it in the top of page, plus having the auto complete search field.
I am using the PHP and MySQL for my website.
I would appreciate any feedback since I got a deadline set by my boss.
Thank you very much in advance for your help.
Cheers.
Easiest way of changing the page is using jQuery's .change() function for it:
http://api.jquery.com/change/
But it will be some work to acquire that effect.
For auto completion you can use jQueryUI's Autocomplete:
http://jqueryui.com/autocomplete
Hope it helps and good luck with your deadline ;)
Related
I am new to DRUPAL switching from codeigniter. I have a project on drupal you can check the link here http://idcr.cprindia.org/database. Someone please suggess me how can make search + show output with maps on the given link (with proper ajax).
how to do this integration. I have an html which is using bootstrap. (i think that will create problem to existing website).
Good morning,
As far as I know, displaying a Google Chart is quite easy. You just have to add some Javascript code.
I suggest writing your own module. In this module I would create a block. First of all, you need to perform the database queries needed to gather the info you want to display. Second, you should use drupal_add_js() to invoke a function stored in a different JS file. You need to pass the chart info in the settings array.
Hope it helps.
I have seen this in many apps where user is first asked to click like button and then redirected to the main app. How can I achieve this?
I am using php.
Adding a like button on top of the app pages doesn't attracts much likes.
Any help is appreciated!
-Sandy
There are so many solution already for this. Basically you just need a javascript script to hide the main page , and a php script to show the page so that until the user cliks like, then you show it.
A simple searching gave alot of code.
check this ones on stack, or this one and also, this one
Basically, you have to use jquery to hide the page
hope this helps!
i am stuck here please any one suggest me how to do this. i want like this http://www.finchatton.co.uk/. in this URL at top of the menu there is a link "COMPLETED DEVELOPMENTS". please click once. in this page click on one of the area in map. now we will get hot spots in map. so i have to create that spots dynamically.
anybody give an idea.
thanks.
That is done in Flash, it has nothing to do with PHP. PHP could probably be used to parse some data that Flash uses later...
EDIT: If you want the same functionality...
I suggest using Google maps API http://code.google.com/intl/lv/apis/maps/index.html
Just store the interest points in database with coords, then just fetch and display them on the google map.
I want to make a dynamic widget to show votes on a particular topic.
I want to make a copy/paste widget so that other site can show vote via copy/paste html/js/css code provided by me.
It's similar to how we use js/html code for showing bookmark & share tool.
Can anyone give any ideas how to do this ?
Thanks in advance.
To do this you nead to use a swf file.
Javascript deny it for security reasons.
View this Link:
Zero Clipboard
Very simple to say, you can have a php class for taking votes for a particular topic from database. And a controller class that calls this method. With a simple xmlhttprequest or just using simple post function on JQuery, you can get the votes and show them in your html. If you provide more details i can provide more detailed solution.
I want to reach a function like twitter. When people add a comment in my site anywhere. The newest information will display in one part of my home page. And upload the information without refresh the home page. I think it could be done by ajax, but I am a newbie, can anyone give me a live demo? or introduce me some plugin?
This is a good start for jquery: http://jqueryfordesigners.com/simple-jquery-spy-effect/
Then your ajax call will simply need to get the latest comments from your database. Probably by timestamp or datetime
There is a good example and study material for ajax
http://www.w3schools.com/Ajax/ajax_example.asp