Gå til innhold

geirthr

Medlemmer
  • Innlegg

    318
  • Ble med

  • Besøkte siden sist

Innlegg skrevet av geirthr

  1. Nå har jeg fått det til..

    Det funker tydeligvis ikke med embed i xml

     

    så vis man koden slik funker det:

       	<object id="MediaPlayer" width="320" height="286" classid="CLSID:22D6f312-B0F6-11D0-94AB-0080C74C7E95" 
       	standby="Loading Windows Media Player components..." 
       	type="application/x-oleobject" 
       	codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,7,1112"> 
    
       	<param name="filename" value="gfx/film.mpg" />
       	<param name="Showcontrols" value="True" />
       	<param name="autoStart" value="True" />
       	
           	
       	
       	
       	</object> 
    

  2.     	<object id="MediaPlayer" width="320" height="286" classid="CLSID:22D6f312-B0F6-11D0-94AB-0080C74C7E95" 
       	standby="Loading Windows Media Player components..." 
       	type="application/x-oleobject" 
       	codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,7,1112" /> 
    
       	<param name="filename" value="gfx/film.mpg" />
       	<param name="Showcontrols" value="True" />
       	<param name="autoStart" value="True" />
       	
       	<embed type="application/x-mplayer2" src="gfx/film.mpg" name="MediaPlayer" width="320" height="240"></embed>
       	
       	</object>
    

     

    Sånn ?

     

    funker like dårlig..

  3. Okei, her er noen av feilen

     

    column 47: an attribute value specification must be an attribute value literal unless SHORTTAG YES is specified.

    ...ct id="MediaPlayer" width=320 height=286 classid="CLSID:22D6f312-B0F6-11D0-94

     

    column 50: document type does not allow element "param" here; assuming missing "object" start-tag.

         <param name="filename" value="gfx/film.mpg" />

     

    column 17: there is no attribute "type".

         <embed type="application/x-mplayer2" src="gfx/film.mpg" name="MediaPlayer"

    You have used the attribute named above in your document, but the document type you are using does not support that attribute for this element. This error is often caused by incorrect use of the "Strict" document type with a document that uses frames (e.g. you must use the "Transitional" document type to get the "target" attribute), or by using vendor proprietary extensions such as "marginheight" (this is usually fixed by using CSS to achieve the desired effect instead).

     

    This error may also result if the element itself is not supported in the document type you are using, as an undefined element will have no supported attributes; in this case, see the element-undefined error message for further information.

     

    How to fix: check the spelling and case of the element and attribute, (Remember XHTML is all lower-case) and/or check that they are both allowed in the chosen document type, and/or use CSS instead of this attribute

     

    column 46: there is no attribute "src".

    ...ed type="application/x-mplayer2" src="gfx/film.mpg" name="MediaPlayer" width=

     

    There is no attribute "xxx" fpr jeg på alle attributene ..

  4. Hvordan skal jeg kunne legge til en film, når koden må valideres som XHTML 1.0 Strict?

     

    Jeg trudde dette skulle gå, men fikk masse feil:

       	<object id="MediaPlayer" width=320 height=286 classid="CLSID:22D6f312-B0F6-11D0-94AB-0080C74C7E95" 
       	standby="Loading Windows Media Player components..." 
       	type="application/x-oleobject" 
       	codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,7,1112"> 
    
       	<param name="filename" value="gfx/film.mpg">
       	<param name="Showcontrols" value="True">
       	<param name="autoStart" value="True">
       	
       	<embed type="application/x-mplayer2" src="gfx/film.mpg" name="MediaPlayer" width=320 height=240></embed>
       	
       	</object>
    

  5. Okei!

    Oppsumert, så skal jeg ha:

     

    kontakt.php :

    <html>
    <!-- Created on: 08.12.2005 -->
    <head>
     <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
     <title></title>
     <meta name="description" content="">
     <meta name="keywords" content="">
     <meta name="author" content="CHiCNCREAM TEAM 2004">
     <meta name="generator" content="AceHTML 6 Pro">
     <link rel="stylesheet" type="text/css" href="style.css" />
    </head>
    <body>
    
    <?php include('email.php'); ?>
    
    </body>
    </html>
    
    

     

    email.php :

    <?php
    
    /**********************************/
    /*       EMAIL CONTACT FORM       */
    /*          VERSION 1.1           */
    /* Copyright 2004 (c) Epleweb.com */
    /**********************************/
    
    /*	GNU General Public License
    --------------------------------------------------------------------
       This program is free software; you can redistribute it and/or modify
       it under the terms of the GNU General Public License as published by
       the Free Software Foundation; either version 2 of the License, or
       (at your option) any later version.
    
       This program is distributed in the hope that it will be useful,
       but WITHOUT ANY WARRANTY; without even the implied warranty of
       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
       GNU General Public License for more details.
    
       You should have received a copy of the GNU General Public License
       along with this program; if not, write to the Free Software
       Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    */
    
    if ($_POST['submit'] == TRUE) {
    $receiverMail = "[email protected]";
    $name  = stripslashes(strip_tags($_POST['name']));
    $email  = stripslashes(strip_tags($_POST['email']));
    $subject	= stripslashes(strip_tags($_POST['subject']));
    $msg  = stripslashes(strip_tags($_POST['msg']));
    $ip  	= $_SERVER['REMOTE_ADDR'];
    $msgformat	= "From: $name ($ip)\nEmail: $email\n\n$msg";
    
    if(empty($name) || empty($email) || empty($subject) || empty($msg)) {
     echo "<h2>The email was not sent</h2><p>Please fill all the required fields</p>";
    }
    elseif(!ereg("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$", $email)) {
     echo "<h2>The email was not sent</h2><p>The email address is invalid</p>";
    }
    elseif(mail($receiverMail, $subject, $msgformat, "From: $name <$email>")) {
     echo "<h2>The email has been sent!</h2><p>I will get back to you as soon as possible.</p>"; }
    else {
     echo "<h2>E-posten ble ikke sendt.</h2><p>Vennligst prøv igjenn senere... .</p>";
    }
    }
    else { ?>
    <form method="post" action="">
    <p>
    <label for="name">Name</label>
    <input id="name" name="name" type="text" size="30" maxlength="40" /><br />
    
    <label for="email">Email</label>
    <input id="email" name="email" type="text" size="30" maxlength="40" /><br />
    
    <label for="subject">Subject</label>
    <input id="subject" name="subject" type="text" value="" size="22" maxlength="40" /><br />
    
    <label for="message">Message</label>
    <textarea id="message" name="msg" cols="50" rows="6"></textarea><br />
    
    <label for="submit"> </label>
    <input id="submit" class="button" type="submit" name="submit" value="Send" />
    </p>
    </form>
    <?php } ?>
    
    

     

    style.css :

    
    @charset "iso-8859-1";
            
    
    
    textarea {
    overflow:auto;
    display:block;
    float:left;
    margin-bottom:10px;
    }
    
    input, textarea {
    border:1px solid #999999;
    padding:1px 2px;
    }
    
    label, input {
    display:block;
    width:150px;
    float:left;
    margin-bottom:10px;
    }
    
    label {
    text-align:right;
    width:60px;
    padding-right:15px;
    }
    
    form br {
    clear:left;
    }
    input.button {
    width:80px;
    background:white;
    }
    
    

     

    Slik har jeg det nå, men det funker ikke...

     

    Tusen takk for at dere gidder å hjelpe meg.. :blush:

     

    :thumbup:

  6. Kan vel også si at det virker like dårlig med denne HTML filen:

     

    <html>
    <!-- Created on: 08.12.2005 -->
    <head>
     <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
     <title></title>
     <meta name="description" content="">
     <meta name="keywords" content="">
     <meta name="author" content="CHiCNCREAM TEAM 2004">
     <meta name="generator" content="AceHTML 6 Pro">
     <link rel="stylesheet" type="text/css" href="style.css" />
    </head>
    <body>
    
    <?php include('email.php'); ?>
    
    </body>
    </html>
    

  7. Hmm.. Mulig jeg gjør noe feil her ass, men det funker ikke..

     

    Her er er alt jeg har gjort sålangt:

     

    kontakt.xhml :

    <?xml version="1.0" encoding="iso-8859-1"?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
       "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    
    
    <head>
    <title>Kontakt</title>
                   <link rel="stylesheet" type="text/css" href="style.css" />
    
    </head>
    
    <body>  
    
    
    <?php include('email.php'); ?>
    
    
    </body>
    </html>
    

     

    CSS filen og PHP filen er som før..

     

    Alle filene (email.php, style.css og kontakt.xhtml) ligger i samme folder.

  8. PHP filen:

    <?php
    
    /**********************************/
    /*       EMAIL CONTACT FORM       */
    /*          VERSION 1.1           */
    /* Copyright 2004 (c) Epleweb.com */
    /**********************************/
    
    /*	GNU General Public License
    --------------------------------------------------------------------
       This program is free software; you can redistribute it and/or modify
       it under the terms of the GNU General Public License as published by
       the Free Software Foundation; either version 2 of the License, or
       (at your option) any later version.
    
       This program is distributed in the hope that it will be useful,
       but WITHOUT ANY WARRANTY; without even the implied warranty of
       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
       GNU General Public License for more details.
    
       You should have received a copy of the GNU General Public License
       along with this program; if not, write to the Free Software
       Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    */
    
    if ($_POST['submit'] == TRUE) {
    $receiverMail = "[email protected]";
    $name  = stripslashes(strip_tags($_POST['name']));
    $email  = stripslashes(strip_tags($_POST['email']));
    $subject	= stripslashes(strip_tags($_POST['subject']));
    $msg  = stripslashes(strip_tags($_POST['msg']));
    $ip  	= $_SERVER['REMOTE_ADDR'];
    $msgformat	= "From: $name ($ip)\nEmail: $email\n\n$msg";
    
    if(empty($name) || empty($email) || empty($subject) || empty($msg)) {
     echo "<h2>The email was not sent</h2><p>Please fill all the required fields</p>";
    }
    elseif(!ereg("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$", $email)) {
     echo "<h2>The email was not sent</h2><p>The email address is invalid</p>";
    }
    elseif(mail($receiverMail, $subject, $msgformat, "From: $name <$email>")) {
     echo "<h2>The email has been sent!</h2><p>I will get back to you as soon as possible.</p>"; }
    else {
     echo "<h2>E-posten ble ikke sendt.</h2><p>Vennligst prøv igjenn senere... .</p>";
    }
    }
    else { ?>
    <form method="post" action="">
    <p>
    <label for="name">Name</label>
    <input id="name" name="name" type="text" size="30" maxlength="40" /><br />
    
    <label for="email">Email</label>
    <input id="email" name="email" type="text" size="30" maxlength="40" /><br />
    
    <label for="subject">Subject</label>
    <input id="subject" name="subject" type="text" value="" size="22" maxlength="40" /><br />
    
    <label for="message">Message</label>
    <textarea id="message" name="msg" cols="50" rows="6"></textarea><br />
    
    <label for="submit"> </label>
    <input id="submit" class="button" type="submit" name="submit" value="Send" />
    </p>
    </form>
    <?php } ?>

     

    På epleweb.com ligger denne CSS koden.

    textarea {
    overflow:auto;
    display:block;
    float:left;
    margin-bottom:10px;
    }
    
    input, textarea {
    border:1px solid #999999;
    padding:1px 2px;
    }
    
    label, input {
    display:block;
    width:150px;
    float:left;
    margin-bottom:10px;
    }
    
    label {
    text-align:right;
    width:60px;
    padding-right:15px;
    }
    
    form br {
    clear:left;
    }
    input.button {
    width:80px;
    background:white;
    }
    

     

     

     

    Det jeg har gjort hittil er å lage style.css, men denne koden i å lagt filene (email.php og style.css) i samme mappe.

     

    Men jeg regner med at jeg må ha med en setning ala denne: <link rel="stylesheet" type="text/css" href="index.css" /> med i php fila? eller?

×
×
  • Opprett ny...