You are here: Re: input field question « HTML « IT news, forums, messages
Re: input field question

Posted by Jonathan N. Little on 08/04/06 19:15

thomanjl wrote:
> This is my input field code:
>
> <input name="subButton" type="button" value="Cancel"
> onclick="javascript: Response.Redirect URL_HOME />
>
> My problem is the button doesn't redirect to the destined url...any
> ideas??
>

Firstly, what would happen if client has JavaScript disabled, eh?.
Secondly that is not how you do a JavaScript redirect. Thirdly you
should not do this with JavaScript but with server-side scripting.

Not familiar with ASP but in pseudo code, your cancle button should be a
submit button


<form action="receiving.script" method="post">
....
<input type="submit" name="cancel" value="Cancel">

then "receiving.script"

if in POST var cancel exists then
{
redirect header to URL_HOME
}
else
{
process form posted data
}



--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.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

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