You are here: Re: -> How to read a form variable before posting? <- « PHP Programming Language « IT news, forums, messages
Re: -> How to read a form variable before posting? <-

Posted by Steve JORDI on 05/14/07 13:56

Actually, the following code sample works ok to built
the href tag dynamically...

<script language="javascript" type="text/javascript">
function toto() {
var num = document.getElementById("num") ;
var ref=document.getElementById("theref") ;
ref.href="mypage.php?id="+num.value ;
}
</script>

<form method="post">
<INPUT name="num" type="text" id="num" onBlur="toto();">
<A href="" id="theref">go</a>
</form>

When I click on "go" the link is correct and point to mypage
with the id= to the value I have in the edit field.

This allows me to know where to point to before POSTING. That's
what I need.


Sincerely,
Steve JORDI

(Remove the K_I_L_LSPAM from my email address)
------------------------------------------------
1197 Prangins Email: stevejordiK_I_L_LSPAM@hotmail.com
Switzerland WWW: www.sjordi.com
------------------------------------------------
Volcanoes at www.sjordi.com/volcanoes
MovieDB at www.sjmoviedb.com
------------------------------------------------

 

Navigation:

[Reply to this 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

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация