HTML - Best File Type To Use?
hi, i was wondering what is the best filetype to use for a video on the internet? i need to embed a video which can be viewed by as many people as possible so i was thinking maybe .wmv or something that can be played through windows media play and most other common video player
Similar TutorialsThe following common code is not working in Firefox (3.0.11). It works in Safari (4.02) and IE7. When I say not working, I mean that when I click the submit button, the address does not change to the form processing url: Code: <!-- The data encoding type, enctype, MUST be specified as below --> <form enctype="multipart/form-data" action="uploader.php" method="POST"> <!-- MAX_FILE_SIZE must precede the file input field --> <input type="hidden" name="MAX_FILE_SIZE" value="30000" /> <!-- Name of input element determines name in $_FILES array --> Send this file: <input name="mp3file" type="file" /> <input type="submit" name="submit" value="Send File" /> </form> The file uploader.php does nothing, it is blank, I'm merely trying to establish communication. Once again, the code functions in IE and Safari so I dont think this is PHP related. I have a project written in ASP.NET under Visual Studio 2005 with C#. I am also using Infragistics objects for .NET Advantage 2007. In my page to attach resources to a record I have written a browser and am displaying previously chosen resources here. But when I click the upload button the page opens a new window (which is not a dialog window, but a normal one) which is exactly the same as my dialog window. How can this possibly happen? Can anyone help me? I am generating a data file for Excel using XML structure. I have found 2 MIME types with partially expected functionality: application/xml: this works well assuming the user has a version of Excel that is associated with the headers in the file and/or the user doesn't have XML files associated with a separate application. application/vnd.ms-excel: this tends to append ".xls" to the end of the filename. When opening the file, Excel generates a warning that the data formats do not match because it is expect XLS format. If there is a 3rd MIME type, I'm not using a search engine that is aware of it. Can anyone suggest a MIME type that forces the application to open in Excel without presuming XLS format? Hi guys, I'm trying to create a form which uploads an image from the user and saves it in the database. However with the code I have so far it seems the input isn't working. Any help would be appreciated. This is what I have: <html> <head><title>Store image into SQL Database</title></head> <body> PHP Code: <?php if ($_POST[submit]) { include("connect.php"); $data = addslashes(fread(fopen($_POST[form_data], "r"), filesize($_POST[form_data]))); $result=MYSQL_QUERY("INSERT INTO binary_data (description,bin_data,filename,filesize,filetype) ". "VALUES ('$_POST[form_description]','$_POST[data]','$_POST[form_data_name]','$_POST[form_data_size]','$_POST[form_data_type]')"); $id= mysql_insert_id(); MYSQL_CLOSE(); } else { ?> HTML Code: <form method="post" action="imageupload.php" enctype="multipart/form-data"> File Description:<br> <input type="text" name="form_description" size="40"> <input type="hidden" name="MAX_FILE_SIZE" value="1000000"> <br>File to upload/store in database:<br> <input type="file" name="form_data" size="40"> <p><input type="submit" name="submit" value="submit"> </form> <?php } ?> </body> </html> Any idea why the "theuploadedfile" input is not displayed when the program comes in after the submit ? PHP Code: <?php print 'Post=<pre>'; print_r($_POST);print '</pre>'; // PROBLEM $_POST['theuploadedfile'] IS NOT DISPLAYED (the text one is) ?> <form enctype="multipart/form-data" action="<?php print $_SERVER['PHP_SELF']; ?>" method="post"> <br>File to upload <input name="status" type="hidden" value="submitted"> <br>A<input name="thetexttype" type="text" size="100"> <br>B<input name="theuploadedfile" type="file" size="100" > <br><input name="submit" type="submit"> </form> Conflict between Mime Type and Document Type... Morning - I have recently been learning CSS and have been upgrading my site to Semantically correct code. The first templat I am building is the following page http://www.colletts.co.uk/colletts_n...ndexflash.html and validates here validates... sort of. Should I be worried about the mime type, what effect will this have on the page. If I follow the instructions and change the file extension to xhtml all hell breaks loose - http://www.colletts.co.uk/colletts_n...dexflash.xhtml IE Error - can't open thios document etc... What am I doing wrong??? Best, Mas Hi, I have got an input form to upload files; the form also accepts some other user input. The upload works fine, but I need to display some filenames by default, but this does not work. I tried using: <input type="file" name="images[]" value="<?php echo $default_filename; ?>"... This did not work, so I tried: <input type="file" name="images[]" value="Testfile.jpg"..., but this does not work too. All this is in a <form action="<?php echo $_PHP_SELF; ?>" method="post" enctype="multipart/form-data">. It seems to me that in an input field of type "file", default values are not accepted, though they should be according to the documentation. Any help will be greatly appreciated as I need this feature. Thanks On my page, I have a form: HTML Code: <div id="upfile"> <input type="file" name="uploadform" size="30" id="fileupload2"> </div> Now, I'm wondering, is there any way that I can set a default value for this? Ex "C:\My Documents\file.txt". I tried value=, but I guess it doesn't work for the "file" type. I'd change it, but I need it to be "file".. Any help? Edit: Just realized that spelling mistake in the title.. Ok I am getting some validation errors on my site and at least some of them appear to be because I am using xhtml in an html strict doc. So which is better.... to fix the errors or use something other than the html strict doc type. fyi-here is the site: http://www.h51school.com/1/home_page.asp Thanks~ basicaly what the title says i have no idea what they do. Please explain in nooob terms Hi, I am having a huge problem When ever I design a page everything looks great. When I publish it and look at it from other machines the type appears fuzzy or not sharp. I am using Dreamweaver MX on a Mac PowerBook G4 and have tried leaving the type font default, setting it to Arial, Times New Roman, and others. I have tried setting the font on the page and working with CSS. Doesn't matter what I do it is always the same. Can someone please tell me what I am doing wrong? Troy Hey there, Could anyone please explain why it tells me that it is not a valid doc type, Well that is what it says here http://validator.w3.org/check?verbos...iplayer.com%2F The actual site is http://www.online-multiplayer.com Thanks in advance for any help. Hi I see a lot of these type of borders on the internet, even when signing up on this site. How can I do this myself? I thought I had once knew how to do this this in Dreamweaver but am not able to find it anymore. Thanks Hi, Using servlets and javascript. When I upload a file based on the mime type I operations are delegated from servlet. picture.gif file's mime type is image/gif Problem I am facing is when I remove the file extension of any file say picture.gif file to picture mime type is application/octet-stream. How can I detect the mime type of a file given the filestream or any other solution to this problem Thanks. Hey guys, I'm having trouble typing in Canvas. I tried combining the jquery keyboard (http://net.tutsplus.com/tutorials/ja...ss-and-jquery/) with the canvas in order to directly type on the canvas, but I'm having trouble doing so. Does anyone have any suggestions? I really appreciate any help you can give me! Below is pasted the code I have tried so far... <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>Online Keyboard</title> <link rel="stylesheet" type="text/css" href="css/style.css" /> <style> body { margin: 0px; padding: 0px; } #myCanvas { border: 1px solid #9C9898; } </style> <script> window.onload = function(){ var canvas = document.getElementById("myCanvas"); var context = canvas.getContext("2d"); var x = 50; var y = 50; context.font = "12pt Calibri"; //context.fillStyle = "orange"; // text color context.fillText($(function(){ var $write = $('#write'), shift = false, capslock = false; $('#keyboard li').click(function(){ var $this = $(this), character = $this.html(); // If it's a lowercase letter, nothing happens to this variable // Shift keys if ($this.hasClass('left-shift') || $this.hasClass('right-shift')) { $('.letter').toggleClass('uppercase'); $('.symbol span').toggle(); shift = (shift === true) ? false : true; capslock = false; return false; } // Caps lock if ($this.hasClass('capslock')) { $('.letter').toggleClass('uppercase'); capslock = true; return false; } // Delete if ($this.hasClass('delete')) { var html = $write.html(); $write.html(html.substr(0, html.length - 1)); return false; } // Special characters if ($this.hasClass('symbol')) character = $('span:visible', $this).html(); if ($this.hasClass('space')) character = ' '; if ($this.hasClass('tab')) character = "\t"; if ($this.hasClass('return')) character = "\n"; // Uppercase letter if ($this.hasClass('uppercase')) character = character.toUpperCase(); // Remove shift once a key is clicked. if (shift === true) { $('.symbol span').toggle(); if (capslock === false) $('.letter').toggleClass('uppercase'); shift = false; } // Add the character $write.html($write.html() + character); }); }); , x, y); }; </script> </head> <body> <body onmousedown="return false;"> <canvas id="myCanvas" width="578" height="200"> </canvas> <div id="container"> <textarea id="write" rows="6" cols="60"></textarea> <ul id="keyboard"> <li class="symbol"><span class="off">`</span><span class="on">~</span></li> <li class="symbol"><span class="off">1</span><span class="on">!</span></li> <li class="symbol"><span class="off">2</span><span class="on">@</span></li> <li class="symbol"><span class="off">3</span><span class="on">#</span></li> <li class="symbol"><span class="off">4</span><span class="on">$</span></li> <li class="symbol"><span class="off">5</span><span class="on">%</span></li> <li class="symbol"><span class="off">6</span><span class="on">^</span></li> <li class="symbol"><span class="off">7</span><span class="on">&</span></li> <li class="symbol"><span class="off">8</span><span class="on">*</span></li> <li class="symbol"><span class="off">9</span><span class="on">(</span></li> <li class="symbol"><span class="off">0</span><span class="on">)</span></li> <li class="symbol"><span class="off">-</span><span class="on">_</span></li> <li class="symbol"><span class="off">=</span><span class="on">+</span></li> <li class="delete lastitem">delete</li> <li class="tab">tab</li> <li class="letter">q</li> <li class="letter">w</li> <li class="letter">e</li> <li class="letter">r</li> <li class="letter">t</li> <li class="letter">y</li> <li class="letter">u</li> <li class="letter">i</li> <li class="letter">o</li> <li class="letter">p</li> <li class="symbol"><span class="off">[</span><span class="on">{</span></li> <li class="symbol"><span class="off">]</span><span class="on">}</span></li> <li class="symbol lastitem"><span class="off">\</span><span class="on">|</span></li> <li class="capslock">caps lock</li> <li class="letter">a</li> <li class="letter">s</li> <li class="letter">d</li> <li class="letter">f</li> <li class="letter">g</li> <li class="letter">h</li> <li class="letter">j</li> <li class="letter">k</li> <li class="letter">l</li> <li class="symbol"><span class="off">;</span><span class="on">:</span></li> <li class="symbol"><span class="off">'</span><span class="on">"</span></li> <li class="return lastitem">return</li> <li class="left-shift">shift</li> <li class="letter">z</li> <li class="letter">x</li> <li class="letter">c</li> <li class="letter">v</li> <li class="letter">b</li> <li class="letter">n</li> <li class="letter">m</li> <li class="symbol"><span class="off">,</span><span class="on"><</span></li> <li class="symbol"><span class="off">.</span><span class="on">></span></li> <li class="symbol"><span class="off">/</span><span class="on">?</span></li> <li class="right-shift lastitem">shift</li> <li class="space lastitem"> </li> </ul> </div> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script> <script type="text/javascript" src="js/keyboard.js"></script> </body> </html> How would I make a search-type form that would insert what the user typed in a text box into a web address and go to that address? (for example, if they type 'help' and click the submit button, it would go to the page "http://www.websitename.com/help.html") I know the general form code, but I can't figure out if I would use a tag in the 'onSubmit' portion, or use javascript, or something else altogether. I inherited a HTML/PHP project which was a written in hurry and now I am trying to put in some editing and other confirmations. A type=reset was added to the screen and there is 2 option lists. When the form is first load only 1 list is displayed. Then the user makes the selection and depending on the selection the second list would display or not. On the reset option would like to hidden the 2nd selection but seems I can not get the right coding. I have tried onclick on the <input but no luck. There is a onSubmit on the <form which calls some validation checking. Tried put the call to function to hide the option list but no luck. Of course, I probably did not have the coding correct. How can I hide the 2nd option list on reset. Hi, i've been banging my head against the wall trying to find a solution, and have eventually given in..! I'm creating an html email that has an image in it. Easy When that email is received and the user prints, it replaces the image with another more print friendly version. Easy using media:print in a style. However, when the user then replies to the email, all of the <style> in the <head> is wiped and the large un-printer friendly image remains. The only solution would be to put all styles inline within the <body>. So the question..! Any ideas how to replicate this process only coding within the body? thanks, J Hi, Web newbie here. I am trying to add a "verse of the day" module to one of my websites. It is loaded into an iframe, but I am getting markup validation erros because I am using the strict doc type. Any ideas? http://bigdogcattle.com/test/ Thanks Jamie http://bigdogcattle.com |