JavaScript - Need Help With Running Flash Video!
I want to run a flash video on my web site. I've been working on this for days now, and obviously missing something.
The page is really BRIEF -- nothing more than <object> calls and swfobject.registerObject call. when I look at it on the server, I get a totally blank page in IE. In firefox, I see a little "block" tab where the movie frame would be if it worked. Here is the whole code: thanks so much for looking at it. Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <LINK REL="SHORTCUT ICON" HREF="http://olympiceq.com/favicon.ico"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Olympic Equine</title> </head> <body> <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="360" height="264" id="FLVPlayer"> <param name="movie" value="FLVPlayer_Progressive.swf" /> <param name="quality" value="high" /> <param name="wmode" value="opaque" /> <param name="scale" value="noscale" /> <param name="salign" value="lt" /> <param name="FlashVars" value="&MM_ComponentVersion=1&skinName=Corona_Skin_2&streamName=HorseswithClicktoPlay&autoPlay=false&autoRewind=false" /> <param name="swfversion" value="8,0,0,0" /> <!-- This param tag prompts users with Flash Player 6.0 r65 and higher to download the latest version of Flash Player. Delete it if you don’t want users to see the prompt. --> <param name="expressinstall" value="expressInstall.swf" /> <!-- Next object tag is for non-IE browsers. So hide it from IE using IECC. --> <!--[if !IE]>--> <object type="application/x-shockwave-flash" data="FLVPlayer_Progressive.swf" width="360" height="264"> <!--<![endif]--> <param name="quality" value="high" /> <param name="wmode" value="opaque" /> <param name="scale" value="noscale" /> <param name="salign" value="lt" /> <param name="FlashVars" value="&MM_ComponentVersion=1&skinName=Corona_Skin_2&streamName=HorseswithClicktoPlay&autoPlay=false&autoRewind=false" /> <param name="swfversion" value="8,0,0,0" /> <param name="expressinstall" value="expressInstall.swf" /> <!-- The browser displays the following alternative content for users with Flash Player 6.0 and older. --> <div> <h4>Content on this page requires a newer version of Adobe Flash Player.</h4> <p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /></a></p> </div> <!--[if !IE]>--> </object> <!--<![endif]--> </object> <script type="text/javascript"> <!-- swfobject.registerObject("FLVPlayer"); //--> </script> </body> </html> Similar TutorialsI have created a transparent flash video (virtual spokesperson) for my website. For demoing purposes, I would like to have this appear on any desired website. This is what I am trying to produce - here a virtual spokesperson appears on the codingforums.com website: http://www.innovateads.com/iads/demo...dingforums.com Have a look at other sites which enable one to type in a URL and their demo virtual spokesperson appears on the given site: http://www.vspworldwide.com, http://www.impactspokesperson.com, http://www.websitetalkingheads.com and http://www.laserstreamvideo.com. I believe they do this within an iframe to display the underlying website. Any ideas how to get this working ? I would really appreciate any feedback, code, how-tos, links... whatever. I am a complete javascript newbie. Thanks is there a way to stop a flash video with jQuery?? I'm using a html5 video with flash fallback.. i'm using the video on a modal pop up.. when i try to hide the video, the flash video doesn't stop... so before i hide the mask, i must stop or pause the video, then hide.. i tried various ways, but i can't seem to make them work.. Code: <video id="480p" width="848" height="480" controls="controls" poster="New_Test_Encodes_7-31-11/Test_Encode_Desktop_7-31-11/poster.jpg"> <source src="New_Test_Encodes_7-31-11/Test_Encode_Desktop_7-31-11/Marie_Mcray_Test-H264_480p.mp4" type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"' /> <source src="New_Test_Encodes_7-31-11/Test_Encode_Desktop_7-31-11/Marie_Mcray_Test.ogg" type='video/ogg; codecs="theora, vorbis"' /> <!-- Flash Fallback. Use any flash video player here. Make sure to keep the vjs-flash-fallback class. --> <object id="480pfallback" class="480p" width="848" height="480" type="application/x-shockwave-flash" data="flowplayer/flowplayer-3.2.7.swf"> <param name="movie" value="flowplayer/flowplayer-3.2.7.swf" /> <param name="allowfullscreen" value="true" /> <param name="flashvars" value='config={"playlist":["New_Test_Encodes_7-31-11/Test_Encode_Desktop_7-31-11/poster.jpg", {"url": "New_Test_Encodes_7-31-11/Test_Encode_Desktop_7-31-11/Marie_Mcray_Test-H264_480p.mp4","autoPlay":false,"autoBuffering":false}]}' /> <!-- Image Fallback. Typically the same as the poster image. --> <img src="New_Test_Encodes_7-31-11/Test_Encode_Desktop_7-31-11/Marie_McCray_A_O_poster.jpg" width="848" height="480" alt="Poster Image" title="No video playback capabilities." /> </object> </video><!--480p--> hi, I have created a flash video that work on a php table (like php-nuke), this is seen well on my PC, instead with various screen the video size is not good. ON screen big the video is small, on screen small the video is big... How i can made a script that change the dimension of flash video ? any idea ? please help me.. This is what I have so far which works as a cross-browser download however Firefox will play the video locally inside the popup window: is this normal behaviour? Code: <span class="popup"><a href="javascript:void(window.open('videos/directdrive.flv','','height=383,width=512'));">Watch a video!</a></span> link to the page This is a very new area for me as you can probably tell and I was wondering if websites require a flash player to view video or do some browsers have a flash player built in as Firefox has led me to believe? Thanks. Hi from Ireland! I recently signed up to Google Analytics and it began to block my flash content. I removed the tracker code (javascript) and deleted my account though my flash content is still blocked. Can someone help? I'll buy you a pint. I am not sure if I am in the right section. I tried to search this but couldn't find what I needed. I am very limited on my javascript knowledge. I need a video player that functions almost exactly like the one in this example: http://www.popcap.com/games/bookworm...L_1_8_19_08_en {the links that toggle between the video and flash slideshow depending on which is clicked. The player showing the videos and screenshots for the game}. I tried looking at the source to understand the functions, but my code is not working. I know the player is calling some javascript, but I'm not sure I understand it all. Can someone explain to me the basic functioning of this player as shown? I would very much appreciate it. Hello everyone! I found this article over devness: http://devness.com/2009/06/playing-w...animated-menu/ It is fantastic, but I'm a complete n00b and I was wondering what the JavaScript would look like if the situation was a little different. Picture this: A Super Mario sprite with him standing normally, but to his right is the word "Home". Upon roll over of either the sprite itself or the text, mario does one of his trademark jumps by the way of a few sprites. I know how to do this in flash, but I would like to eliminate it so I have maximum compatibility and no external plugins required. Anyone have any ideas or suggestions? Any help is greatly appreciated!! Hi, I currently created a video uploader, but when the video is too big in size, the page seems to be not doing any until the video is completely uploaded. I want to put somewhat like "loading.. please wait" script until the video is not completely uploaded. Thanks. //Ana hi guys, i was wondering if anyone could help me. Ive been looking into the above and want to implement it on my site. I have created no flash pages and flash pages, but instead of creating a portal at the front of the site that leads you to a flash site and a no flash site id like to do it so the page detects flash or not, and redirects to whichever URL. Is this possible, or do multiple browsers cause problems ? cheers The first time I enter the command n it should run the first if statement, when I enter n it should then run the second one as its in zone two. However this is just not happening... What am I doing wrong. Its simply running the second one and skipping the first. Thanks in advance folks // gameFunctions.js // Javascript file for Game.html // September 29th 2010 Edition // The below represent our global variables for the game. The first variable // is called playerScore, and represents the total earned points. The player // earns or loses points based on progress in the game, this value can either // increase or decrease. var playerLocation = "zone"; function runProgram() { var command = ""; command = document.getElementById("txtCommand").value; switch (command) { case "n": north(); break; case "s": south(); break; case "e": east(); break; case "w": west(); break; case "north": north(); break; case "south": south(); break; case "east": east(); break; case "west": west(); break; default: giveError(); } } // The following function when called will take the player north. function north() { if(playerLocation = "zone") { var message = "You have come to what seems to be a beach"; post(message); var playerLocation = "zoneTwo"; } if(playerLocation = "zoneTwo") { var message = "You are unsure if you should set up camp. Set up camp?" post(message); var playerLocation = "zoneThree"; } else { giveError(); } } // The following function when called will take the player east. function east() { if(playerLocation = "zone") { var message = "You have come to a very large and steep mountain"; post(message); var playerLocation = "zoneTwo"; } if(playerLocation = "zoneTwo") { var message = "You are unsure if you should set up camp. Set up Camp?"; post(message); var playerLocation = "zoneThree"; } else { giveError(); } } // The following function when called will take the player south. function south() { if(playerLocation = "zone") { var message = "You have come to the entrance of a mine"; post(message); var playerLocation = "zoneTwo"; } if(playerLocation = "zoneTwo") { var message = "You are unsure if you should set up camp. Set up Camp?"; post(message); var playerLocation = "zoneThree"; } else { giveError(); } } } // The following function when called will take the player west. function west() { if(playerLocation = "zone") { var message = "You have found the edge of the world"; post(message); var playerLocation = "zoneTwo"; } if(playerLocation = "zoneTwo") { var message = "You are unsure if you should set up camp. Set up Camp?"; post(message); var playerLocation = "zoneThree"; } else { giveError(); } } // The following function reports an error when the program deviates from standard functionality. It is used mainly for debugging. function giveError() { alert("gameFunctions.js has encountered a critical error") alert("Please check that you are not using Internet Explorer to run this page") alert("The program will now close") } // The following function reports an error when the typed in command is not recognized by the program database. function doNotUnderstand() { alert("I am sorry but I do not understand please try again") } function post(newText) { document.getElementById("taGameText").value = "" var gameTextBox = document.getElementById("taGameText"); gameTextBox.value = newText + gameTextBox.value; } Hi Guys, I'm remotely new to the world of scripting in general. I'm trying to run two scripts: Coda Slider (http://www.ndoherty.biz/tag/coda-slider/) and OS X Style Dialogue (http://www.ericmmartin.com/projects/simplemodal-demos/) But I'm am having difficulty doing so. I've heard the term "script confliction" throw around a lot - but I don't know how to solve it. My scripting code can be seen on the practice website: http://thenativedrum.com/practice/ Any help would be greatly appreciated. Thanks in advance! Hey all. I hate posting this problem, because I am quite embarrassed by this script I have put together. This is not the final script, it is a draft, but I am trying to learn as much as possible and I would like to fix this before I move on and completely rewrite it. As you can probably tell - this is my first crack at JS... Right now I have a page with a registration form, seen he http://www.temp1.hangnailproductions...gistration.php It is working as well as it can be in FireFox, but in IE it is not working at all. Now, I just ran the IE8 debugger, and my first problem is the onload function in the body tag, it is saying that an object is missing, but I do not understand what this means. Can anyone help me with this please? Again, sorry for asking for help on such a mess, but like I said - I need to learn and trial and error works best for me... Thanks very much. I have changed my event listener around a bit. Basically the "compare_fields" function is running when the "load_doc" function is run. Here is my JavaScript: PHP Code: function load_doc(doc, parent) { document.getElementById(parent).innerHTML = "<h1>Loading...</h1>"; var http = getHTTPObject(); if (http != undefined) { http.onreadystatechange = function() { req_doc(doc, parent, http); }; http.open("GET", doc, true); http.send(""); } } function req_doc(doc, parent, req) { if (req.readyState == 4) {//only if req is loaded if (req.status == 200) {//And if its okay document.getElementById(parent).innerHTML = req.responseText; add_event_listeners(page) } else { document.getElementById(parent).innerHTML = "Error fetching data: " + req.status + "\n" + req.statusText; add_event_listeners(); } } } //Script used to hide elements. Usage: expand(element id) function expand(elm) { var ex = document.getElementById(elm).style.display; if (ex == "none") { var obj = document.getElementById(elm); obj.style.display = "inline"; } else if (ex == "inline") { var obj = document.getElementById(elm); obj.style.display = "none"; } } function check_database(obj) { //Not written yet } //Function to test the password validation, should rewrite in future //to make it multifunctional function compare_fields(obj) { alert("com"); var field2 = obj.split("_"); field2 = document.getElementById(field2[1]+"2"); if (obj == field2) { if (obj.length >= 4) { document.getElementById("pass_status").style.color = "#00CC00"; document.getElementById("pass_status").innerHTML = "OK!"; } else { document.getElementById("pass_status").innerHTML = "Please must be between 5 - 14 characters long! "; document.getElementById("pass_status").style.color = "#FF0000"; } } else { document.getElementById("pass_status").innerHTML = "Passwords do not match!"; document.getElementById("pass_status").style.color = "#FF0000"; } } Global JavaScript: PHP Code: //Get httpobject function getHTTPObject() { var http = false; if (window.XMLHttpRequest) { http = new XMLHttpRequest(); } else if (window.ActiveXObject) { http = new ActiveXObject("Microsoft.XMLHTTP"); } return http; } //This function attaches events to elements. var addEvent = function( elm, evt, fun ) { if ( elm.addEventListener ) { elm.addEventListener( evt, fun, false ); } else if ( elm.attachEvent ) { elm.attachEvent( 'on' + evt, fun ); } else { elm [ 'on' + evt ] = fun; } }; Here is the first form, this contains the button: Code: <div style="border-color:#09C; border-width:1px; border-style:solid;"> <div class="register_button" onClick="load_doc('pages/forms/register_form.php', 'login_form')">Register</div> <h1>Login</h1> <h3>DrawSomething - WordGuesser</h3> <br /> <form id="login" action="php/check_login.php" method="post"> Username<br /><input type="text" name="username" class="text login_field"><br /> Password<br /><input type="password" name="password" class="text login_field"><br /> <input type="submit" value="Login" class="button blue" /> </form> <br /> <h2>Forgot Username/Password?</h2> <span class="expand" onClick="expand('forgot_p')"></span> <form class="forgot_p" action="php/forgot_p.php" method="post" style="display:none;" id="forgot_p"> Email<br /> <h3>Recover username</h3> <input type="text" name="forgot_email" class="text login_field"><br /> <span style=" font-weight:bold; font-size:21px;">- OR -</span><br /> Username<br /> <h3>Recover password</h3> <input type="text" name="forgot_password" class="text login_field"><br /> <input type="submit" value="Recover" class="button" /> </form> </div> Form which is loaded, this is when the "comare_fields" function is run when it shouldn't be. Edit: Oh and here is the PHP script which creates the event listeners. PHP Code: include "js/common.js"; include $js[$page]; //Write JS variables for event listeners $page_listeners = $listeners[$page]; //Check if there are some event listeners for this page if (count($page_listeners) > 0) { ///Start function echo "function add_event_listeners() { "; //Start loop to add event listeners for ($i = 0; $i < count($page_listeners); $i++) { $doc_elm = "document.getElementById('".$page_listeners[$i][1]."')"; echo "addEvent(\"document.getElementById('".$page_listeners[$i][0]."')\", \"".$page_listeners[$i][1]."\", ".$page_listeners[$i][2].");"."\n"; } //End function echo "}"; } Code that is written with the above PHP Code: function add_event_listeners() { addEvent("document.getElementById('reg_username')", "click", check_database); addEvent("document.getElementById('reg_email')", "click", check_database); addEvent("document.getElementById('reg_password')", "click", compare_fields('reg_password')); } And here are global PHP variables: PHP Code: <?php //Define page titles $titles = array( "login" => "Login - DrawSomething", "main" => "DrawSomething - Word Guesser", "admin" => "Administrator" ); //Require JavaScript files when onscreen HTML is selected $js = array( "login" => "js/login_js.js", "main" => "js/main_js.js", "admin" => "js/admin_js.js" ); //Pages to require $pages = array( "login" => "pages/login_page.php", "main" => "pages/main_page.php", "admin" => "pages/admin_page.php" ); //Event listeners to add $listeners = array( "login" => array(array("reg_username", "click", "check_database"), array("reg_email", "click", "check_database"), array("reg_password", "click", "compare_fields('reg_password')") ), ); ?> I currently have a script setup in HTML that will allow me too input a "Customers ID" and their "Gas Usage". Once those are entered, it will do some calculations and display text stating: > "Customers ID: 1 has gas usage of 50 and owes $100 > > Customers ID: 2 has gas usage of 120 and owes $195 > > Customers ID: 3 has gas usage of 85 and owes $142.5 > > Customers ID: 4 has gas usage of 65 and owes $112.5 > > Total amount of customers is: > > Total amount owed all customers:" **What im having trouble** with is making a running total that will calculate the "Total amount of customers" and the "Total amount owed by customers". All I know is that I may need to add another variable in the script. Code: function Summarise() { ID = prompt("Enter a Customer ID number ", -1) while(ID != -1) { var gasUsed = 0 gasUsed = prompt("Enter amount of gas used ", "0") var total = 0 ///Standard Rate is used to assist in the calculation of customers in excess of 60 Gas Used StandardRate = 60 * 1.75 if(gasUsed <= 60) { total= gasUsed * 2 document.write("Customers ID: " + ID) document.write(" has gas usage of " + gasUsed) document.write(" and owes $" + total) document.write("<br/>") } else { total= (gasUsed - 60) * 1.50 + StandardRate document.write("Customers ID: " + ID) document.write(" has gas usage of " + gasUsed) document.write(" and owes $" + total) document.write("<br/>") } ID = prompt("Enter a Customer ID number ", -1) } } Code: <html> <head> <script type="text/javascript"> function ChangeSize(objId,ToWidth,ToHeight,Spd) { CurrentWidth=parseInt(document.getElementById(objId).style.width); // CurrentHeight=parseInt(document.getElementById(objId).style.height); if(CurrentWidth<>ToWidth) { WidthDiff=ToWidth-CurrentWidth; if (Spd<WidthDiff) {Spd=round(WidthDiff/2);} CurrentWidth=CurrentWidth+Spd; document.getElementById(objId).style.width=CurrentWidth+'px'; TimeoutCmd="ChangeSize(\""+objId+"\","+ToWidth+","+ToHeight+","+Spd+");"; setTimeout(TimeoutCmd,1); } document.getElementById(objId).innerHTML=document.getElementById(objId).style.width; } </script> </head> <body> <div id="ChangeSizeDiv" style="width:200px;height:200px;border:5px groove green;overflow:hidden" onclick='ChangeSize("ChangeSizeDiv",500,500,15);'> Click here to resize me ... </div> </body> </html> I don't see any typos (though that doesn't mean I'm not blind). It doesn't even appear to be firing when I click the div. What's up? I am trying to run javascript within Iframe and its not running. (The bigger pictu The final target is to do a file upload without refreshing the page, and the original code is using the iframe as the target of the form, and the return from the server is a javascript code that should update some status field on the page. However the code return from the server is not running, so I just paste it in the iframe and it is still not running. ) Code: Content-type: text/html\n\n <html> <script type="text/javascript"> alert("this is running") </script> <iframe id="upload_target" name="upload_target" src="#" style="width:100;height:100;border:0px solid #fff;"> <script type="text/javascript"> alert("this not running") </script> </iframe> </html> Hi, I have just started to learn Javascript which when loaded into a safari web browser of Firefox browser just simply displays the code. I am currently using a MacBook Leopard operating system I have saved the code (corrected for mistakes, many many times) to my desktop Run my usual browser safari (and tried same with Firefox) loaded the file and all I get is a copy of the code displayed in the browser window. Javascript is enabled for both Please can you suggest some options for me to try and get the code working. All I am doing in this example is copied from a book to turn the background colour of the browser RED Thanks Tom I am having a bit of trouble adding the drop down options to the running total. I managed to get the check boxes and radio buttons to work fine, but can't figure out how to get the drop downs working. Basically when small is selected it adds $10 to the running total, medium $15 and large $20. Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Pizza</title> <script type="text/javascript"> function CalculateTotal(inputItem) { var frm=inputItem.form; if (!frm.fields) frm.fields=''; if (!frm.fields.match(inputItem.name)) frm.fields+=inputItem.name+',' // add the inputItem name to frm.fields var fieldary=frm.fields.split(','); // convert frm.fields to an array var cal=0; for (var zxc0=0;zxc0<fieldary.length-1;zxc0++){ // loop through the field names var input=document.getElementsByName(fieldary[zxc0]); // an array of fields with the mame for (var zxc0a=0;zxc0a<input.length;zxc0a++){ // loop through the input array to detect checked fields if (input[zxc0a].checked) cal+=input[zxc0a].value*1; // convert the value to a number and add to cal } } frm.calculatedTotal.value=cal; frm.total.value=formatCurrency(cal); } // format a value as currency. function formatCurrency(num) { num = num.toString().replace(/\$|\,/g,''); if(isNaN(num)) num = "0"; sign = (num == (num = Math.abs(num))); num = Math.floor(num*100+0.50000000001); cents = num%100; num = Math.floor(num/100).toString(); if(cents<10) cents = "0" + cents; for (var i = 0; i < Math.floor((num.length-(1+i))/3); i++) num = num.substring(0,num.length-(4*i+3)) + ',' + num.substring(num.length-(4*i+3)); return (((sign)?'':'-') + '$' + num + '.' + cents); } // This function initialzes all the form elements to default values function InitForm() { //Reset values on form var frm=document.selectionForm; frm.total.value='$0.00'; // set initial total frm.calculatedTotal.value=0; frm.previouslySelectedRadioButton.value=0; //Set all checkboxes and radio buttons on form to unchecked: for (i=0; i < frm.elements.length; i++) { if (frm.elements[i].type == 'checkbox' || frm.elements[i].type == 'radio') { frm.elements[i].checked =(frm.elements[i].value!='0.00')? false:true; } } } </script> </head> <body onLoad="InitForm();" onreset="InitForm();"> <table width="770" height="171" border="1" cellpadding="3"> <tr> <td colspan="2"><p>PIZZA ORDERS SCREEN Welcome: [username] Time: [current time] </p> <p>Select the requirements of the CLIENT's pizza below</p></td> </tr> <tr> <td width="462"><form method="POST" name="selectionForm"> <fieldset> <legend>NEW PIZZA SELECTION</legend> (pricing estimate) <p>Select the size pizza (base price of all types): <select name="SIZE" > <option name="small" value=10.0 selected>small ($10)</option> <option name="medium" value=15.00 onchange="CalculateTotal(this);">medium ($15)</option> <option name="large" value=20.00 >large ($20)</option> </select> </p> Select pizza type: <table width="292"> <tr> <td><label> <input type="radio" name="type" value="radio" id="RadioGroup1_0" /> Supreme <input type="radio" name="type" value="radio" id="RadioGroup1_1" /> Meat Lovers <input type="radio" name="type" value="radio" id="RadioGroup1_2" /> Aussie</label></td> </tr> </table> <p>Select additional topping (each topping is $2.50): </p> <table width="200" border="0" cellspacing="5" cellpadding="1"> <tr> <td width="70">Ham: </td> <td width="111"> <input type="checkbox" name="ham" value=2.50 onclick="CalculateTotal(this);"></td> </tr> <tr> <td width="70">Cheese: </td> <td width="111"> <input type="checkbox" name="cheese" value=2.50 onclick="CalculateTotal(this);"></td> </tr> <tr> <td width="70">Olives: </td> <td width="111"> <input type="checkbox" name="olives" value=2.50 onclick="CalculateTotal(this);"></td> </tr> <tr> <td width="70">Peppers: </td> <td width="111"> <input type="checkbox" name="peppers" value=2.50 onclick="CalculateTotal(this);"></td> </tr> <tr> <td width="70">Anchovies: </td> <td width="111"> <input type="checkbox" name="anchovies" value=2.50 onclick="CalculateTotal(this);"></td> </tr> <tr> <td width="70">Salami: </td> <td width="111"> <input type="checkbox" name="salami" value=2.50 onclick="CalculateTotal(this);"></td> </tr> </table> <p> </p> <p>Select the type of packaging: </p> <table width="200"> <tr> <td> <input type="radio" name="Sauce" value=1.00 onClick="CalculateTotal(this);"> Plastic $1.00 </td> </tr> <tr> <td> <input type="radio" name="Sauce" value=1.00 onClick="CalculateTotal(this);"> Plastic $1.00 </td> </tr> <tr> <td> <input type="radio" name="Sauce" value=1.00 onClick="CalculateTotal(this);"> Plastic $1.00 </td> </tr> </table> <p> <input type="hidden" name="calculatedTotal" value=0> <input type="hidden" name="previouslySelectedRadioButton" value=0> <font size=+1> Your total is: </font><font face=Arial size=2><font size=+1> <input type="text" name="total" readonly onFocus="this.blur();"> <br /> </p> <p> <input type="button" name="resetBtn" id="resetBtn" value="Reset" /> <input type="button" name="confirmBtn" id="confirmBtn" value="ADD TO ORDER" /> </p> </fieldset> </form></td> <td width="284" align="left" valign="top"> <form id="summaryForm" name="summaryForm" method="post" action=""> <fieldset><legend>CLIENT ORDER SUMMARY</legend> <p> <textarea name="summaryBox" cols="40" rows="20"></textarea> </p> <p>Number of Pizza's: <label for="noPizza"></label> <input name="noPizza" type="text" id="noPizza" size="5" /> </p> <p>Total for Pizza's: <input name="totPizza" type="text" id="totPizza" size="8" /> </p> <p>Email a confirmation: <input type="submit" name="email" id="email" value="KITCHEN CONFIRMATION" /> <br /> </p></fieldset> </form> <p> </p></td> </tr> <tr> <td colspan="2" align="right"><form id="form1" name="form1" method="post" action=""> <input type="button" name="reset all" id="reset all" value="RESET for New client" /> <input type="hidden" name="calculatedTotal" value=0> <input type="hidden" name="previouslySelectedRadioButton" value=0> </font> </p> </form></td> </tr> <tr> </table> </body> </html> Hello I am setting up a Javascript function in a page called functions.php function onAddBookmarkPressed() { <? mail("XXXXXXX", "Mail","Bookmark"); ?> } And calling it from another place within the page <div class="barstepimg"><img src="http://staggan.com/my_dir/images/progress_bar/fb_buttons/add_bookmark.gif" onclick="onAddBookmarkPressed();"/></div> I include functions.php in my index.php page... When I run the index.php page the function above runs and emails me... Any idea why? |