Jump to content

smiles

Members
  • Posts

    774
  • Joined

  • Last visited

About smiles

  • Birthday 08/27/1984

Contact Methods

  • Website URL
    http://12tren4.webs.com
  • ICQ
    0
  • Yahoo
    vnqsmiles
  • Skype
    vnqsmiles

Profile Information

  • Location
    VietNam

Recent Profile Visitors

13,236 profile views

smiles's Achievements

Invested Member

Invested Member (3/7)

7

Reputation

  1. http://www.adobe.com/devnet/adobe-media-server/articles/beginner_live_fms3.html
  2. Sorry, I forgot '.value' -> document.getElementById('search_address').value <!DOCTYPE html><html> <head> <meta name="viewport" content="initial-scale=1.0, user-scalable=no" /> <style type="text/css"> html { height: 100% } body { height: 100%; margin: 0; padding: 0 } #map_canvas { height: 100% } </style> <script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?sensor=false"></script> <script type="text/javascript"> var map; var geocoder = new google.maps.Geocoder(); function initialize() { var latlng = new google.maps.LatLng(37.77, -122.4); // set up the default options var myOptions = { zoom: 8, center: latlng, navigationControl: true, navigationControlOptions: {style: google.maps.NavigationControlStyle.DEFAULT, position: google.maps.ControlPosition.TOP_LEFT }, mapTypeControl: true, mapTypeControlOptions: {style: google.maps.MapTypeControlStyle.DEFAULT, position: google.maps.ControlPosition.TOP_RIGHT }, scaleControl: true, scaleControlOptions: { position: google.maps.ControlPosition.BOTTOM_LEFT }, mapTypeId: google.maps.MapTypeId.ROADMAP, draggable: true, disableDoubleClickZoom: false, keyboardShortcuts: true }; map = new google.maps.Map(document.getElementById("map_canvas"), myOptions); if (true) { var trafficLayer = new google.maps.TrafficLayer(); trafficLayer.setMap(map); } if (true) { var bikeLayer = new google.maps.BicyclingLayer(); bikeLayer.setMap(map); } if (true) { addMarker(map,37.7715,-122.4,"We are here"); } } function search() { var searchText = document.getElementById('search_address').value; if (searchText != '') { geocoder.geocode({ address: searchText }, function (results, status) { if (status == google.maps.GeocoderStatus.OK) { var viewport = results[0].geometry.viewport; var location = results[0].geometry.location; if (viewport) { map.fitBounds(viewport); } else { map.setCenter(location); } } }); }} function addMarker(map,lat,long,titleText) { var markerLatlng = new google.maps.LatLng(lat,long); var marker = new google.maps.Marker({ position: markerLatlng, map: map, title:"We are here", icon: "" });} </script> </head> <body onload="initialize()"> <div id="map_canvas" style="width:100%; height:100%"></div><input type="text" id="search_address" value="" size="98"/><button onclick="search();">Search</button> </body></html>
  3. lets map be a public variableyour search function maybe like this function search() {var searchText = document.getElementById('search_address');if (searchText != '') { geocoder.geocode({ address: searchText }, function (results, status) { if (status == google.maps.GeocoderStatus.OK) { var viewport = results[0].geometry.viewport; var location = results[0].geometry.location; if (viewport) { map.fitBounds(viewport); } else { map.setCenter(location); } } });}}
  4. For simple, the files and folders hierarchy will be like below - test.html- jquery-ui-1.8.20.custom.css- jquery-ui-1.8.20.custom.min.js- jquery-1.7.2.min.js- images- - - - ui-icons_cd0a0a_256x240.png- - - - ...- - - - ... and in your test.html <link type="text/css" rel="stylesheet" href="jquery-ui-1.8.20.custom.css" /><script src="jquery-1.7.2.min.js"></script><script type="text/javascript" src="jquery-ui-1.8.20.custom.min.js"></script> That's all! You dont have to worried about which jQuery ui should be imported.
  5. Try this timeout = setTimeout(function(){ sayGreet("Hello", "There!");}, 5000);
  6. Here has a lot of choices http://www.htmldrive.net/categorys/show/1/Menu-Navigation
  7. Put id for two selects<select id="users" name="users" ..><select id="age" name="age" ...> Just onchange=showUser()function showUser(){ var age = document.getElementById("age").value; var user = document.getElementById("users").value; ...}
  8. Follow Quicksand's homepage http://razorjack.net/quicksand/, I see one difference - Your div that contains <ul id='content' ...> also contains filterOptions, while in Quicksand's homepage, filterOptions place outside that div - That div also has its width nearly two times larger than <ul id='content' ...> (I think object will based on width of object's container to calculate the offset for animation)
  9. http://www.html5rock...ile/filesystem/ Chrome File API stores files as blob, for e.g you create abc.txt then the link to access maybe like this C:\Users\{your account}\AppData\Local\Google\Chrome\User Data\Default\File System\001\t\00\00000002 Here is the code I tested before <script>var fs = null;// Check for the various File API support.if (window.File && window.FileReader && window.FileList && window.Blob) { // Initiate filesystem on page load. initFS();} else { alert('The File APIs are not fully supported in this browser.');}function errorHandler(e) { var msg = ''; switch (e.code) { case FileError.QUOTA_EXCEEDED_ERR: msg = 'QUOTA_EXCEEDED_ERR'; break; case FileError.NOT_FOUND_ERR: msg = 'NOT_FOUND_ERR'; break; case FileError.SECURITY_ERR: msg = 'SECURITY_ERR'; break; case FileError.INVALID_MODIFICATION_ERR: msg = 'INVALID_MODIFICATION_ERR'; break; case FileError.INVALID_STATE_ERR: msg = 'INVALID_STATE_ERR'; break; default: msg = 'Unknown Error'; break; }; console.log('Error: ' + msg);} function initFS() { window.webkitRequestFileSystem(window.TEMPORARY, 1024*1024, function(filesystem) { fs = filesystem; }, errorHandler);} function writeFile(path, content){ fs.root.getFile('log1.txt', {create: true}, function(fileEntry) { fileEntry.createWriter(function(fileWriter) { fileWriter.onwriteend = function(e) { console.log('Write completed.'); }; fileWriter.onerror = function(e) { console.log('Write failed: ' + e.toString()); }; var bb = new window.WebKitBlobBuilder(); bb.append(content); fileWriter.write(bb.getBlob('text/plain')); }, errorHandler); fs.root.getDirectory(path, {create: true}, function(dirEntry) { fileEntry.moveTo(dirEntry); console.log('in'); }, errorHandler); }, errorHandler);} </script><button onclick="writeFile('file-api/', 'blah blah blah')">Test FileAPI</button>
  10. Hi! You should get familiar with AJAX, it is so popular http://w3schools.com...ax_examples.aspAfter understand somehow about it, I recommend jQuery.ajax http://www.w3schools...jquery_ajax.asp
  11. just surround element.fireEvent(event.eventType, event); by try catch try { element.fireEvent(event.eventType, event);} catch (error) { // error here maybe fireEvent not allow the second argument. element.fireEvent(event.eventType);}
  12. Well!!! SCRIPT438: Object doesn't support property or method 'fireEvent' prototype.js, line 5736 character 7 You may check this link http://prasadblog.blogspot.com/2009/11/prototype-eventfire-exception-to-be.html
  13. Because the #slider's width always be set with the same size as original width of the big images, so I think u have to design your images with the fix width (see below, 390px) temporarily, in .css div.mc-caption-bg, div.mc-caption-bg2 -> add width: 390px; #slider -> add width: 390px; (also, overflow: hidden)
  14. smiles

    Full height of a page

    Something like this ? <html><head><style type='text/css'> html, body {height: 100%; margin: 0} #content {width: 100%; height: 100%;} #top {position: absolute; top: 0px; bottom: 115px; width: 100%; background-color: pink;} #bottom {position: absolute; bottom: 15px; height: 100px; width: 100%; background-color: green;}</style></head><body><div id='content'> <div id='top'>blah</div> <div id='bottom'>blah</div></div></body></html>
  15. Nope!!! I see it again, smooth now, .js in minimized version so can't be edited, your config code for slider is the same as example, your css just to put the elements in the right place, no effect on smoothness. I see no problem now, sorry to confused you
×
×
  • Create New...