HTML - A Way To Detect Javascript?
Hi.
I am making a java scipt code for my link's image to change on mouse over. Is there a way to detect if a user has Java instaled? (And if they dont, just be a link without the change) Thanks. Similar TutorialsI basically need to know how to display a message when the viewers browser doesnt have Flash installed. A message like: Code: <a href="http://get.adobe.com/flashplayer/">Download Flash.</a> .. could be shown to the viewer. Now, what code to let me do that? Okay, first off I apologize but I am new to HTML and still learning, so sorry if this is an obvious question but I've been googling/researching/asking people for several days and I have come up with nothing worthwhile. On my website, I have it set up to where when you load the page it opens a small pop-up that asks for a simple user input (btw this is the idea of the page...) however the pop-up that loads is an external page. Is there a way that in MY page I can insert a code that would detect the confirmation text inside the pop-up window? Sorry if this doesn't make sense or isn't even possible, but I figured I may as well ask before I lose hope entirely. I'm writing a program that (tries to) detect pairs of html files and their associated folders. For example if you save a website to disk, then you get something like "foo.htm" and a folder named "foo_files". The problem is, this naming schema only applies to websites saved with english versions of common browsers. With a german version, for example, the folder looks more like "foo-Dateien". Is there any safe way find out which folder an html file is associated with? Thanks in advance for any help! I am currently working on a currency converter for my D&D website and have run into a bit of a problem. The basic idea is to select the appropriate currency you have from a row of radio buttons, insert the amount you have in a text area and in the next text area it will kick out a list of different currencies and the amount you will have in those currencies. My problem is that my JAVA skills are extremely poor. I figured out how to set up most of it but I cannot figure out how to grab the input and plug it into my formulas. Can anyone help me with this? Here is a link to the page: Currency Converter Any and all hope is greatly appreciated. Thanks. Take care and have a great day.... ciao, john., Here is the basic code without the web page info: Code: <script type = "text/javascript"> function radio_map(prefix) { var coins; // The type of coin selected // Go through all options to find the one that was selected for (cnt = 0; cnt < prefix.cointype.length; cnt++) { // If the coin was selected, checked will be true if (prefix.cointype[cnt].checked) coins = cnt; // Save that coin number } switch (coins) { // Copper case 0: prefix.matharea.value = "\n" + 1 * 1 + " Copper Coins \n" + 1 * .1 + " Silver Coins \n" + 1 * .01 + " Gold Coins \n" + 1 * .005 + " Platinum Coins \n" + 1 * .0001 + " Mithril Coins \n"; break; // Silver case 1: prefix.matharea.value = "\n" + 1 * 10 + " Copper Coins \n" + 1 * 1 + " Silver Coins \n" + 1 * .1 + " Gold Coins \n" + 1 * .05 + " Platinum Coins \n" + 1 * .001 + " Mithril Coins \n"; break; // Gold case 2: prefix.matharea.value = "\n" + 1 * 100 + " Copper Coins \n" + 1 * 10 + " Silver Coins \n" + 1 * 1 + " Gold Coins \n" + 1 * .5 + " Platinum Coins \n" + 1 * .01 + " Mithril Coins \n"; break; // Platinum case 3: prefix.matharea.value = "\n" + 1 * 1000 + " Copper Coins \n" + 1 * 10 + " Silver Coins \n" + 1 * 5 + " Gold Coins \n" + 1 * 1 + " Platinum Coins \n" + 1 * .1 + " Mithril Coins \n"; break; // Mithil case 4: prefix.matharea.value = "\n" + 1 * 10000 + " Copper Coins \n" + 1 * 1000 + " Silver Coins \n" + 1 * 100 + " Gold Coins \n" + 1 * 5 + " Platinum Coins \n" + 1 * 1 + " Mithril Coins \n"; break; } } </script> <form name="frmRadio"> <p> Please choose your coin type.</p> <div onclick ='radio_map(document.frmRadio)'> <input type="radio" name="cointype" value="Evanston"> Copper <input type="radio" name="cointype" value="Arlington Hts."> Silver <input type="radio" name="cointype" value="Oakbrook"> Gold <input type="radio" name="cointype" value="Downers Grove"> Platinum <input type="radio" name="cointype" value="Vernon Hills"> Mithril </div> Please input the number of coins that you have: <textarea name="coinarea" rows=1 cols=35> </textarea> Here are your converted coin numbers: <textarea name="matharea" rows=10 cols=35> </textarea> </form> For the website I'm working on i want to store the text someone enters in an imput box to be stored as a variable so i can have an alert that welcomes them to my site. any suggestions. this one isn't illegal. OK so I'm making an application and I've hit a snag with my Javascript. So I have a form and a list with some value, and under the list I have a button (not a submit) HTML 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=iso-8859-1" /> <title>Untitled Document</title> <script type="text/javascript"> <!-- function popUp(URL,WIDTH,HEIGHT){ day = new Date(); id = day.getTime(); var user = document.getElementById('user').value; eval("page" + id + " = window.open(URL, '"+ id + "', 'toolbar=1,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width="+WIDTH+",height="+HEIGHT+",left = 362,top = 234');"); } </script> <style type="text/css"> form{ margin: 0px; } .menu{ width: 200px; } #mem_list{ width: 200px; } </style> </head> <body> <div id="mem_list"> <center> Online User Info </center> <form method="get" action="/antrix/index.php"> <select name="color" size="5" class="menu" id="user"> <option value="Marlo">Marlo level 70 Warrior</option> <option value="Dsadasd">Dsadasd level 1 Warlock</option> <option value="Dsadasdd">Dsadasdd level 1 Priest</option> <option value="Asdassg">Asdassg level 1 Rogue</option> </select> <center> <input type="button" value="user options" onclick="javascript:popUp('mailmod.php','800','200')"/> </center> </form> </div> </body> </html> OK so when someone clicks the user options button i want the popup to go to the url and have the selected name in the GET value of the url like: mailmod.php?user=marlo if Marlo was selected. anyone got any ideas? *EDIT* yeh just realised this was in the wrong section, sorry ^_^ Hope this is the correct place for this question. What I want to do is have a webpage which asks a question, e.g. "What is your name?" and when the user enters a name, e.g. "Bob" a button pops up with "are you ready?" The user clicks that button and the page then tells the visitor: "Good morning, Bob; nice to see you" (or the button could be there from the beginning; it does not have to pop up) Just want this to learn how to do this and hope I can carry on from there. I am assuming I need a javascript to do this. 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> Hey guys / gals I have been asking around in several forums but they didnt give me correct codes. I am so desperate to get it done. I am using HTML and javascript. Everything is working expect the price list (from table) linked to the dropdown list is not shown up. I inserted the javascript code for displaying image when selected item on the order list (dropdown list), it is working well but the price list linked to this dropdown list was not shown up. Something wrong with Javascript. Can you check up my below code where is incorrect? Your help much appreciated. I urgently need your help. Thanks Look at the red and blue code below: <head> <script type="text/javascript"> window.onload = function() { document.getElementById("dlist1").onchange = function() { var option = this.options[this.selectedIndex]; document.getElementById("price_card").innerHTML = option.getAttribute("data-card") ? option.getAttribute("data-card") : ""; document.getElementById("price_memo").innerHTML = option.getAttribute("data-memo") ? option.getAttribute("data-memo") : ""; document.getElementById("price_tags1").innerHTML = option.getAttribute("data-tags1") ? option.getAttribute("data-tags1") : ""; document.getElementById("price_tags4").innerHTML = option.getAttribute("data-tags4") ? option.getAttribute("data-tags4") : ""; document.getElementById("price_key").innerHTML = option.getAttribute("data-key") ? option.getAttribute("data-key") : ""; document.getElementById("price_fridge").innerHTML = option.getAttribute("data-fridge") ? option.getAttribute("data-fridge") : ""; } } // displaying image when selected item on the order list </script> <script type="text/javascript"> function swapImage1() { var image = document.getElementById("imageToSwap1"); var dropd = document.getElementById("dlist1"); image.src = dropd.value; }; </script> <script type="text/javascript"> function swapImage2() { var image = document.getElementById("imageToSwap2"); var dropd = document.getElementById("dlist2"); image.src = dropd.value; }; </script> </head> <body> <table width="700"> // it is an order list <tr> <td> <p class="Card">ORDER 1:</p> // It is the first dropdown list named order 1 </td> </tr> <tr> <td> <p class="Dropdown"> <select name="ORDER1" size="12" multiple="multiple" id="dlist1" onchange="swapImage1()" > <optgroup label="Sow Seeds of Love"> <option value="None">None</option> <option data-card="32.00" data-memo="62.00" data-tags1="8.50" data-tags4="1.80" data-key="30.00" data-fridge="40.00" value="Images/Order_names/SowSeeds/Faith01_yellow.jpg">Faith</option> <option data-card="35.00" data-memo="65.00" data-tags1="9.50" data-tags4="1.80" data-key="20.00" data-fridge="40.00" value="Images/Order_names/SowSeeds/Grace01_green.jpg">Grace</option> <option data-card="1.00" data-memo="2.00" data-tags1="3.00" data-tags4="4.00" data-key="5.00" data-fridge="6.00" value="Images/Order_names/SowSeeds/Hope01_blue.jpg">Hope</option> <option data-card="6.00" data-memo="5.00" data-tags1="4.00" data-tags4="3.00" data-key="2.00" data-fridge="1.00" value="Images/Order_names/SowSeeds/Peace01_pink.jpg">Peace</option> <option data-card="21.00" data-memo="22.00" data-tags1="23.00" data-tags4="24.00" data-key="25.00" data-fridge="26.00" value="Images/Order_names/SowSeeds/FlowerSeedSachet01_two girls.jpg">Flower Seed</option> </optgroup> </select> </p> </td> <td> //it should display image when selected item from the order list - it is working well <img class= "ImageToSwap" id="imageToSwap1" src="Images/DropdownImages.gif" width="147" height="207" /> </td> </tr> </table> //This price list is not shown up when selected item from the order 1 (first dropdown list) Why not shown up???. <table> <tr> <th>Description</th> <th>Price</th> </tr> <tr> <td><label><input type="radio" name="medium" value="card" /> Card A6 (blank)</label></td> <td id="price_card"></td> </tr> <tr> <td><label><input type="radio" name="medium" value="memo" /> Memo Book A6</label></td> <td id="price_memo"></td> </tr> <tr> <td><label><input type="radio" name="medium" value="tags4" /> Gift Tags (4 designs per packet)</label></td> <td id="price_tags4"></td> </tr> <tr> <td><label><input type="radio" name="medium" value="tags1" /> Gift Tags - Single - Assorted</label></td> <td id="price_tags1"></td> </tr> <tr> <td><label><input type="radio" name="medium" value="key" /> Key Rings Perspex</label></td> <td id="price_key"></td> </tr> <tr> <td><label><input type="radio" name="medium" value="fridge" /> Fridge Art</label></td> <td id="price_fridge"></td> </tr> </table> <table width="700"> // it is the second dropdown list named Order 2 <tr> <td> <p class="Card">ORDER 2:</p> </td> </tr> <tr> <td> <p class="Dropdown"> <select name="ORDER2" size="12" multiple="multiple" id="dlist2" onchange="swapImage2()" > <optgroup label="Sow Seeds of Love"> <option value="None">None</option> <option data-card="32.00" data-memo="62.00" data-tags1="8.50" data-tags4="1.80" data-key="30.00" data-fridge="40.00" value="Images/Order_names/SowSeeds/Faith01_yellow.jpg">Faith</option> <option data-card="35.00" data-memo="65.00" data-tags1="9.50" data-tags4="1.80" data-key="20.00" data-fridge="40.00" value="Images/Order_names/SowSeeds/Grace01_green.jpg">Grace</option> <option data-card="1.00" data-memo="2.00" data-tags1="3.00" data-tags4="4.00" data-key="5.00" data-fridge="6.00" value="Images/Order_names/SowSeeds/Hope01_blue.jpg">Hope</option> <option data-card="6.00" data-memo="5.00" data-tags1="4.00" data-tags4="3.00" data-key="2.00" data-fridge="1.00" value="Images/Order_names/SowSeeds/Peace01_pink.jpg">Peace</option> <option data-card="21.00" data-memo="22.00" data-tags1="23.00" data-tags4="24.00" data-key="25.00" data-fridge="26.00" value="Images/Order_names/SowSeeds/FlowerSeedSachet01_two girls.jpg">Flower Seed</option> </optgroup> </select> </p> </td> <td> // displaying image when select item from the second dropdown - it is working well <img class="ImageToSwap" id="imageToSwap2" src="Images/DropdownImages.gif" width="147" height="207" /> </td> </tr> </table> [color="RoyalBlue"]//This price list is also not shown up when selected item from the order 2 (second dropdown). Why not shown up???/COLOR] <table> <tr> <th>Description</th> <th>Price</th> </tr> <tr> <td><label><input type="radio" name="medium" value="card" /> Card A6 (blank)</label></td> <td id="Td1"></td> </tr> <tr> <td><label><input type="radio" name="medium" value="memo" /> Memo Book A6</label></td> <td id="Td2"></td> </tr> <tr> <td><label><input type="radio" name="medium" value="tags4" /> Gift Tags (4 designs per packet)</label></td> <td id="Td3"></td> </tr> <tr> <td><label><input type="radio" name="medium" value="tags1" /> Gift Tags - Single - Assorted</label></td> <td id="Td4"></td> </tr> <tr> <td><label><input type="radio" name="medium" value="key" /> Key Rings Perspex</label></td> <td id="Td5"></td> </tr> <tr> <td><label><input type="radio" name="medium" value="fridge" /> Fridge Art</label></td> <td id="Td6"></td> </tr> </table> </body> Thank you Natz 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 everyone, I'm having this really weird problem with a form I'm using. I am creating a banner module which allows users to upload banner code via an html form, one of the fields is for the code itself wich may be html based eg.<img src="ectectect" /> or javascript like <script language="javascript" src="ad.aspx?pid=17987&bid=4939"></script> The problem is this when i put any form of javascript into the textarea even just <script></script> tags and post the form the content in the input containing the javascript is always empty. This is my form tag: Code: <form action="" method="post" name="update"> Any ideas why this is happening? My site will not display javascript for all days. I got script that changes content daily. but i recently add more info by deleting div's and used the Mondays.js to Sundays.js info to display strings where div's where. But now it only shows info for monday and sunday. Here is link to test site: http://needablemerchandise.webs.com/...0main/test.htm Here's the HTML for my page. I've got two frames, one named "jojo" and one named "blah". Code: <frameset rows="1000,*" cols="*" frameborder="yes" border="1" framespacing="0" name="jojo"> <frame src="newsfront.html" scrolling="NO" name="jojo"> <frame src="music5.html" rows="1,*" name="blah"> </frameset> </frameset> And here's the java for a link I'm trying to make, a link that will change "blah" and "jojo" at the same time. For some reason, I can't get it to work. What am I doing wrong? Code: <HTML><B> <HEAD> <TITLE>FRAME 10</TITLE> <SCRIPT language="JavaScript"> <!--hide function change3() { parent.jojo.location="quiz/quizzo.html"; parent.blah.location="quiz/song.html"; } //--> </SCRIPT> </HEAD> <body> <BR><center><font size=99> <A HREF="javascript:change3()">Start</A></font> <body background=quiz/paper2.jpg></center> </body> </html> Thanky. 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> Yeah I prolly shouldnt do this with ads but im just wondering how to do it, when people click on the ad, using javascript, when they click it a message will prompt saying thanks for clicking the ad, Im not actualyl forcing them to click the ad just a little bit of gratitude Anyone know how to do this? http://www.zouklambada.com/eventsNew.asp This is the page I'm working on. Basically i need it to work in the following way. When you click on all the images at the moment, it is working fine (sort of)- each time you click, a layer comes up over the three small ones - BUT i need the small images to stay in position and these big images to go ontop (ie. you dont see the small images in that same row - they should not jump to the bottom. There will be more rows. When a big image is displayed in first row, the second row must slip underneath. Hope this makes sense! Please help! 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 all, I've been asked to develop a tool using HTML and JavaScript to target two numbers in a 19 digit combination. The numbers I need to target are in location 8 & 9 (#######89##########) and need to yield one of two responses dependant if the number is less than or equal to what has been entered. So if number less than or equal to 12 I figure I can use layers to hide and reveal the responses and using JavaScript or HTML to target and make the correct layer visible after the complete number has been entered I'm at a loss on how to do this and where to start with my code to make this possible. If anyone can shed some light on what this type of feature is called so I can research it or if you can help me with some code or advice I'd be grateful Thanks |