Re: php and javascript
- From: Daniel Tryba <partmapsswen@xxxxxxxxxxxxxxxx>
- Date: 29 May 2005 23:01:15 GMT
Joe Blow <Joe@xxxxxxxx> wrote:
> Hi,
>
> Is there any particular reason why JavaScript included in php include page
> does not work?
No, php is serverside and generates something for a client, it's up to
the cleint to interpret is if it's a correct syntax thingy.
> Will this be a browser security issue? It works with FireFox,
> but not with IE, which I suppose supports the browser security argument.
> I've found it is a general JavaScript problem, but an example is:
>
> <?php
> /*snip*/
> echo "<img src='../images/go.jpg'
> onclick='javascript:document.search_form.submit()' alt='go'
> style='margin-left: .2em; vertical-align: top; '>";
> /*snip*/
> ?>
Not a complete, standalone example.... the actuall error could be
anyware in the excluded source... (but the 'javascript:' is totally
unnecessary here).
> There are other ways to use an image as a submit button, I realise, and
> maybe I should just ditch the JavaScript, but it is an unexpected problem.
This is useless use of javascript indeed, take a look at the input
element's specs. There is a specific value to the type attribute that
allows an image as submit button!
.
- References:
- php and javascript
- From: Joe Blow
- php and javascript
- Prev by Date: XSL-FO and PHP? ---- reliable PHP Hosting?
- Next by Date: Re: Dynamic Site Methodology
- Previous by thread: Re: php and javascript
- Next by thread: php_ext personnal
- Index(es):