View Full Version : Build new URL on form input

08-23-2011, 09:17 AM
Hi All,

I'm searching for a while now how to generate a new url based on a form input. Here is the thing I'd like to do:

form-date: input mmdd [2208] for 22th of august.
submit: go to [http://start of the url][2208 - as in input][rest of the url].pdf

is this possible in Javascript, or can someone help me to search a better way to do?

ps. I don't have possibilities in PHP

thanks in advance!

08-23-2011, 11:36 AM
<form action="#" onsubmit="location.href = 'http://whatever.com/whatever' + this.elements.date.value + 'whatever.pdf'; return false;">
<input type="text" name="date"> <input type="submit" value="Go">