Development


PHP and Header redirects - Issue with ampersands

Update 08-10-2012: Apparently WordPress formatted the &'s the wrong way, so my code didn't make any sense. That's fixed now. For one of my websites I want to use a header redirect to external urls. I want to use a custom script because I don't want to give those links a higher pagerank by backlinking to them. So, normally you would have this script:

$url = 'http://www.somewebsite/index.php?options=with&more=parameters&and=stuff'; 
header('location: ' . $url);


Continue reading

1 comment


.NET Validators: How to set them as 'display: none;' instead of 'visibility: hidden;'

I came across the issue that .Net would set the validators as a hidden span, using 'visibilty: hidden;', rather than really not displaying at all. After a simple search I came to the conclusion that you should set the Display property to Dynamic instead of static. Problem solved. 🙂

Continue reading

no comments


jQuery Autocomplete: How To Search From The Start

I came across a problem using the autocomplete function in jQuery. I use a search for countries, and I want the result to start with the letter I fill in the textbox, but instead, I got all the results containing the user input. I spent some time searching for an answer, but I couldn't find anything, so I started to look in the source (in my case: jquery-ui-1.8.9-custom.min.js). In the autocomplete function, I ended up changing this: filter:function(a,b){var f=new RegExp(d.ui.autocomplete.escapeRegex(b),"i"); to this: filter:function(a,b){var f=new RegExp("^" + d.ui.autocomplete.escapeRegex(b),"i"); Now it finally works properly.

Continue reading

no comments

Add a Comment

Your email address will not be published. Required fields are marked *

*