HTML - Modify Javascript Into Html
Hello,
I would like to put the following Javascript into some of my posts on my Message Forums, but the Invision Boards don't allow javascripts to execute. Therefore I can put only HTML code. Code: <script language="JavaScript1.2"> //Disable select-text script (IE4+, NS6+) function disableselect(e){ return false } function reEnable(){ return true } //if IE4+ document.onselectstart=new Function ("return false") //if NS6 if (window.sidebar){ document.onmousedown=disableselect document.onclick=reEnable } </script> Any help will much appreciated! Similar TutorialsHi Guys, I've just started on my first Facebook Static FBML by inserting code generated by Emailmeform and used two codes I got from photobucket for the header and footer. The result unfortunately leaves two white lines above and below where the message is written. I want the whole box to be in the block blue color. Can anyone advise me what to do? I've posted the code below. Thanks, Colin HTML Code: <a href="http://s827.photobucket.com/albums/zz193/colinbrady1985/?action=view¤t=clubfbmlheader6.jpg" target="_blank"><img src="http://i827.photobucket.com/albums/zz193/colinbrady1985/clubfbmlheader6.jpg" border="0" alt="Photobucket"></a> <form method="post" action="http://www.emailmeform.com/fid.php?formid=534066" enctype="multipart/form-data" accept-charset="UTF-8"><table cellpadding="5" cellspacing="0" border="0" bgcolor="#01ABE8"><tr><td><font face="Arial Rounded MT Bold" size="3" color="#ED8E22">This is the first crucial question. Just type in your answer along with your email address to be in with a chance to win!</font> <div style="" id="mainmsg"> </div></td></tr></table><br><table cellpadding="3" cellspacing="0" border="0" bgcolor="#01ABE8"><tr valign="top"> <td nowrap><font face="Arial Rounded MT Bold" size="3" color="#ED8E22"></font></td> <td><textarea name="FieldData0" cols="160" rows="1"></textarea><br> </td></tr><tr> <td colspan="2"><table cellpadding=5 cellspacing=0 bgcolor="#01ABE8" width="100%"><tr bgcolor="#01ABE8"><td class="label" colspan="2"><font color="#ED8E22" face="Verdana" size="2"><b>Image Verification</b></font></td></tr><tr><td class="captcha" style="padding: 2px;" width="10"><img src="http://www.emailmeform.com/turing.php" id="captcha" alt="captcha"></td><td class="field" valign="top"><div><font color="#FFFFFF">Please enter the text from the image</font>:<br><input type="text" name="Turing" value="" maxlength="100" size="10"> [ <a href="#" onclick=" document.getElementById('captcha').src = document.getElementById('captcha').src + '?' + (new Date()).getMilliseconds()">Refresh Image</a> ] [ <a href="http://www.emailmeform.com/?v=turing&pt=popup" onClick="window.open('http://www.emailmeform.com/?v=turing&pt=popup','_blank','width=400, height=500, left=' + (screen.width-800) + ', top=100');return false;">What's This?</a> ]</div></td></tr></table></td></tr><tr> <td> </td> <td align="right"><input type="text" name="hida2" value="" maxlength="100" size="3" style="display : none;"><input type="submit" class="btn" value="SEND ANSWER" name="Submit"> <input type="reset" class="btn" value=" START AGAIN " name="Clear"></td></tr><tr><td colspan=2 align="center"><br></td></tr></table></form> Need some help with coding. I'm a designer with little experience with programming. 1. I want the video to be centered in its column on the blog 2. I want to be able to choose the cover frame of the video (the still image it displays before it plays). 3. There are slim black bars on the left and right of the video. I think it is from the player. Is there any way to remove those? This is the basic code I have now. Any help would be appreciated. <p><embed src="http://freevideocoding.com/flvplayer.swf?file=http://www.1-on-1fitnesstraining.com/blog_videos/intro_02_no_mograph.flv&autoStart=false" width="360" height="264" quality="high" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed></p> This is my first plea for help in this forum. Here goes: Firstly I'm very new to all this, so this is probably very simple for some of you guys. Anyway, I got a free autoresponder from getresponse, I placed the script on a blogger.com page and it works great. However, it is one stupid looking, big, bulky, disproportioned piece of work. So, I'd love to be able to modify the size of it and maybe change the border, add a bit of colour or a jpeg or...well you know, jazz it up a bit. I submitted a ticket to their support section. They responded with a "get your website tech dude to do his thing, we can't help you" So, here I am, any ideas? Oh, do you need to see the script in order to advise me? Any help is really appreciated. Tony. i am trying to add a page to my site. i have to use this template. i want to show a graphic product link next to a descriptive text area. so far i can only get them to appear one under the other, not side by side. i think i need to split the page up into columns which i don't know how to do. also there are 2 lead-in paragraphs before the image and text...how do i just split the bottom of the page? thanks for any assistance. myheadhurts! recently i have been brosing thru many web templates and have downloaded some of the,.. well now i want to modify the text and put my text in those .. well i aint have any idea on how to do that..? well if text manipulations are possibly (which i think it is ) then hpw do i program it that on clicking this button it must go to the next page or load another page ....? i would be glad if you guys could help me out ... -------------------------------------------------------------------- professional web design Hi I am working on a new website and I would like to be able to modify my menu from one document instead of having to go through all of the 30 pages and copy and paste the code. Theres got to be a way to do this, the menu for each page just needs to point to another document for the code....ugh frustrating! Thanks for any help, Alex I've just inherited maintenance duties for this site, and have encountered a problem with headers. Here's the error I'm getting: Warning: Cannot modify header information - headers already sent by (output started at /home/cookin/public_html/index.php:3) in /home/cookin/public_html/index.php on line 3 I've been trying to fix this all day, and can't seem to find the problem. Been looking for white space but can't find any. Maybe a fresh set of eyes will be able to see what's going on here. Thanks in advance to anyone who can offer any insight. Here's the header code: <head> <?php header('Content-type:text/html;charset=utf-8');?><?php require_once "/home/cookin/public_html/cmsAdmin/lib/viewer_functions.php"; list($homepageRecords, $homepageMetaData) = getRecords(array( 'tableName' => 'homepage', )); list($quotesRecords, $quotesMetaData) = getRecords(array( 'tableName' => 'quotes', 'limit' => '1', 'orderBy' => 'RAND()', 'loadUploads' => '0', 'allowSearch' => '0', )); ?> <link href="p7ap/p7ap_02.css" rel="stylesheet" type="text/css" media="all"> <script type="text/javascript" src="p7ap/p7APscripts.js"></script> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <link rel="shortcut icon" href="http://www.whatscookin.ca/favicon.ico"> <title>What's Cookin' Kitchen and Catering in Erin</title> <meta name="Description" content="What's Cookin' in the Village of Erin provides ready-to-go meals, event catering, special savouries and quality kitchen wares. Our products are made-from-scratch in small batches from our own recipes to ensure we offer only quality goodness and great flavour."> <meta name="Keywords" content="kitchen, erin, catering, organic foods, 100 mile diet, jo fillery, village of erin, hills of headwaters"> <link href="styles/whatsCookin.css" rel="stylesheet" type="text/css"> <link href="styles/whatsCookin_print.css" rel="stylesheet" type="text/css" media="print"> <!--[if IE 5]> <style>body {text-align: center;}#wrapper {text-align: left;}.menulist a {float: left; clear: both;} #column_wrapper {height: 1%;}</style> <![endif]--><!--[if lte IE 7]> <style>#wrapper, #footer, #masthead, #column_wrapper {zoom: 1;}</style> <![endif]--> <link href="navigation/p7PMMh10.css" rel="stylesheet" type="text/css" media="all"> <script type="text/javascript" src="navigation/p7PMMscripts.js"></script> </head> Im making a calendar table and i want to be able to change the color of the background depending on the status of the date. and i wanted to know were do i code the conditional statements to determine the color of the background? and hot do i make that text take me to a form when you click on it? thanks for the help, Tavo I want to have a similar feature that this page has http://dtlr.com/shoes/shoes.html only the part that has the 4 thumbnails of the cropped shoes and then the larger image of the shoe next to it. Is this possible to build with html or javascript or is advanced css or something else needed? thanks hi, I'm not sure if its javascript that does it or any other language, but I being googling an cant find it.I am building a site and wanna create a "question sign" ? that when users hover over it , a dialogue box appears explaining what it is.I'm sure most of us have seen it on some site or the other. what I am looking for is like http://www.alexa.com/siteinfo/linuxquestion.org where it says,"Alexa traffic rank" and you hover over the question sign.Thats exactly what I want Can I get some help or links to text on how to create one? Thank you So I want to make an image that has mouseover tables that pop up. This is what the code looks like now: Code: <html> <table> <tr><td><img src= "pic.bmp" usemap="#mapareas"/></td></tr> </table> <map NAME ='mapareas'> <script language='JavaScript' type='text/javascript'> function show(id) { document.getElementById(id).style.visibility='visible'; return true; } function hide(id) { document.getElementById(id).style.visibility='hidden'; return true; } </script> <area shape = "rect" coords="0,0,100,100" title="one" onmouseover='javascript:show('one') onmouseout='javascript:hide('one')> <area shape = "rect" coords= "150,0,250,100" title="two" onmouseover='javascript:show('two') onmouseout='javascript:hide('two')> <area shape = "rect" coords= "0,150,100,250" title="three" onmouseover='javascript:show('three') onmouseout='javascript:hide('three')> <area shape = "rect" coords= "150,150,250,250" title="four" onmouseover='javascript:show('four') onmouseout='javascript:hide('four')> <area shape = "default" title="The Rest"> </map> <table border=0 cellPadding=0 cellSpacing=1 id='one' style='position:absolute; left:10px; top:120px; background:lightGrey; visibility:hidden'> <tr><td>ONE</td></tr> </table> <table border=0 cellPadding=0 cellSpacing=1 id='two' style='position:absolute; left:10px; top:120px; background:lightGrey; visibility:hidden'> <tr><td>TWO</td></tr> </table> <table border=0 cellPadding=0 cellSpacing=1 id='three' style='position:absolute; left:10px; top:120px; background:lightGrey; visibility:hidden'> <tr><td>THREE</td></tr> </table> <table border=0 cellPadding=0 cellSpacing=1 id='four' style='position:absolute; left:10px; top:120px; background:lightGrey; visibility:hidden'> <tr><td>FOUR</td></tr> </table> </html> everything is ok when the page is first loaded, but when I try the mouseovers, firefox's error console gives me this message: "syntax error javascript:show(" and "syntax error javascript:hide(" Can someone help me figure out what is going wrong? Thanks Hi All, This doesn't completely relate to HTML, I am more asking questions about Javascript but are related to HTML and CSS. Anyways here are my questions: 1 - Can you create a javascript file (.js) with out using HTML? If so how would you view this file? 2 - Can you link a CSS file to a Javascript file? 3 - Is there a certain program which is dedicated to view/making Javascript files? 4 - Is it legal to call a program that I make JavaScript Beam? and have copyrights to the name JavaScript Beam? If that is illegal then would it be legal (inclduing copyrights) to call the program I make JS Beam? Thanks Hey Team I am New to the boars this is my first html/java script code i wrote.. but it doesnt wan work could some body see wr my mistake is .. thx HTML Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 4.1 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>Reservation Form</title> </head> <body> <form action="res.php" method="post" name="pricecheck"> <input type="text" value="Limousine" disabled="disabled" /> <br> <table width="352" border="3" cellspacing="1" cellpadding="3"> <tr> <td><strong>Party size:</strong></td> <td> <select name="pasn" id="pasn" size="1"> <option value="0"></option> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> <option value="4">4</option> <option value="5">5</option> <option value="6">6</option> <option value="7">7</option> <option value="8">8</option> </select> </td> </tr> <tr> <td><strong> Trip Type:</strong></td> <td> <select name="tt" id="tt" size="1"> <option selected="">Select One</option> <option value="One Way">One Way</option> <option value="Round Trip">Round Trip</option> <option value="Land&Sea/Sea&Land">Land&Sea/Sea&Land</option> </select> </td> </tr> <tr> <td><strong>Transfare type</strong></td> <script type="text/javascript"> <td> if(tt="One Way") { <select name="trant1" id="trant" size="1"> <option>Select One</option> <option value="12">MCO To Disney</option> <option value="13">Disney To MCO</option> <option value="14">MCO To Cruis</option> <option value="15">Cruis To MCO</option> <option value="16">Disney To Cruis</option> </select> }else if (tt="Round Trip") { <select name="trant2" id="trant" size="1"> <option>Select One</option> <option value="17">MCO To Disney To MCO</option> <option value="18">MCO To Cruis To MCO</option> <option value="19">Disney To Cruis To Disney</option> <option value="20">Dsiney To Cruis To MCO</option> }else (tt="Land&Sea/Sea&Land") { <select name="trant3" id="trant" size="1"> <option>Select One</option> <option value="21 ">MCO To Disney to Cruis To MCO</option> <option value="22">MCO To Cruis To Dsiney to MCO</option> } </script> </td> </tr> </table> </form> </body> </html> thx again iehab ********* okay made a little changes still not work.. HTML Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 4.1 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>Reservation Form</title> </head> <body> <form action="res.php" method="post" name="pricecheck"> <input type="text" value="Limousine" disabled="disabled" /> <br> <table width="352" border="3" cellspacing="1" cellpadding="3"> <tr> <td><strong>Party size:</strong></td> <td> <select name="pasn" id="pasn" size="1"> <option value="0"></option> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> <option value="4">4</option> <option value="5">5</option> <option value="6">6</option> <option value="7">7</option> <option value="8">8</option> </select> </td> </tr> <tr> <td><strong> Trip Type:</strong></td> <td> <select name="tt" id="tt" size="1"> <option selected="">Select One</option> <option value="One Way">One Way</option> <option value="Round Trip">Round Trip</option> <option value="Land&Sea/Sea&Land">Land&Sea/Sea&Land</option> </select> </td> </tr> <tr> <td><strong>Transfare type</strong></td> <td> <script type="text/javascript"> var trant = array("MCO To Disney","MCO To Disney","MCO To Cruis","Cruis To MCO","Disney To Cruis","MCO To Disney To MCO","MCO To Cruis To MCO","Disney To Cruis To Disney","Dsiney To Cruis To MCO","MCO To Disney to Cruis To MCO","MCO To Cruis To Dsiney to MCO") if(tt="One Way") { for (i=0; i<=4; i++); document.write(<select name="trant[i]">tran[i]</select>); }else if (tt="Round Trip") { for (i=5; i<=8; i++); document.write(<select name="trant[i]">tran[i]</select>); }else (tt="Land&Sea/Sea&Land") { for (i=9; i<=10; i++); document.write(<select name="trant[i]">tran[i]</select>); } </script> </td> </tr> </table> <br> <input name="Submit" type="submit" value="Get Price>>" /> <input type="reset" name="Reset" id="button" value="Reset"> </form> </body> </html> Why can't this HTML Code: HTML Code: <table class='tableborder' cellpadding='6' cellspacing='1' border='0' width='100%'><tr><td class='maintitle' colspan='3' style='text-align:center'><a href='/index.php?showtopic='+ topicid +'' title='View the thread'>'+ maintitle +'</a></td></tr><tr><td align='center' class='row2' border='0'>Winner's Avatar</td><td align='center' class='row2' border='0'>Winner's Entry</td><td align='center' class='row2' border='0'>Winner's Prize</td></tr><tr><td align='center' class='row4' border='0'><a href='/index.php?showuser='+ userid +''><img src=''+ avatar +'' border='0' alt=''+ username +''s Avatar' /></a></td><td align='center' class='row3' border='0'><img src=''+ signature +'' alt=''+ username +''s Entry' /></td><td align='center' valign='middle' class='row4' border='0'><fieldset class='fieldset'><legend>Prize</legend><div><b>Name:</b> <a href='/index.php?showuser='+ userid +''>'+ username +'</a></div><div><b>Prize:</b> '+ prize +'</div><div><b>Admin Rating:</b> <img src=''+ ratimg +'' alt=''+ opinion +'' /></div><div><a href='/index.php?showtopic='+ topicid +''>Click here to visit the thread.</a></div></fieldset></td></tr></table> Go into JavaScript like this: HTML Code: <script> var topicid = ''; /* Something in here. */ var maintitle = ''; /* Something in here. */ var userid = ''; /* Something in here. */ var avatar = ''; /* Something in here. */ var username = ''; /* Something in here. */ var signature = ''; /* Something in here. */ var prize = ''; /* Something in here. */ var ratimg = ''; /* Something in here. */ var opinion = ''; /* Something in here. */ document.write('<table class='tableborder' cellpadding='6' cellspacing='1' border='0' width='100%'><tr><td class='maintitle' colspan='3' style='text-align:center'><a href='/index.php?showtopic='+ topicid +'' title='View the thread'>'+ maintitle +'</a></td></tr><tr><td align='center' class='row2' border='0'>Winner's Avatar</td><td align='center' class='row2' border='0'>Winner's Entry</td><td align='center' class='row2' border='0'>Winner's Prize</td></tr><tr><td align='center' class='row4' border='0'><a href='/index.php?showuser='+ userid +''><img src=''+ avatar +'' border='0' alt=''+ username +''s Avatar' /></a></td><td align='center' class='row3' border='0'><img src=''+ signature +'' alt=''+ username +''s Entry' /></td><td align='center' valign='middle' class='row4' border='0'><fieldset class='fieldset'><legend>Prize</legend><div><b>Name:</b> <a href='/index.php?showuser='+ userid +''>'+ username +'</a></div><div><b>Prize:</b> '+ prize +'</div><div><b>Admin Rating:</b> <img src=''+ ratimg +'' alt=''+ opinion +'' /></div><div><a href='/index.php?showtopic='+ topicid +''>Click here to visit the thread.</a></div></fieldset></td></tr></table>') </script> K so I'm making my brother an inventory website that leads to a digital order sheet. On the order sheet, it has a dropdown of the items he has in the database. It's supposed to show the quantity of what he has in stock, but here's the thing: In this database, there are two tables, called Dishes, and Cables. These two tables are assigned to 1 id, so that I can display them in <td id = 'quantity'/>. The problem is, it displays the Cables only, but I want it to be so that if I select one of the dishes, it selects the quantity for the dishes, and if I select one of the cables. Here's the code I have. Code: <html> <head> <script type="text/javascript" > var data = null; var data2 = null; function GETSTUFF(stuff) { var xmlhttp = new XMLHttpRequest(); xmlhttp.open('GET', stuff, false); xmlhttp.send(); return xmlhttp.responseText; } function buildList() { data = eval('('+ GETSTUFF('inventory_2.php') +')'); console.log(data); for (var i=0;i<data.length;i++) { document.getElementById('materials').innerHTML += '<option onclick="showQuantity(\''+ data[i]['Quantity'] +'\'">'+ data[i]['Supplier'] +'</option>'; } data2 = eval('('+ GETSTUFF('inventory_21.php') +')'); console.log(data2); for (var i2=0;i2<data2.length;i2++) { document.getElementById('materials').innerHTML += '<option onclick="showQuantity(\''+ data2[i2]['Quantity (Boxes)'] +'\'">'+data2[i2]['Type'] +'</option>'; } } function showQuantity() { var supplier = document.getElementById('materials').options[document.getElementById('materials').selectedIndex].value; var type = document.getElementById('materials').options[document.getElementById('materials').selectedIndex].value; var amount = 0; var amount2 = 0; for (var i=0;i<data.length;i++) { if (data[i]['Supplier'] == supplier) { amount = (data[i]['Quantity']); } } document.getElementById('quantity').innerHTML = 'Quantity : '+amount; for (var i2=0;i2<data2.length;i2++) { if (data2[i2]['Type'] == type) { amount2 = (data2[i2]['Quantity (Boxes)']); } } document.getElementById('quantity').innerHTML = 'Quantity (Boxes) : '+amount2; } </script> </head> <body onload="setTimeout('buildList()' ,100)"/> <center> <img src="images.jpg" width=125px height=125px/> <br> <font size="8" color="grey" face="purisa">Home </font> <font size="8" color="red" face="purisa"> Communications</font> <br> <font size="5" color="grey" face="purisa">Order </font> <font size="5" color="red" face="purisa"> Sheet</font> <br> <table border="3" width="100%"> <tr> <th>Material:</th> <th>Quantity in stock:</th> <th>Quantity needed:</th> </tr> <tr> <td> <select id="materials" name= "" onchange = "showQuantity()"> <option disabled>Select</option> </select> </td> <td id="quantity"> </td> <td> <form> <input type = "quantityNeeded" /> </form> </td> </tr> </table> <br> <input type = "button" value="Submit"/> </center> </body> </html> I know the if statement involves selectedIndex, but I can't figure it out. Please help. here just i load one image into the page, so how to change that into a button? i want to change help_button.jpg into button function changeSrc() { document.getElementById("temp1"); document.getElementById("choice1"); //var img = new Image(); //img.src="template_bg.jpg"; //document.body.appendChild(img); } </script> <body onload="changeSrc()"> <div id="apDiv1"><img id="temp1" align="middle" src="template_bg.jpg" width="694" height="566" /> <div id="apDiv2"><img id="choice1" align="middle" src="help_button.jpg" width="107" height="98"</div> </div> just i load one template in the page, and i create one button in that template, but when i reduce the size of the page, the template will move but the button will exist, i mean that will be constant... how to avoid that? Hi. On my website I have some HTML buttons that don't do anything. There is a read only blank text box underneath that the user cannot input things into. Is there some sort of javascript I can use so that when a certain button is clicked, writing that I have specified will appear in the text box? Thanks P.S Also if you could tell me how to do a link that when clicked all the text will be selected at once that would be great Code: function send_onclick(frmName) { var bolSubmit; bolSubmit = true; if (frmName.email.value == "") { alert("You must enter an email address"); bolSubmit = false; } if (bolSubmit == true) { frmName.submit(frmName); } } </script> </head> <body> <form name="frmName" method="post" action="validate.asp"> Enter your name in the text box. If nothing is entered, a warning <br /> message will be displayed. Only when you enter something into the <br /> text box will the page be submitted. <br /><br /> Please enter your name : <input type="text" name="email" size="20" /><br /> <input type="button" name="butSent" value="Do it" onclick="return send_onclick(frmName)"> </form> </body> </html> Hi there, I would like to know the purpose of having var bolSubmit in the code above. Also, why is it that "form name" allows my code to work even though there is a warning stating that it is outdated, but when I change it from "form name" to "form id", it does not complain of the warning anymore, but instead my code does not work. Please advise. While in a popup, can you click a link and have another popup (with its own properties) replace the existing one? Example: Let's say I have a thumbnail page for a photo gallery. I click the first thumbnail, which then opens a popup html page with a larger image and some other text. Then, there are arrows in the popup. When the user clicks the arrows, I want the popup to reload with new dimensions to show the new image. Here's the page I am working on: http://www.ario.cc/sculptures.html |