So i have this form;
I have a few problems.
Firstly, if it's grabbing the RSS feed, i don't want it to download the .ics because i want it to show the RSS, same with outlook (basicall there's only one s2 even though i need to put 3 formats.
Secondly, mostly working fine on mac, but on windows it just redirects to the homepage instead of the same page, unless you enter the URL manually. On all browsers too, what's with that, I can't seen anything for that?
All for now, thanks. If you don't understand what I mean, i'll make an image and upload it.
Thankyou

EDIT: If anyone wants to test to see what i'm on about, PM me and i'll send you a login username/password. thanks.
Code:
<html>
<title>Pfft</title>
<body>
<form id="dlForm" onsubmit="GoToUrl(this.id)">
<select id="select-1">
<option value="test/phpicalendar-0.9.5/rss/rss.php?cal=may&rssview=week">RSS</option>
<option value="webcal://">iCal</option>
<option value="">Outlook</option>
</select>
<select id="select-2">
<option value="rss.php?cal=may&rssview=week">February 2008</option>
<option value="test/phpicalendar-0.9.5/calendars/may.ics">March 2008</option>
<option value="apr">April 2008</option>
<option value="may">May 2008</option>
<option value="jun">June 2008</option>
</select>
<input type="submit" value="Download" />
</form>
<script>
var base = 'http://www.url.com/';
var ext = '';
function GoToUrl(id)
{
// identify by form id. Helpful if there's more than one form on page
if (id == 'dlForm') {
// get value attribute from first select tag
s1 = document.getElementById('select-1').value;
// get value attribute from second select tag
s2 = document.getElementById('select-2').value;
// send user to new url (for download)
location.href = base + s1 +""+ s2 + ext;
// use this line to test what URL will be.
alert(base + s1 +""+ s2 + ext);
}
}
</script>
</body>
</html>
I have a few problems.
Firstly, if it's grabbing the RSS feed, i don't want it to download the .ics because i want it to show the RSS, same with outlook (basicall there's only one s2 even though i need to put 3 formats.
Secondly, mostly working fine on mac, but on windows it just redirects to the homepage instead of the same page, unless you enter the URL manually. On all browsers too, what's with that, I can't seen anything for that?
All for now, thanks. If you don't understand what I mean, i'll make an image and upload it.
Thankyou
EDIT: If anyone wants to test to see what i'm on about, PM me and i'll send you a login username/password. thanks.