url

XML url link in Flash

Hi, I am new to XML and am having a small problem in Flash. I have a number of buttons. Each of these buttons need to open up a different URL which is in a xml file (I have added only one button for now (banstead), as I wasn´t sure how to add more). My XML: <?xml version="1.0" encoding="utf-8"?> <banstead targ="_self" href="http://www....

Detect anchor is leading to an active window.location

Having such an html: <a class="someclass" href="some/url/absolute/or/relative">Blah</a> ... along with such javascript: $("a.someclass").onclick(function() { var link = $(this).attr("href"); if (link == window.location) // <<<<<<<<<<<< doSomethingSpecial(); else doOtherThing(); return false; }); this...

JQuery - Fetching a URL that returns 404 on first few fetches, then returns 200

Fetch a URL - mywebiste.com/blah.php --> returns 404 Fetch a URL - mywebsite.com/blah.php --> returns 404 Fetch a URL - mywebsite.com/blah.php --> returns 404 Fetch a URL - mywebsite.com/blah.php --> returns 200 // how do I loop until this the URL returns 200? Previously phrased: So I have a URL (foo) that I need to download after m...

Launch iPhone app from link in email

Hi, I've been trying out the URL schemes in the iPhone SDK and I have got my application to launch using a custom URL scheme like "myap://Dosomething" but that is not really practical for what I want. Is it possible to register a scheme somehow that would allow links in emails like "http://www.mydomain.com/" to launch my application, li...

Sitecore not resolving rich text editor URLS in page renders

Hi We're having issues inserting links into rich text in Sitecore 6.1.0. When a link to a sitecore item is inserted, it is outputted as: http://domain/~/link.aspx?_id=8A035DC067A64E2CBBE2662F6DB53BC5&amp;_z=z Rather than the actual resolved url: http://domain/path/to/page.aspx This article confirms that this should be resolved in th...

Making a url with timestamp, whitespace between date and time breaks url

Hi, I'm working on the Head First PHP and MySql book, and I have this problem with a date/timestamp. I'm going to make an URL with a date as a GET parameter. But when the date is returned from the database (type of timestamp), there is a white space betwen the date and the time, so the URL breaks. How can I format the date to get incl...

How to check for a valid URL in Java?

What is the best way to check if a URL is valid in Java? If tried to call new URL(urlString) and catch a MalformedURLException, but it seems to be happy with anything that begins with http://. I'm not concerned about establishing a connection, just validity. Is there a method for this? An annotation in Hibernate Validator? Should ...

Best way to convert title into url compatible mode in PHP?

http://domain.name/1-As Low As 10% Downpayment, Free Golf Membership!!! The above url will report 400 bad request, how to convert such title to user friendly good request? ...

Modrewrite regex

I have the following URL: http://www.domain.com/keyword/b21?f=&amp;ca1=50&amp;p=1 And the RewriteRule I am trying to use is as follows: RewriteRule ^([^.]+)/b([0-9]+)?f=([^.]+)&p=([0-9]+)$ script.php?id=$2&p=$2&filters=$3 Unfortunately this rule is not matching the URL. I think it has something to do with the ? as i know this is a c...

Apache Django URL problem

I allow users to submit a query at mysite.com/go/QUERY\ If the query contains "/" Apache chokes. From urls.py: (r'^go/(?P<querytext>.*)$', 'mysite.engine.views.go'), Try: http://mysite.com/go/http%3A%2F%2F Result: Not Found The requested URL /go/http:// was not found on this server. Apache/2.2.12 (Ubuntu) Server at ... BUT, ...

In GWT I'd like to load the main page on www.domain.com and a dynamic page on www.domain.com/xyz - I just can't make it work.

Hi, I have a question for which I'm sure there must a simple solution. I'm writing a small GWT application where I want to achieve this: www.domain.com : should serve the welcome page www.domain.com/xyz : should serve page xyz, where xyz is just a key for an item in a database. If there is an item associated with key xyz, I'll load...

Back to a Previous URL post-publishing a Note in Facebook

Hi, Anybody know how to back to previous link Post-Publishing something in Facebook, for our convenience there's back buttons no browser back buttons, Facebook doesn't redirect to the previous URL programmatically. The only way for me is to wait for expiring the time out. Please throw me some light on this... Thanx!!! ...

Site name appearing in django URLs

I'm having an issue where a call to the url template tag in Django is appending the site name (I don't want it in there.) Let's say that the site name is 'mysite'. So for example: <a href="{% url myapp.views.myview "myparam" %}">Link text</a> is producing: <a href="/mysite/foo/bar">Link text</a> when I want it to produce: <a hre...

Examples using javascript to run a GET on another URL, retrieve the xml returned and look up a specific node?

How would I get an xml document from a particular url in javascript then look up a particular sub node and get the value? ...

remove 'WWW' in ASP.NET MVC 1.0

I am attempting to force the domain name to not use the 'www'. I want to redirect the user if attempted. I have seen very little on an MVC solution. Is there anyway to harness the routing built into MVC, or what the best solutions is. Thanks ...

How can I save a JPEG from a URL to a file?

I am trying to save a JPEG image from a URL to a file with Java. URL: http://150.214.222.100//axis-cgi/mjpg/video.cgi?resolution=640x480&amp;compression=1&amp;duration=1&amp;timeout=&amp;dummy=garb I tried the following: 1) Image image = fetchImage(urlNorthView); saveImage2Disk(image); public static Image fetchImage( URL u ) throws ...

Matching patterns in URL with a language similar to regexp, but specific for URLs

I use matching URLs in a part of my code. Now I use regular expressions for this. This is fine, but does not always produces "nice", simply readable patterns. Is there any language defined for matching URLs? It should be like this: http://*.example.com/* so simply wild-cards and things useful for URL would be there. The best would if th...

Pretty (dated) RESTful URLs in Rails

I'd like my website to have URLs looking like this: example.com/2010/02/my-first-post I have my Post model with slug field ('my-first-post') and published_on field (from which we will deduct the year and month parts in the url). I want my Post model to be RESTful, so things like url_for(@post) work like they should, ie: it should gen...

Links to files inside PHP/HTML code subject to .htaccess mod_rewrite too?

Just wanted to make sure: When I write: require('/path/to/file/file.php'); Is the file required with respect to Apache's mod_rewrite? (which seems unreasonable, since it should be there for user URL redirection) What I mean is, that if .htaccess sends all requests to "index.php", index.php would be required instead? And When inside...

How to dynamically create routes in a HTML actionlink

I am trying to send the route values to a method but I cant seem to figure this out. Here is my code <% string s = "cool"; object d = new { s = "1" }; %> <%= Html.ActionLink("Home", "Index", d, "ql")%> The following code produces a url like this http://localhost:49450/?s=1 the url should be like this http://localho...