• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

redirecting or forwarding to another website

 
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

I have a form on a web page and when the user clicks on the button of the form the action (part of the form) goes to page X and it passes some parameters.

The page X should forward or redirect to another website using the post method passing these parameters as well.

Ahy suggestions?

Thank you in advance.

pinda
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

The page X should forward or redirect to another website using the post method passing these parameters as well.
Ahy suggestions?



Pinda,
When you say another website, do you mean another context on your server, another page in your context, or literally, another site some place on another server?
[ February 10, 2005: Message edited by: Ben Souther ]
 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Pinda Ros:
Hello,

I have a form on a web page and when the user clicks on the button of the form the action (part of the form) goes to page X and it passes some parameters.

The page X should forward or redirect to another website using the post method passing these parameters as well.

Ahy suggestions?

Thank you in advance.

pinda




With javascript, in the page X:

<form method="post" action="wherever">
<input type="hidden" name="var" value="value" />
</form>

<script>
document.forms[0].submit();
</script>
 
Pinda Ros
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Ben I mean literrally to a different web site eg:

my site www.example.com

referenced site: www.referenced.com
 
Pinda Ros
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Rigel,

and thank you for the reply.

I've tried your example and it does auto fw however it does not seem to pass me values...

For example my page A has a form that looks like:

and page B

when i had these hidden values to pageA it was working now it does nearly whatI want but without sending those values.

Any suggestions??

Thank you in advance
 
Pinda Ros
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Silly me, Thnk you for all the replies.
The solution to my problem was this java script and to my former problem was that i Forgot to add /

thank you again

Pinda
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic