Form extending, help please?

This is a discussion on "Form extending, help please?" within the JavaScript Forum section. This forum, and the thread "Form extending, help please? are both part of the Program Your Website category.



Go Back   Webforumz.com > Main Forums > Program Your Website > JavaScript Forum

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Mar 14th, 2008, 16:55
New Member
Join Date: Mar 2008
Location: England, You-Kay?
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Form extending, help please?

Hi, thanks for looking.
I have this form:
Code: Select all
<html>
<title>Pfft</title>
<body>
<form id="dlForm" onsubmit="GoToUrl(this.id); return false;">
<select id="format">
  <option value="rss">RSS</option>
  <option value="webcal">iCal</option>
  <option value="outlook">Outlook</option>
</select>
<select id="month">
  <option value="may">February 2008</option>
  <option value="mar">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 type="text/javascript">
var base = 'http://www.myspo......res.com/';
var calBase = 'myspor.....gfixtures.com/test/phpicalendar-0.9.5/calendars/';
function GoToUrl(id)
{
  var url = '';
  // identify by form id. Helpful if there's more than one form on page
  if (id == 'dlForm') {
    // get value attribute from first select tag
    format = document.getElementById('format').value;
    // get value attribute from second select tag
    month = document.getElementById('month').value;
    switch (format) {
      case 'rss':
        url = base +'test/phpicalendar-0.9.5/rss/rss.php?cal='+
         month +'&rssview=week'; break;
      case 'webcal':
        url = 'webcal://'+ calBase +''+ month +'.ics'; break;
      case 'outlook':
        url = 'http://'+ calBase +''+ month +'.ics'; break;
    }
//alert(url);
    location.href = url;
  }
}
</script></body>
</html>
Now it works brilliantly, but I would like to extend it.
As well as the form above (it selects a format, RSS, iCal, Outlook. And then downloads the appropriate file to the month) I would like to have check boxes to select certain files to download.
I might be confusing myself but basically:

I select Outlook. I want updates for the month March2008. Then I would like to select who i would like fixtures for (tick boxes). Example: Soccer / Football team 1, team 2 ETC.

I'm not even sure if it's possible, but if it is help would be appreciated please. I also understand that the directory system would have to be changed, so help on this would be greatly appreciate too.
Thanks.
Reply With Quote

  #2 (permalink)  
Old Mar 16th, 2008, 16:50
spinal007's Avatar
Moderator
Join Date: Mar 2004
Location: Good Ol'London
Age: 22
Posts: 1,612
Blog Entries: 1
Thanks: 0
Thanked 2 Times in 2 Posts
Send a message via ICQ to spinal007 Send a message via MSN to spinal007 Send a message via Yahoo to spinal007 Send a message via Skype™ to spinal007
Re: Form extending, help please?

Nothing to do with Javascript. This is something that your server side script "phpicalendar-0.9.5/rss/rss.php" will have to handle.

You're looking for help in the wrong place. Go here and here.
Last Blog Entry: Random String in Javascript (Apr 21st, 2008)
Reply With Quote
  #3 (permalink)  
Old Mar 16th, 2008, 17:15
New Member
Join Date: Mar 2008
Location: England, You-Kay?
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Form extending, help please?

I disagree. PHPiCalendar is only pulling RSS out. I need the script to obtain directory and files as well as the current script.
Thanks for reply.
Reply With Quote
  #4 (permalink)  
Old Mar 16th, 2008, 17:26
spinal007's Avatar
Moderator
Join Date: Mar 2004
Location: Good Ol'London
Age: 22
Posts: 1,612
Blog Entries: 1
Thanks: 0
Thanked 2 Times in 2 Posts
Send a message via ICQ to spinal007 Send a message via MSN to spinal007 Send a message via Yahoo to spinal007 Send a message via Skype™ to spinal007
Re: Form extending, help please?

Quote:
Originally Posted by EvanLugh View Post
I select Outlook. I want updates for the month March2008. Then I would like to select who i would like fixtures for (tick boxes). Example: Soccer / Football team 1, team 2 ETC.
A) The list of teams has to come from somwehere, ie.: database, ie.: through server-side scripting, ie.: through phpiCalendar.

B) Once you submit the values selected, the PHP code that generates the file to be downloaded has to do something with it, ie.: filter the records you want, ie.: search the database, ie.: through server-side scripting, ie.: through phpiCalendar.

Either that or I misunderstood your question...
Last Blog Entry: Random String in Javascript (Apr 21st, 2008)
Reply With Quote
  #5 (permalink)  
Old Mar 16th, 2008, 17:30
New Member
Join Date: Mar 2008
Location: England, You-Kay?
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Form extending, help please?

To be honest I think we're both a bit confused.
Here's a demo of what works now: http://www.mysportingfixtures.*om/dropdowntestC.htm*l
[remove the*..]
Underneath it, I would like it to have check boxes. It currently downloads for fixtures I put in a single calendar for each month. EG: If you were to download march now, you would get Derby and Arsenal. But i would like to create them manually, then upload them, the end user checks who they wish to download for and download in a single file. I'm pretty sure it's possible, just a little over my head.
Reply With Quote
  #6 (permalink)  
Old Mar 16th, 2008, 19:03
spinal007's Avatar
Moderator
Join Date: Mar 2004
Location: Good Ol'London
Age: 22
Posts: 1,612
Blog Entries: 1
Thanks: 0
Thanked 2 Times in 2 Posts
Send a message via ICQ to spinal007 Send a message via MSN to spinal007 Send a message via Yahoo to spinal007 Send a message via Skype™ to spinal007
Re: Form extending, help please?

With RSS, all I get is "Invalid calendar file. Please try a different calendar. "
With the other formats I get 404 (File not found).
Sorry, don't think I can help you, but hopefully someone will.

Either way, I still think you're more likely to find help in the phpICalendar forum.
Last Blog Entry: Random String in Javascript (Apr 21st, 2008)
Reply With Quote
  #7 (permalink)  
Old Mar 16th, 2008, 19:18
New Member
Join Date: Mar 2008
Location: England, You-Kay?
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Form extending, help please?

Only the date/s march is working. Thanks anyway.
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Extending page fr33sty13 Web Page Design 5 Apr 25th, 2008 22:12
Hiding / Showing form fields based on previous form input John Alexander Hopper PHP Forum 1 Mar 10th, 2008 11:30
form variable within an iframe component of a form kissfreaque JavaScript Forum 5 Feb 29th, 2008 11:57
[SOLVED] PHP contact form redirect to same form Posie PHP Forum 14 Jan 29th, 2008 20:28
extending background block beyond floated image snappy Web Page Design 18 Oct 27th, 2006 21:26


All times are GMT. The time now is 11:34.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43