Re: [PHP] dynamic boxes problem... JS and PHP

Ryan S wrote:
Hey Pete,

First, you should reply to the list - that way more people could see the links you posted and help out.
Oops, my mistake, I thought I did that. Will add a snip at the bottom of this email.

It looks like there may be a problem with the form tags - when I look at this code I see
<form action="process_ecard1.php" method="post" name="mainform"></form>

That looks like you've closed your "mainform" before defining the inputs

can you tell me which line you see this? I did a search using that string on top and I couldnt find it... I even did a "form" search and still didnt find both of the form tags side by side..

Thanks again,

/// Snip of other mail with links ///
....but looks like posting links is the best option so will do: (to run the script) (View the source, its just a html file really)
All Javascript and CSS is in the ""; directory

The processing script just has
so its useless pointing you to the actual file source.

///// End snip///

Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around


You did reply to the list - it appeared in a separate thread in my viewer, so my bad.

OK, the version with <form ...></form> appeared when I used WebDeveloper toolbar to view the *generated* source.

When I look at the source code as received by Firefox (which is what the regular "View source" option does), the closing form-tag is where you expect.

i think I spotted a problem, however. Your original source code looks like it has a spurious <tr> after the first recipient block.

I think you need to really check the nesting of your tags - try indenting stuff to make the opening and closing tags line up and see if it gets out of line somewhere.

Anyway, I suspect what is happening is that Firefox is treating the </form> as a closing tag for the spurious </tr> and then implicitly closing the original <form> tag with an empty form.

Your Javascript code also adds a spurious <tr> tag (line 17 of dynamic_no_of_recipients2.js)

This is not really anything to do with PHP, of course... :)

Peter Ford, Developer phone: 01580 893333 fax: 01580 893399
Justcroft International Ltd.
Justcroft House, High Street, Staplehurst, Kent TN12 0AH United Kingdom
Registered in England and Wales: 2297906
Registered office: Stag Gates House, 63/64 The Avenue, Southampton SO17 1XS

Relevant Pages

  • Re: source code analysis tools
    ... tool such that suppose I have a source code rared or zipped and in that I ... but some editors support Ctags: ... in source and header files of various programming languages. ... These tags allow definitions to be quickly and easily ...
  • Re: ANN: Win a free license ModelMaker Code Explorer (prize draw extended)
    ... In the generated source code there are no tags. ... BTW: MM as shipped with D7 is noe considered ancient. ...
  • Re: Feedback before proposing a TIP...
    ... I am missing some functionality regarding tags from the text widget, ... - Show vertical lines to highlight the structure of the source code. ... tag option that sets the colour of such a line and another one that ...
  • Re: Unwanted tags in FrontPage HTML code
    ... To delete the tags, use Find and Replace. ... > Server reappear in the source code. ... > Does anyone know how to stop these unwanted tags appearing in the first ... > place and/or getting rid of them when they appear. ...
  • Re: tags removed from source code
    ... the "Generated source code" in my application. ... I know that closing tags for OPTION is optional, ... Because the first option has no closing ... <IE6 does not support OptionGroup ...