HTML Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignHTML Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old July 26th, 2000, 10:58 PM
RedEyes RedEyes is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2000
Posts: 13 RedEyes User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
I've got a page with a form with the usual action="action.php3" clause. But I want the form to go somewhere else if one of the fields has changed. Can this be done?

Reply With Quote
  #2  
Old August 8th, 2000, 01:38 PM
micky micky is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2000
Posts: 5 micky User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
not sure if I completely understand you, but you want to branch depending on the input from one or more forms, right?

In PHP I use a dispatch routine to accomplish this. Let's say I have 15 pages and a central dispatcher called mysite.php3.

mysite.php3 will take the form of a large multicase if statement which requires or includes the appropriate form based on the value of the submit button. (but you could use any field).

Alternatively, I believe you can set document.myform.action="whatever you want to do" in your javascript code using onchange as a trigger in every input field.

Reply With Quote
  #3  
Old August 8th, 2000, 03:38 PM
RedEyes RedEyes is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2000
Posts: 13 RedEyes User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Thanks micky - it's the javascript solution that I need.

Reply With Quote
  #4  
Old August 9th, 2000, 07:13 AM
mmonks mmonks is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2000
Posts: 27 mmonks User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
You can write a function something like this:

function ChangeTarget(){
document.form_name.target="target.php3";
}

and then call this function from the onchange event of whichever input element you need to.

Hope that helps,
Matt.

<BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">quote:</font><HR>Originally posted by RedEyes:
I've got a page with a form with the usual action="action.php3" clause. But I want the form to go somewhere else if one of the fields has changed. Can this be done?[/quote]


Reply With Quote
  #5  
Old August 9th, 2000, 07:14 AM
mmonks mmonks is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2000
Posts: 27 mmonks User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Sorry! Above function should read-

document.form_name.action="action.php3";

Matt.

<BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">quote:</font><HR>Originally posted by RedEyes:
I've got a page with a form with the usual action="action.php3" clause. But I want the form to go somewhere else if one of the fields has changed. Can this be done?[/quote]


Reply With Quote
  #6  
Old August 9th, 2000, 04:32 PM
RedEyes RedEyes is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2000
Posts: 13 RedEyes User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
That's just what I need. Thanks for your help guys.

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignHTML Programming > Dynamic Submit Pages


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway