Jump to content

SiteSniffer

Members
  • Content Count

    21
  • Joined

  • Last visited

Posts posted by SiteSniffer

  1. I'm a newbie when it comes to JS but I'm trying to understand it and alter a few snippets to learn more. Here's my issue. I have the JS script running at my page, it autoloads an mp3 and plays it while the page starts. Nothing wrong, everything works. I also have a few buttons on the page that start a new mp3, that also works great. The issue is that it still plays the older mp3 files when selected a new one. Can somebody help me out here? I'm trying to stop all playing audio (no matter howmany buttons are pressed for playing audio) automaticly when a new button (play a new mp3) is pressed, so far no luck. Some help is highly apriciated. The code:

    		<script type="text/javascript" charset="utf-8">		// Wait for PhoneGap to load		//		document.addEventListener("deviceready", onDeviceReady, false);		// PhoneGap is ready		//		function onDeviceReady() {			playAudio("/zzz/mypath/to/start.mp3");		}		// Audio player		//		var my_media = null;		var mediaTimer = null;		// Play audio		//		function playAudio(src) {			// Create Media object from src			my_media = new Media(src, onSuccess, onError);			// Play audio			my_media.play();			// Update media position every second			mediaTimer = setInterval(function() {				// get media position				my_media.getCurrentPosition(					// success callback					function(position) {						if (position > -1) {							setAudioPosition(position + " sec");						}					},					// error callback					function(e) {						console.log("Error getting pos=" + e);					}				);			}, 1000);			// SeekTo to 10 seconds after 5 seconds			setTimeout(function() {				my_media.seekTo(10000);			}, 5000);		}		// Stop audio		//		function stopAudio() {			if (my_media) {				my_media.stop();			}			clearInterval(mediaTimer);			mediaTimer = null;		}		// onSuccess Callback		//		function onSuccess() {			console.log("playAudio():Audio Success");		}		// onError Callback		//		function onError(error) {			alert('code: '	+ error.code	+ '\n' +				  'message: ' + error.message + '\n');		}		// Set audio position		//		function setAudioPosition(position) {			document.getElementById('audio_position').innerHTML = position;		}		</script>

    an somebody give me a helping hand here?

  2. I'm trying to get a marker on the location with a small text-balloon, displaying the location name (manually set). Sofar I came up empty handed when it comes to searching on Google trying to find a solution. Here's my working code sofar:

        <script type="text/javascript"src="http://maps.googleapis.com/maps/api/js?&sensor=false"></script>    <script type="text/javascript">	  function initialize()          {            var myOptions = {                                center: new google.maps.LatLng(my.coords, go.here),                                zoom: 16,mapTypeId: google.maps.MapTypeId.ROADMAP                            };            var map = new google.maps.Map(document.getElementById("map_canvas"),myOptions);          }    </script>

    Can somebody help me out with the marker and the balloon please? Tia.

  3. I'm trying to understand the proper prodecure for creating an environement for creating apps (HTML5) for mobile phones (IOS and Andriod). I've looked at several sites and they're all a bit misguiding to me so I was wondering if somebody can help me out on this one. This is what I have sofar: - My system: PC/Windows7- I got: Apple dev account- I got: Dreamweaver 5.5 Sofar I can't figure out wich SDK I need to install for iOS support in Dreamweaver (PC), the only thing I see is for MAC.I'm hoping that you guys can help me out with good suggestions/solutions.

    • Like 2
  4. I'm having trouble sizing the field in pixels. Currrently it's 40 characters but I really want it to be like a total length of 400 pixels (including the button).This is what I currently have:

    echo	 '<input name="file" type="file" id="file" size="40" style="border: 1px solid #06F;" />';

    Any suggestions?

  5. I realised that and went straight back to the script and tested it, works fine. Then I wanted to edit my post with the solution but you beat me to it :)Thank you for your reply and solution anyway, I appriciate it.

  6. You can do pathinfo() for the extension out of $_FILES['file']['name']. Of course, doing so doesn't guarantee that the DLL file is going to REALLY be a DLL (it might as well be an HTML page renamed to ".dll"), but at least you'll have that check at hand.
    I did the pathinfo() on the cached file and gave a tmp as an extention. Can I get the real name of the cached file and store in in a $?
  7. Is there a way to check if an attempt to upload a file with a dll extention by using $_FILES["file"]["type"] == ?I'm trying to let my script to allow only dll files.PS: script is working fine with images $_FILES["file"]["type"] == "image/png", only need to check for dll.

  8. No I did not. I'm using non-default descriptions for the payment, IE: invoice-number (generated from own database) + selected product + price (generated from own database) + tax (read from own database). The Paypal wizzard doesn't give me such/simular option.

  9. I've already got a Paypal form, works like a charm. Here's my problem:- People order their products, everything stored in $_SESSION's.- Payment page: people click the paypal button- Payed by paypal- Paypal returns to my website (button)I want to store all the data (order products, name, shipping address etc) in a database but I want to do it after payment has been made. Is it possible to check if people actually payed with paypal instead of being a smart guy and go directly to the confirmation pages of my website (so skipping the paypal)? If so, how?

  10. I ment when my website detects Dutch (nl) browser headers I want the metatags keywords (in header) to be in Dutch. IE <META NAME="keywords" CONTENT="word1, word2, word3">.Does Google check for language and then index a website? If not my routine will be useless I think.

  11. I'm checking browser language by using substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2).Am I allowed to use it for defining metatags keywords or will Google have problems indexing? I'm trying to have differend languages in metatags.

  12. I can't seem to fin the error in this and I was hoping you all could take a quick peek at it. I'm making an upload script that makes you able to upload images to a server. Jpg and Gif work fine, PNG gets me an invalid. Here's the snippet:

    if (($_FILES["file"]["type"] == "image/gif")	|| ($_FILES["file"]["type"] == "image/png")	|| ($_FILES["file"]["type"] == "image/jpeg")	|| ($_FILES["file"]["type"] == "image/pjpeg")	&& ($_FILES["file"]["size"] < 20000))  {

    I am 100% sure that the png files I tried to upload are valid png files (photoshop -> save for webdevices etc etc) so that's not it, the error is somewhere in the code (above) I think. Anyone got a clue what I'm doing wrong?

  13. Developing websites is something I can do. Now I'm investigating the search-engines like Google. When websites are displayed on the 1st entry of Google some have a list with pages underneith their main link. Perfect example is w3schools. Are there guidelines for this? How can I accomplish the same result (when php is used)?

  14. I only use one image in the email (business logo, 120x120 px) so that's can't be the issue I think.I was under the asumption that randomizing a string would change the hash of the output HTML email, asuming that spamfilters filter on known hashes used in spam emails. If 'my assumption is wrong then please let me know.

  15. Hello all,I'm testing my email form and it's working great. It sends an email with HTML invoice to a customer. My question is how do I prevent it to be picked up as spam? Is there a way to randomise a string and implent it somehow in my mail routine? If so, how?

×
×
  • Create New...