Reply to Re: Modify $_POST

Your name:

Reply:


Posted by Kimmo Laine on 07/24/06 12:02

"Simon Rigby" <google@simonrigby.co.uk> wrote in message
news:1153741502.516370.84080@h48g2000cwc.googlegroups.com...
> Hello folks,
>
> Ive seen lots of recommendations to not try to do what Im trying to do
> but let me put it this way and hopefully someone can tell if this is a
> good idea or not (or an alternative).
>
> What Im trying to do is this. I have a series of links that when
> clicked will navigate to a common page passing in a value encoded in
> the link. For reasons not worth going into I cant use a querystring.
>
> I was hoping to call a javascript function from the onclick event of
> the link, then assign a new $_POST variable and then submit the form
> (hence enabling me to read the $_POST value from the receiving page.


So in other words, you'd like to post a form on the click of a link, and
submit a certain value, if I understood your explanation. What would you say
of the following "workaround": change your <a href> to a form:
<form action="reciever.php" class="pseudolink" method="POST">
<input type="submit"/>
<input type="hidden" name="var" value="val"/>
</form>

and attatch a stylesheet that'll camouflage your form into a harmless
looking link:
<style type="text/css">
..pseudolink {
display:inline;
}
..pseudolink input {
display:inline;
border:none;
backgroundcolor:one;
text-decoration:underline;
cursor:pointer;
color:blue;
}
</style>

I'm just one of the people who wish to avoid javascript whenever it is
possible. I think there's a chance here to do so with the code above. Of
course there will be n+1 forms on the page, I dunno if that's nice then...
Call this the alternative then if you will.

--
"Ohjelmoija on organismi joka muuttaa kofeiinia koodiksi" - lpk
http://outolempi.net/ahdistus/ - Satunnaisesti pδivittyvδ nettisarjis
spam@outolempi.net || Gedoon-S @ IRCnet || rot13(xvzzb@bhgbyrzcv.arg)

[Back to original message]


УдалСнная Ρ€Π°Π±ΠΎΡ‚Π° для программистов  •  Как Π·Π°Ρ€Π°Π±ΠΎΡ‚Π°Ρ‚ΡŒ Π½Π° Google AdSense  •  England, UK  •  ΡΡ‚Π°Ρ‚ΡŒΠΈ Π½Π° английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Π‘Π°ΠΉΡ‚ ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ Π² Π‘Ρ‚ΡƒΠ΄ΠΈΠΈ Π’Π°Π»Π΅Π½Ρ‚ΠΈΠ½Π° ΠŸΠ΅Ρ‚Ρ€ΡƒΡ‡Π΅ΠΊΠ°
ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ΠΈΠ΅ ΠΈ ΠΏΠΎΠ΄Π΄Π΅Ρ€ΠΆΠΊΠ° Π²Π΅Π±-сайтов, Ρ€Π°Π·Ρ€Π°Π±ΠΎΡ‚ΠΊΠ° ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌΠ½ΠΎΠ³ΠΎ обСспСчСния, поисковая оптимизация