Jump to content

gazever

Members
  • Posts

    133
  • Joined

  • Last visited

About gazever

  • Birthday 02/13/1981

Profile Information

  • Gender
    Male
  • Location
    United Kingdom

gazever's Achievements

Member

Member (2/5)

0

Reputation

  1. if anyones interested here final working code, however IE8 doesnt show the alert message, anyone know why? <script type="text/javascript"> function submitform(){ var selectedvalue = document.getElementById("size") ; if(selectedvalue.value == "choose"){ alert("Please choose a size"); } else { document.addtocart.submit(); } } </script> <a href="javascript:submitform()" class="buy">Add to shopping bag</a>
  2. Hi Im really a PHP programmer and trying to cobble together some code for a very simple form validation, what i need to do is if a select value is at its default state of "Choose size" I need to make an alert saying choose size before sending the form. In IE it keeps saying this page contains errors "object doesnt support this method or property "but functions ok, however this is stopping me from adding another zooming in javascript for images. Could someone Please amend or let me know what im doing wrong. in the head <script type="text/javascript"> function submitform(){ var sizevar = document.getElementById("size"); if(!madeSelection(sizevar, "Please Choose a Size")){ } } function madeSelection(elem, helperMsg){ if(elem.value == "choose"){ alert(helperMsg); elem.focus(); return false; }else{ document.addtocart.submit(); } } </script> bit of a mismatch of code, dont know javascript and the link to submit the form <a href="javascript: submitform()" class="buy">Add to shopping bag</a> Thanks!
  3. OK, fixed it using bcsub (1481.00,1480.99,2) How weird.
  4. Hi foodigi, Thanks Did you resolve your issue by rounding?
  5. I'd start by using explode on the xml string on the <row>, then looping the array using str_replace on the </row>, then do the same for <name> and <city> making an php array to hold all the data, then loop through this array to put the data how you need it.
  6. Hi I'm getting an unexpeted result from the following, <?php echo 1481.00-1480.99; ?> output = 0.00999999999999 Does anyone understand why this is happening?
  7. Yes I have all errors on, what you pointed out was what I was missing, been coding normal PHP for a couple of years, now trying to include classes as part of my coding practices, more learning curves. Thanks for your help
  8. Hi what am I doing wrong here Just trying to learn and use classes class form{ var $variable1 = 'test string here'; function return_form(){ return $this->$variable1; } } $test = new form; $theform = $test->return_form(); echo $theform;
  9. Sussed it myself, was trying to use V2 code in my V3 api, this is the fix if anyones interested var myOptions = { zoom: 11, center: hollywoodstudios, mapTypeControl: true, mapTypeControlOptions: {style: google.maps.MapTypeControlStyle.DROPDOWN_MENU}, navigationControl: true, navigationControlOptions: {style: google.maps.NavigationControlStyle.SMALL}, mapTypeId: google.maps.MapTypeId.ROADMAP, scrollwheel:false } just set scrollwheel to false
  10. Hi I'm trying to disable the mouse wheel scroll function on google maps, here is my code, cannot figure out where to put the following code into it disableScrollWheelZoom() <meta name="viewport" content="initial-scale=1.0, user-scalable=no" /> <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script> <script type="text/javascript"> function initialize() { var house = new google.maps.LatLng('.$lat.','.$lon.'); var hollywoodstudios = new google.maps.LatLng(28.3576995,-81.5610138); var epcot = new google.maps.LatLng(28.3737300,-81.5492050); var universal = new google.maps.LatLng(28.4722601,-81.4690932); var seaworld = new google.maps.LatLng(28.4095199,-81.4622289 ); var magickingdom = new google.maps.LatLng(28.4197794,-81.5802069); var animalkingdom = new google.maps.LatLng(28.3575650,-81.5903850); var image = \'http://www.debbiesvillas.co.uk/images/villa_icon.gif\'; var myOptions = { zoom: 11, center: hollywoodstudios, mapTypeControl: true, disableScrollWheelZoom:true, mapTypeControlOptions: {style: google.maps.MapTypeControlStyle.DROPDOWN_MENU}, navigationControl: true, navigationControlOptions: {style: google.maps.NavigationControlStyle.SMALL}, mapTypeId: google.maps.MapTypeId.ROADMAP } var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions); Thanks
  11. Hi I have a list of places of interest which I have their Lat & Lon for, I also have another list of villas of which I'd like to calculate the driving distances between the items. I can output a map with the directions from one point to another, but could I just output the distances between points as a list rather than the directions. Or can I capture the javascript variable and enter into a database to retrive with php to output a list of distances. What id like to achive is something like Distance to Disney: 2 miles Distance to Seaworld: 4 miles Distance to Kennedy Space Center: 15 miles.. etc. Or would I have to manually query every villa for every item and then enter it in a DB I only really know PHP, javascript is new to me hence the lack of knowledge. Google example http://code.google.com/apis/maps/documentation/examples/directions-simple.html HTML BELOW: <!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> <title>Google Maps JavaScript API Example: Simple Directions</title> <meta http-equiv="content-type" content="text/html; charset=UTF-8"/> <script src="http://maps.google.com/maps?file=api&v=2.x&key=ABQIAAAAzr2EBOXUKnm_jVnk0OJI7xSosDVG8KKPE1-m51RBrvYughuyMxQ-i1QfUnH94QxWIa6N4U6MouMmBA" type="text/javascript"></script> <script type="text/javascript"> // Create a directions object and register a map and DIV to hold the // resulting computed directions var map; var directionsPanel; var directions; function initialize() { map = new GMap2(document.getElementById("map_canvas")); directionsPanel = document.getElementById("route"); directions = new GDirections(map, directionsPanel); directions.load("from: 28.1391880, -81.3604530 to: 28.415800, -81.455905"); } </script> </head> <body onload="initialize()"> <div id="map_canvas" style="width: 70%; height: 480px; float:left; border: 1px solid black;"></div> <div id="route" style="width: 25%; height:480px; float:right; border; 1px solid black;"></div> <br/> </body> </html> Hope this makes sense Many Thanks Gazever
  12. Would you be able to look at the following site and let me know what you think http://www.debbiesvillas.co.uk Being more of a developer than a designer and having spent so much time looking at it now not sure how it looks? Thanks
  13. I am building a databse of crossword words. I want to select where word = d?t? I am trying to use select where word like 'd%t%' however when running it I expect to get returned results of the word DATA but it seems to search where d & t are in that order returning for example ADIT, DART etc do I have to get all these results then match character for character through an array or can I do this in my mysql query Many Thanks Gazever
×
×
  • 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.