PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > php.general > Re: [PHP] dynamic boxes problem... JS and PHP
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
Re: [PHP] dynamic boxes problem... JS and PHP

Réponse
 
LinkBack Outils de la discussion
Vieux 08/04/2008, 23h20   #1
Ryan S
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: [PHP] dynamic boxes problem... JS and PHP

Hey!
Thanks Andrew, will look into those points that you sent me.

First thing to change will be the DOCTYPE I think, as i didht type that but must have copied code into a pre-made page...

Cheers!
R

----- Original Message ----
From: Andrew Ballard <aballard@gmail.com>
To: PHP General list <php-general@lists.php.net>
Sent: Tuesday, April 8, 2008 11:18:36 PM
Subject: Re: [php] dynamic boxes problem... JS and PHP

On Tue, Apr 8, 2008 at 3:51 PM, Ryan S <genphp@yahoo.com> wrote:
> Hi Guys,

[snip]
> Andrew:
> Thanks for replying!
>

[snip]
> > Also, FWIW, I doubt it has anything to do with your problem but you
> > are assigning the same value for ID each time through the loop. The ID
> > attribute is supposed to be unique for each element on the page.

>
> Tried changing it, no luck.


I didn't expect it to fix anything related to the problem you posted,
but it is something that should be fixed.


I looked at the HTML source (since I think that's where your problem
is). The problem is that you have <FORM> tags nested inside your table
between two rows:

</tr><form action="process_ecard1.php" method="post" name="mainform">
<tr>

While your nesting is correct insofar as making sure that your <FORM>,
<TABLE>, <TR> and <TD> tags don't cross each other, the <FORM> tag
can't be there. I see why you've done it that way - you have another
form nested inside a cell within the same table (you can't nest one
form within another), and your second form needs to span more than one
cell or row. You need to rethink your page flow and layout so that it
uses valid HTML structure. I don't know if you can combine both forms
into one or if you need to split the table apart.

FWIW, while validating the above solution I found an extra (empty and
unclosed) <TR> tag inside the recipient table which prompted me to run
your HTML through the W3C validator. It found 19 errors that keep it
from validating as XHTML strict as specified in your DOCTYPE. Most of
these won't cause major problems, but the 6th error reported is the
cause of the problem you're having: "document type does not allow
element 'form' here".

Andrew

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php






__________________________________________________ __________________________________
You rock. That's why Blockbuster's offering you one month of Blockbuster Total Access, No Cost.
http://tc.deals.yahoo.com/tc/blockbuster/text5.com
  Réponse avec citation
Vieux 08/04/2008, 23h32   #2
Daniel Brown
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: [PHP] dynamic boxes problem... JS and PHP

On Tue, Apr 8, 2008 at 6:20 PM, Ryan S <genphp@yahoo.com> wrote:
> Hey!
> Thanks Andrew, will look into those points that you sent me.
>
> First thing to change will be the DOCTYPE I think, as i didht type that but must have copied code into a pre-made page...


One thing I learned when screwing around with AJAX is that it,
like nearly everything that occurs in nature, must be customized to
play nicely with Microsoft things. Call me bitter. No, seriously, it
could be my new nickname.

<script language="JavaScript">
//Gets the browser specific XmlHttpRequest Object
function getXmlHttpRequestObject() {
if (window.XMLHttpRequest) {
return new XMLHttpRequest();
} else if(window.ActiveXObject) {
return new ActiveXObject("Microsoft.XMLHTTP");
} else {
document.getElementById('p_status').innerHTML = 'Status: Cound not
create XmlHttpRequest Object. Consider upgrading your browser.';
}
}
</script>

It's something I had to use when playing around with a chat script
I was building a while ago:
http://pilotpig.net/gchat/

--
</Daniel P. Brown>
Ask me about:
Dedicated servers starting @ $59.99/mo., VPS starting @ $19.99/mo.,
and shared hosting starting @ $2.50/mo.
Unmanaged, managed, and fully-managed!
  Réponse avec citation
Vieux 09/04/2008, 16h38   #3
Bill Guion
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: [PHP] dynamic boxes problem... JS and PHP

At 3:20 PM -0700 4/8/08, Ryan S wrote:

>Hey!
>Thanks Andrew, will look into those points that you sent me.
>
>First thing to change will be the DOCTYPE I think, as i didht type
>that but must have copied code into a pre-made page...
>
>Cheers!
>R
>


Ryan,

Four observations:

1. Don't try to solve your problem by changing the DOCTYPE. Bad HTML is
bad HTML. Changing the DOCTYPE may reduce the severity of the problem,
but it won't solve it.

2. You have interpreted the fact that IE gave you what you expected while
FF did not as a problem with FF, but the opposite is true. A problem
with IE allowed it to accept HTML that it should not have accepted. FF
treated it properly.

3. Firebug is a free download from Mozilla. I have it and it has solved
more problems for me than I can remember. (Or, maybe I just don't have
a very good memory.) Get it. You will see your <form...> tags inside
the <table> </table> tags, but not inside any <td>...</td> tags.

4. Learn to use the W3C Markup Validation service -
http://validator.w3.org/. It will point out many problems that you can
solve quickly.

-----===== Bill =====-----
--

Murphy's Law Cardinal Conundrum -
The optimist believes we live in the best of all possible worlds.
The pessimist fears this is true.


  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 21h57.


Édité par : vBulletin® version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,10404 seconds with 11 queries