url

Sending values through links (html)

Here is the case, i got 2 pages. What i want is to have a number of text links( ) on page 1 all directing to page 2, but i want each link to send a different value. On page 2 i want to show that value like: Hello you clicked {value} Another point to take in account is that i cant use any php in this situation, just html. ...

How to play a sound in Actionscript 3 that is not in the same directory as the SWF?

I have a project with a bunch of external sounds to a SWF. I want to play them, but any time I attempt load a new URL into the sound object it fails with either "Error #2068: Invalid Sound" or raises an ioError with "Error #2032 Stream Error". // Tried with path prefixed with "http://.." "file://.." "//.." and "..") var path:String = ...

Relative urls for Javascript files

I have some code in a javascript file that needs to send queries back to the server. The question is, how do I find the url for the script that I am in, so I can build a proper request url for ajax. Ie. the same script is included on /, /help /whatever and so on, while it will always need to request from /data.json. Additionally, the sa...

ASP.NET MVC: Making routes/URLs IIS6 and IIS7-friendly

I have an ASP.NET MVC-application which I want deployable on both IIS6 and IIS7 and as we all know, IIS6 needs the ".mvc"-naming in the URL. Will this code work to make sure it works on all IIS-versions? Without having to make special adjustments in code, global.asax or config-files for the different IIS-versions. bool usingIntegratedP...

Create query parameters in javascript

Is there any way to create the query parameters for doing a GET request in javascript. Just like in python you have urllib.urlencode() which takes in a dict (or list of two tuples) and creates a string like 'var1=value1&var2=value2' ...

Friendly url scheme?

One of the many things that's been lacking from my scraper service that I set up last week are pretty URLs. Right now the user parameter is being passed into the script with ?u=, which is a symptom of a lazy hack (which the script admittedly is). However, I've been thinking about redoing it and I'd like to get some feedback on the option...

Accessing URL parameters in Oracle Forms / OC4J

How do I access parameters passed into an Oracle Form via a URL. Eg given the url: http://example.com/forms90/f90servlet?config=cust&form='a_form'&p1=something&p2=else This will launch the 'a_form' form, using the 'cust' configuration, but I can't work how (or even if it's possible) to access p1 (with value of 'somethi...

URL encode in Erlang

I'm using erlang http:request to post some data to a remote service. I have the post working but the data in the body() of the post comes through as is, without any url encoding which causes the post to fail when parsed by the remote service. Is there a function in Erlang that is similar to CGI.escape in Ruby for this purpose? ...

Dash vs. Underscore

Should it be /about_us or /about-us? From usability point of view, I personally think /about-us is much better for end-user yet Google and most other websites (and javascript frameworks) use underscore naming pattern. Is it just matter of style? Are there any compatibility issues with dashes? ...

How do you structure your URL routes?

Is there a specific pattern that developers generally follow? I never really gave it much thought before in my web applications, but the ASP.NET MVC routing engine pretty much forces you to at least take it into consideration. So far I've liked the controller/action/index structure (e.g. Products/Edit/1), but I'm struggling with more c...

How do you get a spreadsheet to open Excel instead of a browser window?

If you call javascript window.open and pass a url to a .xls file it open on some machines in the browser window. How can you force it into Excel? ...

How can I normalize a URL in python

I'd like to know do I normalize a URL in python. For example, If I have a url string like : "http://www.example.com/foo goo/bar.html" I need a library in python that will transform the extra space (or any other non normalized character) to a proper URL. ...

Determine site's absolute, fully-qualified url in asp.net

How can I consistently get the absolute, fully-qualified root or base url of the site regardless of whether the site is in a virtual directory and regardless of where my code is in the directory structure? I've tried every variable and function I can think of and haven't found a good way. I want to be able to get the url of the current ...

URL Encryption in Java

What is the best way to encrypt an URL with parameters in Java? ...

QueryString malformed after URLDecode

I'm trying to pass in a Base64 string into a C#.Net web application via the QueryString. When the string arrives the "+" (plus) sign is being replaced by a space. It appears that the automatic URLDecode process is doing this. I have no control over what is being passed via the QueryString. Is there any way to handle this server side? Ex...

How can I dynamically switch web service addresses in .NET without a recompile?

I have code that references a web service, and I'd like the address of that web service to be dynamic (read from a database, config file, etc.) so that it is easily changed. One major use of this will be to deploy to multiple environments where machine names and IP addresses are different. The web service signature will be the same acr...

Is it possible to link to a bookmark within a PDF using URL parameters?

When providing a link to a PDF file on a website, is it possible to include information in the URL (request parameters) which will make the PDF browser plugin (if used) jump to a particular bookmark instead of just opening at the beginning? Something like: http://www.somehost.com/user-guide.pdf?bookmark=chapter3 ? If not a bookmark, wo...

PHP Application URL Routing

So I'm writing a framework on which I want to base a few apps that I'm working on (the framework is there so I have an environment to work with, and a system that will let me, for example, use a single sign-on) I want to make this framework, and the apps it has use a Resource Oriented Architecture. Now, I want to create a URL routing c...

What is the best way in Rails to determine if two (or more) given URLs (as strings or hash options) are equal?

I'm wanting a method called same_url? that will return true if the passed in URLs are equal. The passed in URLs might be either params options hash or strings. same_url?({:controller => :foo, :action => :bar}, "http://www.example.com/foo/bar") # => true The Rails Framework helper current_page? seems like a good starting point but I'd ...

Absolute URL from base + relative URL in C#

I have a base URL : http://my.server.com/folder/directory/sample And a relative one : ../../other/path How to get the absolute URL from this ? It's pretty straighforward using string manipulation, but I would like to do this in a secure way, using the Uri class or something similar. It's for a standard a C# app, not an ASP.NET one...