html/javascript/php post problem

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Mordachai
Forum Newbie
Posts: 3
Joined: Mon Sep 26, 2005 3:58 am

html/javascript/php post problem

Post by Mordachai »

I was wondering.

In one page I have a button and a $var which contains "test". If you click the button it opens another window and posts the $var in that window.

You can easily do this with secondpage.php?var=test (through GET) but I don't want to do that. I want to actually post something in the second page in a new window.
kireol
Forum Newbie
Posts: 3
Joined: Sun Oct 02, 2005 10:11 pm

Post by kireol »

try post with a hidden variable.
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Post by Weirdan »

There's target attribute of the form tag specifically for that purpose:
htmlhelp.com wrote: The TARGET attribute is used with frames to specify in which frame the form response should be rendered. If no frame with such a name exists, the response is rendered in a new window unless overridden by the user. Special frame names begin with an underscore:
  • _blank renders the response in a new, unnamed window
  • _self renders the response in the current frame (useful for overriding a BASE TARGET)
  • _parent renders the response in the immediate FRAMESET parent
  • _top renders the response in the full, unframed window
Mordachai
Forum Newbie
Posts: 3
Joined: Mon Sep 26, 2005 3:58 am

Post by Mordachai »

I didnt know that there was a target attribute for the font tag.

Many thanks.
Post Reply