Jump to content

frizi

Members
  • Posts

    23
  • Joined

  • Last visited

    Never

About frizi

  • Birthday 07/04/1984

Contact Methods

  • Website URL
    http://www.frizi.net
  • ICQ
    205933036
  • Yahoo
    leginski_f_e

Profile Information

  • Gender
    Male
  • Location
    Bratislava

frizi's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hi, would be great if you could help with the following code. It should put a marker on the map regarding the found place. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml"> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"/> <title>Google Maps API Example: Simple Geocoding</title> <script src="http://maps.google.com/maps?file=api&v=2&key=ABQIAAAAjU0EJWnWPMv7oQ-jjS7dYxSPW5CJgpdgO_s4yyMovOaVh_KvvhSfpvagV18eOyDWu7VytS6Bi1CWxw" type="text/javascript"></script> <script type="text/javascript"> function first_run(){ map_from = new GMap2(document.getElementById("map_canvas_from")); map_to = new GMap2(document.getElementById("map_canvas_to")); map_from.setCenter(new GLatLng(48.7209956,21.2577477), 2); map_from.setUIToDefault(); map_to.setCenter(new GLatLng(48.7209956,21.2577477), 2); map_to.setUIToDefault(); } function showAddress(address,element_id){ map = new GMap2(document.getElementById("map_canvas_"+element_id)); map.setUIToDefault(); geocoder = new GClientGeocoder(); geocoder.getLocations(address, addToMap); } function addToMap(response){ //delete marker; //place=NULL; //point=NULL; place = response.Placemark[0]; point = new GLatLng(place.Point.coordinates[1],place.Point.coordinates[0]); change_text(point); marker = new GMarker(point,{draggable: false}); marker.openInfoWindowHtml(marker.getLatLng().toUrlValue(6)+' '+place.address); map.addOverlay(marker); map.setCenter(point, 10); } function change_text(text){ var txt=document.getElementById("info"); txt.innerHTML=text; } </script> </head> <body onload="first_run()" onunload="GUnload()"> <form action="#"> <input type="text" style="width:350px" name="address_from" value="" /> <a href="" onclick="showAddress(address_from.value,'from'); return false;" >find from</a> <div id="map_canvas_from" style="width: 600px; height: 500px"></div><br/><br/> <input type="text" style="width:350px" name="address_to" value="" /> <a href="" onclick="showAddress(address_to.value,'to'); return false;" >find to</a> <div id="map_canvas_to" style="width: 600px; height: 500px"></div> </form> <a href="#" onclick=" change_text('cleared');">click</a> <div id="info">Info</div> </body> </html>
  2. and than at first row insert this: <?php header("Content-Type: text/html; charset=UTF-8"); ?> + get Nodepad++, open one of your files, change the encoding to UTF8 - without BOM and see if there will be the signs. Let us know :].
  3. Your question is right. Many beginners (including me in the past) don't understand what is the advantage of a framework until he has to made his own framework and finds out that there is other framework which is much better than the created. Just think that you have a Content Management System to make. Now you create a program/system which handles the data within MVC pattern. You have to make the controller, model and view to work. Also you want that this system does extra like loging, handling sessions, do something with arrays and so. Now instead of making these functions on your own, you can just take a super duper framework which provides you the necessary functions and instead of experimenting with your own code, you have a ready made system which is acknowledged by a big community and you can be sure that the solution applied within the framework is appreciated by other, more advanced programmers. Sooner or later, you will end at an framework. If you want to make something good for your programmer life and want to stick with PHP, I would advice you to look into Zend framework because everyone is so crazy about it or if you want a soft start, check Code Igniter and read, no really read the help about it. It's one of the best and quickest helps that I've ever seen. I hope that I've succeed to bring you closer to frameworks. If not, a short explanation for frameworks would be that they provide ready made functions which you can use. Ah, disadvantages of the framework are bugs which can be a big threat for each web site that is running on that framework. Therefor I've prefer to make my own functions but use the basic functions of the framework.
  4. the mentioned syntax it's correct also from mathematical point of view. There is no reason to put the (). Is there any problems with it?
  5. It might be unknown for me but what is the _ doing before the () and printf ? Try to comment som parts of the code for instance the 122 line and see if there will be the next line with error. If so the problem is in a row before the 122. Try netbeams or Eclipse to see if the code is OK.
  6. You welcome, next time you should also help to others if you will be able to!
  7. Welcome on board :] If you wish to select only a specific row, you have to use the following select syntax: $sql = "SELECT UNIQUE patient_id, patient_name, patient_ic, patient_mobile, patient_add, patient_city, patient_state FROM patient_healthcare ORDER by patient_id ASC WHERE patient_id=\'".$_REQUEST['patient_id']."\'"; $_REQUEST['patient_id'] should be the form input or selection so you have to make an selector or input box with name patient_id and a value. This value will be the where search argument.
  8. I'm aslo excluding such effect on your script. There must be something else what is causing this. Just past the original code, the one you poste seems to be different and not real.
  9. Just look into the content of th php directory and open those files.
  10. frizi

    Duel Select

    This problem need more explanation for instance sample tables would help. As I understand right, you need to join the tables? use Left join or Where (my option) to do this. select images.image, videos.video where videos.imgID = images.id ORDER BY videos.timestamp . Ask your best friend (google) how to proceed.
  11. First thing what came to my mind is to start with a map, an image in high resolution. Then a I would make XY coordinates on that image which would represent the countries. If you would ask me, I would use flash for this (I'm pretty sure that such a map is already made), otherwise it's a lot of JS.
  12. Sure, it's not difficult at all. You have to make <a name="nameOfPagePart"></a> and if you make the link you should use th http://www.pageName.com/pageLink.php#nameOfPagePart and at loading of the page it will jump directly to the "nameOfPagePart".
  13. It would definitively help to see the concrete error message but as far I see there should not be any error there. just wondering what does the print _() do. Shouldn't be print_r(); or so? (I might not know such usage, sorry if so :] ).
  14. One thing which i'm thinking at would be to use line-height:100px; where 100px is the size of the elment or so. This way the text will be in the vertical middle. Try to play with the width and height property and center it also vertically with the mentioned command. Good luck!
  15. Hi, i was working on a similar problem before some time and stuck in the problem with Opera browser which had difficulties with newly added rows. It wasn't sending to the server after send. However, you can use a simple JS which adds to the page the new <input /><div id="newTag"></div>. You need an activator button or event which is adding this tag each time you press it instead of the newTag div. Good luck with solving your project.
×
×
  • 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.