FUDforum - خوراک RDF
http://fudforum.org/forum/index.php
On click button in php
http://fudforum.org/forum/index.phpindex.php?t=rview&goto=180444&th=122949#msg_180444
<li><a href="#">
Enter Id:<br/><input type="text" value="Enter Id Code" name=id onfocus="if (this.value == 'Enter Id Code') {this.value = '';}"></a>
<?php echo $id ?>
</li>
<li>
<a href="#"><input type="button" onclick="<a href='details.php?$id=' ></a>" value="submit" style="margin-left:4.0em;"></a>
Problem:
The text box is accepting the id code and when I press enter it is activating the details.php but when I click the button (the submit button) nothing is happening.
Please help me.]]>Nagaraju Kachapuram2013-02-16T02:15:17-00:00Re: On click button in php
http://fudforum.org/forum/index.phpindex.php?t=rview&goto=180445&th=122949#msg_180445
> <form name="myform" action="details.php?id=<?php echo $id ?>" method=get>
> <li><a href="#">
> Enter Id:<br/><input type="text" value="Enter Id Code" name=id onfocus="if (this.value == 'Enter Id Code') {this.value = '';}"></a>
> <?php echo $id ?>
> </li>
> <li>
> <a href="#"><input type="button" onclick="<a href='details.php?$id=' ></a>" value="submit" style="margin-left:4.0em;"></a>
>
> Problem:
>
> The text box is accepting the id code and when I press enter it is activating the details.php but when I click the button (the submit button) nothing is happening.
>
> Please help me.
>
onclick executes javascript code on the client. PHP runs on the server
(and is NOT javascript).
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp. jstucklex@attglobal.net
==================]]>Jerry Stuckle2013-02-16T02:48:58-00:00Re: On click button in php
http://fudforum.org/forum/index.phpindex.php?t=rview&goto=180446&th=122949#msg_180446
<visitnag@gmail.com>
<3e8c6516-17c4-4a29-9f9f-ace88c524074@googlegroups.com> wrote:
to:
<input type='submit' value='submit' style="margin-left:4.0em;">
> | Problem:
> |
> | The text box is accepting the id code and when I press enter it is activating the details.php but when I click the button (the submit button) nothing is happening.
> |
> | Please help me.]]>Jeff North2013-02-16T04:29:29-00:00Re: On click button in php
http://fudforum.org/forum/index.phpindex.php?t=rview&goto=180447&th=122949#msg_180447
> On Fri, 15 Feb 2013 18:15:17 -0800 (PST), in comp.lang.php nag
>
> <visitnag@gmail.com>
>
> <3e8c6516-17c4-4a29-9f9f-ace88c524074@googlegroups.com> wrote:
>
>
>
>> | <form name="myform" action="details.php?id=<?php echo $id ?>" method=get>
>
>> | <li><a href="#">
>
>> | Enter Id:<br/><input type="text" value="Enter Id Code" name=id onfocus="if (this.value == 'Enter Id Code') {this.value = '';}"></a>
>
>> | <?php echo $id ?>
>
>> | </li>
>
>> | <li>
>
>
>
> Change this
>
>> | <a href="#"><input type="button" onclick="<a href='details.php?$id=' ></a>" value="submit" style="margin-left:4.0em;"></a>
>
>
>
> to:
>
> <input type='submit' value='submit' style="margin-left:4.0em;">
>
>
>
>
>
>> | Problem:
>
>> |
>
>> | The text box is accepting the id code and when I press enter it is activating the details.php but when I click the button (the submit button) nothing is happening.
>
>> |
>
>> | Please help me.
thank you so much]]>Nagaraju Kachapuram2013-02-16T13:20:32-00:00Re: On click button in php
http://fudforum.org/forum/index.phpindex.php?t=rview&goto=180449&th=122949#msg_180449
[...]
> <a href="#"><input type="button" onclick="<a href='details.php?$id=' ></a>" value="submit" style="margin-left:4.0em;"></a>
>
> Problem:
Your problem seems to be, that you really miss fundamental understanding
of the technologies you use.
[...]
> but when I click the button (the submit button) nothing is happening.
Of course not. onClick is an event handler and you have to use
JavaScript there.
--
Arno Welzel http://arnowelzel.de http://de-rec-fahrrad.de]]>Arno Welzel2013-02-17T07:53:12-00:00Re: On click button in php
http://fudforum.org/forum/index.phpindex.php?t=rview&goto=180451&th=122949#msg_180451
> nag, 2013-02-16 03:15:
> [...]
>> <a href="#"><input type="button" onclick="<a href='details.php?$id='
>>> </a>" value="submit" style="margin-left:4.0em;"></a>
>>
>> Problem:
>
> Your problem seems to be, that you really miss fundamental understanding
> of the technologies you use.
Pot, kettle, black.
> [...]
>> but when I click the button (the submit button) nothing is happening.
>
> Of course not. onClick is an event handler and you have to use
> JavaScript there.
“onclick” is an event-handler attribute (for the “click” event of the DOM),
and unless the HTML version is HTML5, one can use any scripting language in
its value. ECMAScript-based scripting languages like JavaScript are best
supported, though.
PointedEars
--
Sometimes, what you learn is wrong. If those wrong ideas are close to the
root of the knowledge tree you build on a particular subject, pruning the
bad branches can sometimes cause the whole tree to collapse.
-- Mike Duffy in cljs, <news:Xns9FB6521286DB8invalidcom@94.75.214.39>]]>Thomas 'PointedEars' 2013-02-17T20:09:50-00:00Re: On click button in php
http://fudforum.org/forum/index.phpindex.php?t=rview&goto=180463&th=122949#msg_180463
> Arno Welzel wrote:
>
>> nag, 2013-02-16 03:15:
>> [...]
>>> <a href="#"><input type="button" onclick="<a href='details.php?$id='
>>>> </a>" value="submit" style="margin-left:4.0em;"></a>
[...]
>>> but when I click the button (the submit button) nothing is happening.
>>
>> Of course not. onClick is an event handler and you have to use
>> JavaScript there.
>
> “onclick” is an event-handler attribute (for the “click” event of the DOM),
> and unless the HTML version is HTML5, one can use any scripting language in
> its value. ECMAScript-based scripting languages like JavaScript are best
> supported, though.
>
> See also: <http://PointedEars.de/es-matrix>
Theoretically - yes. In the real world ECMAScript-based scripting
languages like JavaScript are the only useful choice, since none of the
current browsers except Internet Explorer support anything else out of
the box.
--
Arno Welzel http://arnowelzel.de http://de-rec-fahrrad.de]]>Arno Welzel2013-02-19T10:18:21-00:00Re: On click button in php
http://fudforum.org/forum/index.phpindex.php?t=rview&goto=180464&th=122949#msg_180464
> Thomas 'PointedEars' Lahn, 2013-02-17 21:09:
>> Arno Welzel wrote:
>>> nag, 2013-02-16 03:15:
>>> [...]
>>>> <a href="#"><input type="button" onclick="<a href='details.php?$id='
>>>> > </a>" value="submit" style="margin-left:4.0em;"></a>
> [...]
>>>> but when I click the button (the submit button) nothing is happening.
>>> Of course not. onClick is an event handler and you have to use
>>> JavaScript there.
>> “onclick” is an event-handler attribute (for the “click” event of the
>> DOM), and unless the HTML version is HTML5, one can use any scripting
>> language in its value. ECMAScript-based scripting languages like
>> JavaScript are best supported, though.
>>
>> See also: <http://PointedEars.de/es-matrix>
>
> Theoretically - yes. In the real world ECMAScript-based scripting
> languages like JavaScript are the only useful choice, since none of the
> current browsers except Internet Explorer support anything else out of
> the box.
That is what I said.
PointedEars
--
Anyone who slaps a 'this page is best viewed with Browser X' label on
a Web page appears to be yearning for the bad old days, before the Web,
when you had very little chance of reading a document written on another
computer, another word processor, or another network. -- Tim Berners-Lee]]>Thomas 'PointedEars' 2013-02-19T10:23:10-00:00Re: On click button in php
http://fudforum.org/forum/index.phpindex.php?t=rview&goto=180467&th=122949#msg_180467
> Arno Welzel wrote:
>
>> Thomas 'PointedEars' Lahn, 2013-02-17 21:09:
>>> Arno Welzel wrote:
>>>> nag, 2013-02-16 03:15:
>>>> [...]
>>>> > <a href="#"><input type="button" onclick="<a href='details.php?$id='
>>>> >> </a>" value="submit" style="margin-left:4.0em;"></a>
>> [...]
>>>> > but when I click the button (the submit button) nothing is happening.
>>>> Of course not. onClick is an event handler and you have to use
>>>> JavaScript there.
>>> “onclick” is an event-handler attribute (for the “click” event of the
>>> DOM), and unless the HTML version is HTML5, one can use any scripting
>>> language in its value. ECMAScript-based scripting languages like
>>> JavaScript are best supported, though.
>>>
>>> See also: <http://PointedEars.de/es-matrix>
>>
>> Theoretically - yes. In the real world ECMAScript-based scripting
>> languages like JavaScript are the only useful choice, since none of the
>> current browsers except Internet Explorer support anything else out of
>> the box.
>
> That is what I said.
To make it more clear: ECMAScript-based languages like JavaScript are
not only the "best supported" ones - they are the ONLY possibility in
the real world and it does not matter if is theoretically possible to
specify another language for the event-handler and if there is one(!)
known browser to support VBScript instead of JScript.
--
Arno Welzel http://arnowelzel.de http://de-rec-fahrrad.de]]>Arno Welzel2013-02-19T10:51:37-00:00Re: On click button in php
http://fudforum.org/forum/index.phpindex.php?t=rview&goto=180468&th=122949#msg_180468
> Thomas 'PointedEars' Lahn, 2013-02-19 11:23:
>> Arno Welzel wrote:
>>> Thomas 'PointedEars' Lahn, 2013-02-17 21:09:
>>>> Arno Welzel wrote:
>>>> > nag, 2013-02-16 03:15:
>>>> > [...]
>>>> >> <a href="#"><input type="button" onclick="<a href='details.php?$id='
>>>> >>> </a>" value="submit" style="margin-left:4.0em;"></a>
>>> [...]
>>>> >> but when I click the button (the submit button) nothing is happening.
>>>> > Of course not. onClick is an event handler and you have to use
>>>> > JavaScript there.
>>>> “onclick” is an event-handler attribute (for the “click” event of the
>>>> DOM), and unless the HTML version is HTML5, one can use any scripting
>>>> language in its value. ECMAScript-based scripting languages like
>>>> JavaScript are best supported, though.
>>>>
>>>> See also: <http://PointedEars.de/es-matrix>
>>>
>>> Theoretically - yes. In the real world ECMAScript-based scripting
>>> languages like JavaScript are the only useful choice, since none of the
>>> current browsers except Internet Explorer support anything else out of
>>> the box.
>>
>> That is what I said.
>
> To make it more clear: ECMAScript-based languages like JavaScript are
> not only the "best supported" ones - they are the ONLY possibility in
> the real world
You are mistaken. Companies are using that fact to their advantage.
> and it does not matter if is theoretically possible to specify another
> language for the event-handler and if there is one(!) known browser to
> support VBScript instead of JScript.
It is still possible. A “real world” argument is, of course, a common
fallacy.
PointedEars
--
> If you get a bunch of authors […] that state the same "best practices"
> in any programming language, then you can bet who is wrong or right...
Not with javascript. Nonsense propagates like wildfire in this field.
-- Richard Cornford, comp.lang.javascript, 2011-11-14]]>Thomas 'PointedEars' 2013-02-19T10:58:02-00:00Re: On click button in php
http://fudforum.org/forum/index.phpindex.php?t=rview&goto=180469&th=122949#msg_180469
PointedEars@web.de> wrote in
news:5349567.eTz8zpLT7E@PointedEars.de:
> It is still possible. A “real world” argument is, of course, a common
> fallacy.
Please turn off "smart quotes" in your news client before you post again.]]>Doug Miller2013-02-19T12:07:32-00:00Re: On click button in php
http://fudforum.org/forum/index.phpindex.php?t=rview&goto=180471&th=122949#msg_180471
>
> To make it more clear: ECMAScript-based languages like JavaScript are
> not only the "best supported" ones - they are the ONLY possibility in
> the real world and it does not matter if is theoretically possible to
> specify another language for the event-handler and if there is one(!)
> known browser to support VBScript instead of JScript.
>
>
Unless the client side is under control as in e.g., a company intranet.
--
Ineptocracy
(in-ep-toc’-ra-cy) – a system of government where the least capable to
lead are elected by the least capable of producing, and where the
members of society least likely to sustain themselves or succeed, are
rewarded with goods and services paid for by the confiscated wealth of a
diminishing number of producers.]]>The Natural Philosoph2013-02-19T12:13:53-00:00Re: On click button in php
http://fudforum.org/forum/index.phpindex.php?t=rview&goto=180475&th=122949#msg_180475
> Arno Welzel wrote:
>
>> Thomas 'PointedEars' Lahn, 2013-02-19 11:23:
>>> Arno Welzel wrote:
>>>> Thomas 'PointedEars' Lahn, 2013-02-17 21:09:
>>>> > Arno Welzel wrote:
>>>> >> nag, 2013-02-16 03:15:
>>>> >> [...]
>>>> >>> <a href="#"><input type="button" onclick="<a href='details.php?$id='
>>>> >>>> </a>" value="submit" style="margin-left:4.0em;"></a>
>>>> [...]
>>>> >>> but when I click the button (the submit button) nothing is happening.
>>>> >> Of course not. onClick is an event handler and you have to use
>>>> >> JavaScript there.
>>>> > “onclick” is an event-handler attribute (for the “click” event of the
>>>> > DOM), and unless the HTML version is HTML5, one can use any scripting
>>>> > language in its value. ECMAScript-based scripting languages like
>>>> > JavaScript are best supported, though.
>>>> >
>>>> > See also: <http://PointedEars.de/es-matrix>
>>>>
>>>> Theoretically - yes. In the real world ECMAScript-based scripting
>>>> languages like JavaScript are the only useful choice, since none of the
>>>> current browsers except Internet Explorer support anything else out of
>>>> the box.
>>>
>>> That is what I said.
>>
>> To make it more clear: ECMAScript-based languages like JavaScript are
>> not only the "best supported" ones - they are the ONLY possibility in
>> the real world
>
> You are mistaken. Companies are using that fact to their advantage.
>
>> and it does not matter if is theoretically possible to specify another
>> language for the event-handler and if there is one(!) known browser to
>> support VBScript instead of JScript.
>
> It is still possible. A “real world” argument is, of course, a common
> fallacy.
Man context
The OP did not talk about a company intranet.
--
Arno Welzel http://arnowelzel.de http://de-rec-fahrrad.de]]>Arno Welzel2013-02-20T10:00:23-00:00Re: On click button in php
http://fudforum.org/forum/index.phpindex.php?t=rview&goto=180476&th=122949#msg_180476
> On 19/02/13 10:51, Arno Welzel wrote:
>
>>
>> To make it more clear: ECMAScript-based languages like JavaScript are
>> not only the "best supported" ones - they are the ONLY possibility in
>> the real world and it does not matter if is theoretically possible to
>> specify another language for the event-handler and if there is one(!)
>> known browser to support VBScript instead of JScript.
>>
>>
> Unless the client side is under control as in e.g., a company intranet.
Which is just one special use case - and i doubt the OP is involved in
creating something for a company intranet ;-)
--
Arno Welzel http://arnowelzel.de http://de-rec-fahrrad.de]]>Arno Welzel2013-02-20T10:01:12-00:00Re: On click button in php
http://fudforum.org/forum/index.phpindex.php?t=rview&goto=180477&th=122949#msg_180477
> Am 19.02.2013 13:13, schrieb The Natural Philosopher:
>> On 19/02/13 10:51, Arno Welzel wrote:
>>
>>>
>>> To make it more clear: ECMAScript-based languages like JavaScript are
>>> not only the "best supported" ones - they are the ONLY possibility in
>>> the real world and it does not matter if is theoretically possible to
>>> specify another language for the event-handler and if there is one(!)
>>> known browser to support VBScript instead of JScript.
>>>
>>>
>> Unless the client side is under control as in e.g., a company intranet.
>
> Which is just one special use case - and i doubt the OP is involved in
> creating something for a company intranet ;-)
>
>
so do I, but its amazing the responses I got when I was doing just that,
and people 'assumed' that the only valid use of php was for publicly
globally accessible websites...
'dont use javascript or cookies: they may not have them enabled: don't
just code for IE6/7/8 and firefox, they might have opera or safari:
remember to make provision for blind people and people using smart
phones and tablets..' etc etc.
All of that is irrelevant when you know that only 5 sighted people all
on IE6 and/or Firefox with at least 1024x768 screens will ever be using it..
--
Ineptocracy
(in-ep-toc’-ra-cy) – a system of government where the least capable to
lead are elected by the least capable of producing, and where the
members of society least likely to sustain themselves or succeed, are
rewarded with goods and services paid for by the confiscated wealth of a
diminishing number of producers.]]>The Natural Philosoph2013-02-20T13:48:48-00:00