FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » how to pass text set in a javascript?
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: how to pass text set in a javascript? [message #178861 is a reply to message #178860] Wed, 15 August 2012 19:35 Go to previous messageGo to previous message
Mike Winter is currently offline  Mike Winter
Messages: 1
Registered: August 2012
Karma:
Junior Member
On 15/08/2012 19:30, Denis McMahon wrote:
> On Tue, 14 Aug 2012 20:51:23 -0700, thejustpark wrote:
>
>> OK, let me summarize with a code snippet.
>
> The button to load your example text does not need to be a part of the
> form, but your form submit button does. Your "Input" button is not acting
> as a submit button because of the function call.

The input button is not acting like a submit button because it's /not/ a
submit button (type="button"). It is inert, insofar as form actions are
concerned.

> If you want it to act as a submit, you need to make the function return the logical value true.

That would be true if the intrinsic event handler included a return
statement but as it doesn't, there would be no cancellation of the
default action. That is to say:

<input type="submit" ... onsubmit="doFoo(); return true;">

and:

<input type="submit" ... onsubmit="doFoo();">

are functionally equivalent. It's the lack of a default action in itself
that's possibly a problem, but that depends on whether the OP's example
accurately represents what's being tested.

> Your textarea should be closed with </textarea>

Absolutely!

> disabled="" is better written as disabled="disabled". [snip]

If the attribute is given a value, that value /must/ be "disabled". In
HTML (but not XHTML), it would also be valid to simply write the
attribute name; the value would be assumed.

Kind regards,
--
Mike Winter
Replace ".invalid" with ".uk" to reply by e-mail.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: PHPUnit documentation
Next Topic: Create hierarchical tree structure for categories in joomla
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Mon Nov 25 03:46:17 GMT 2024

Total time taken to generate the page: 0.05102 seconds