Jump to content

frizi

Members
  • Posts

    23
  • Joined

  • Last visited

    Never

Everything posted by frizi

  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.
  16. I cannot provide you a proper answer but I would go for the Zend server instead of mixing Apache PHP + Zend. Zend server provides you the same as an usual framework so you don't need to install extra the xampp. Otherwise, try to check any tutorial or youtube. Good luck!
  17. If you have the two descriptions and you want to make a summary or an conclusion about them then here you go: The operating system is the playground, the application are the toys. We have to go to the playground to use the toys. The operating systems are providing the basic input output for the programs, they are general and extensible. Programs are more function focused and limited. Here's a dilema, operating system can be loaded as a service - program (virtual OS localy or on the web). BTW if you are writing about OS, then you could mention also the Web OS like EyeOS and iClouds (I think that this will be the future of OS). Cheers
  18. Then you should learn to study. Don't be mean :]
  19. The answer is in the encoding. You have to unify everything into UTF8 (I thing it should contain also arabic chars). At each php file start with header("Content-Type: text/html; charset=utf-8");. This way if the server has different char. encoding, it will force the browser to display the text in UTF-8. Salem :]
  20. I was on couple of inteviews and each stupid small meaningless company requires Zend. Zend is not big deal, the only thing you have to know about it is the basic commands, the MVC and the Bootstramp handling. If you want to go proffesional way with PHP, install the Zend server and play with it, you will be asked on the interview regarding it even if the company is not using Zend. BTW, zend develops PHP and maybe therefor everyone is crazy about it.
  21. Hi It would be great if you could help me with my problem. I would like to use a regex expression (or a php script) that would select one complex tag. The complexity at this is that the tag could contain the same tag inside (at menu content for example - ul li ul). Therefor I need a special code that would search so many closing tags as many opening tags for matching the following first UL: <ul> <li> first </li> <li> <ul> <li> second </li> <li> <ul> third </ul> </li> </ul> </li> <li> <ul> <li> fourth </li> </ul> </li> <li> end of selection </li> </ul> <ul> this should be not selected </ul> I need to search so many opening tags as closing tags from the first tag (ul) until next different tag. It was told me that I should use Dom document. This is not possible because I'm working with transitional style html style and I need just the first level (main) tags. Thank you in forward.
  22. I was thinking in similar way. I think it would be better to make a function that is checking if the first selected tag contains the root tag and if yes, take the second, or as many such tags are enclosed, closing tag. I was also thinking to use simplexml functions to work with those tags. Anyway, thanks for your help!
  23. Hi! I would like to ask if someone could help me out with the issue which I'm confronting with. My goal is to cut the whole tag that might contain the ending tag that of the root tag. For example: <p id="test" class="932"> line1 <b> test of B</b> <p> ignore this paragraph</p> some text</p> // and don't finish at "this paragraph</p>" <ul id="test" class="932"><li>line1</li> <li><ul id="test2" class="done"><li> subline 1</li> <li> subline 2 </li> </ul> <li> line2</li> </ul> // and don't finish at "e 2 </li></ul>" if there is a way how to solve this, please let me know. There could be different tags with different attributes. Important is to cut out the root tag. I'm stuck in that problem and I would need a advice. Thank you!
×
×
  • 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.