HTML - How Does It Work?
Hi there,
would you kindly help me please. I have have been puzzled lately about how exactly i would be able to protect some of my online material. I do realize that keeping things more server sided is the way to go. But what if its a login, where you have two sections of your site, one for members and the other public. My question is how would you be able to protect a page from being viewed if your not logged in. Meaning if someone knows the direct link to a member page, how would you stop them from viewing it if their not a member? (redirect them back to a homepage). how would this kind of thing work? Thanks a million btw new to the forums NetGD Similar TutorialsCan someone paste this into an .html file and help me with why this won't work in IE. It works in Chrome and FF. It seems like the onclick event in the two buttons doesn't fire. <!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> <title>Question 1</title> <style type="text/css"> body { background-color: #FFFFFF; font-family: Verdana, sans-serif; color: #000088; margin: 5px; } p.help_text { color: #ff0000; font-size:10px; } table.left { position:relative; right:3px; } input.right { position:relative; left:15px; } </style> <script type="text/javascript"> function Clear(form) { document.multiply_form.arg1.value = ""; document.multiply_form.arg2.value = ""; document.getElementById("answer").innerHTML = "?"; document.getElementById("help").innerHTML = ""; } function Multiply(arg1, arg2, form) { var answer = document.getElementById("answer"); alert("A"); document.getElementById("help").innerHTML = ""; if (validate_form() == true) { document.getElementById("answer").innerHTML = arg1 * arg2; } } function validate_form() { var fields = new Array(); fields[0] = document.multiply_form.arg1; fields[1] = document.multiply_form.arg2; for (i = 0; i < fields.length; i++) { if (fields[i].value.length == 0) { document.getElementById("help").innerHTML = "You must enter 2 arguments to multiply."; fields[i].focus(); return false; } else if (isNaN(fields[i].value)) { document.getElementById("help").innerHTML = "You can only multiply numbers."; fields[i].focus(); return false; } } return true; } </script> </head> <body> <form name="multiply_form" action="" onsubmit="multiply(arg1, arg2)"> Arg 1: <input type="text" name="arg1" value="" size="10"/><br/> Arg 2: <input type="text" name="arg2" value="" size="10"/><br/> <table class="left"> <tr> <td><div>Result: </div></td> <td><div id="answer">?</div></td> </tr> </table> <input class="right" type="button" value="Calculate" onclick="Multiply(this.form.arg1.value, this.form.arg2.value, this.form)"/> <input class="right" type="button" value="Clear" onclick="Clear(this.form)"/> <p id="help" class="help_text"></p> </form> </body> </html> Why on earth doe the cell "Card No." not go to row number 2 and it stays on the same line? I have added a <tr> and it STILL stays on same line. How is this possible? Code: <form id="cin" name="cin" method="post" action=""> <table><tr> <th>Your Name</th> <td><input type="text" name="your_name" /></td> <tr> <td></td> </tr> <th>Card No.</th> <td><input type="text" name="card_no" id="card_no" /></td> </form> Should this tag work ? <img src="file://users/aneuryzma/Desktop/Picture%201.png" name="replaceMe"/> i want to display an image on my local file system... thanks Hey, On my site, images are correctly placed in Firefox etc. but are in completely the wrong place in internet explorer. The site is he http://thekneelingzombie.com/ Anyone tell me the code I need to slip in to make it work in IE and FF? Thanks v. much Jim Site: http://therivals.summerhost.info Relevant Pages/Files: index.shtml nav.shtml style.css Problem(s): On the side navigation bar, hovering over the 'links' doesn't do anything (even though the stylesheet is supposed to change the background colour/font colour. Clicking also does nothing. I've run both homepage and stylesheet through the W3C Validator and the only errors it comes up with are to do with the ad my host automatically puts at the bottom of each page and CSS3. Interestingly, you cannot highlight anything on the page except that ad. If it's relevant, I've used SSIs to add the code for the navigation bar onto each page. I've tested the site in IE8, Firefox 3.6.19 and Chrome 8.0.552.224. It only works in IE (). It also works when opening the files offline in all the browsers and when using XAMPP. I have absolutely no idea what's gone and would appreciate any helpful input . Hi all, need ur help.. I make a web template in Fireworks and export it to HTML, then I open the file in Dreamweaver. Strangely, when I preview the file in IE, the link in it not work. But it works in Firefox. Anyone please give me advice many thanks mol Hi, I've been going through my codes over and over again but I juz figure out why it won't work this time round for the links. Normally, when I type the html reference inside the ahref, the notepad plus plus will show red but this time it doesn't. When I try to click on the link it won't work as well. Hope someone can tell me why. tks. [html code] <img src="singapore.jpg" alt="Skyscraper" width="700" height="300" hspace="5" name="Rotate"/> <table align ="left" width= 70%> <td width ="30%><a href="BuildGoodNcolor.html">Home</a></td> <td width ="30%><a href="=P-D.html">Projects</a></td> <td width ="30%><a href="PD.comenquiry.html">Enquiry</a></td> <td width ="35%><a href="P-D.html">Contact</a></td></table> [/html code] css : a:link { color: #336699; } a:visited { color: #660033; } a:hover { color: #000000; } below there is a piece of code with slideshow (I took it from http://www.ricocheting.com/code/java...mage-slideshow). I can see only the first picture, not the rest. Can someone help me? <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <meta content="text/html; charset=ISO-8859-1" http-equiv="content-type"> <title>try5</title> </head> <body> <script type="text/javascript"> // Author: ricocheting.com // Description: slideshow that allows visitors to flip through a series of images on your website var x=0; function rotate(num){ fs=document.ff.slide; x=num%fs.length; if(x<0) x=fs.length-1; document.images.show.src=fs.options[x].value; fs.selectedIndex=x;} function auto() { if(document.ff.fa.value == "Stop"){ rotate(++x);setTimeout("auto()", 5000);}} </script> <form name="ff"> <table style="border: 1px solid black; border-collapse: collapse;" cellpadding="3"> <tbody> <tr> <th align="center"></th> </tr> <tr> <td align="center"><img src="IMG0.JPG" name="show"> </td> </tr> <tr> <td style="border: 1px solid black;" align="center"> <select name="slide" onchange="rotate(this.selectedIndex);"> <option value="IMG0.JPG"></option> <option value="IMG1.JPG"></option> </select> </td> </tr> <tr> <td style="border: 1px solid black;" align="center"><input onclick="rotate(0);" value="ll<<" title="Jump to beginning" type="button"> <input onclick="rotate(x-1);" value="<<" title="Last Picture" type="button"><input name="fa" onclick="this.value=((this.value=='Stop')?'Start':'Stop');auto();" value="Stop" title="Autoplay" style="width: 75px;" type="button"> <input onclick="rotate(x+1);" value=">>" title="Next Picture" type="button"><input onclick="rotate(this.form.slide.length-1);" value=">>ll" title="Jump to end" type="button"> </td> </tr> </tbody> </table> </form> </body> </html> this issue has been solved So just draw on AP divs and maybe also a bit of tweaking, can you "get away" with this? Biggest problem i see is that IE and FF tend not to always format things exactly the same .... ALSO, if i want to line up say an input text box with a search button gif(25px x 24px) at the side of the input then this works in firefox, Note that this is an AP div. <div id="apDiv3"> <input type = "text" size = "26"/><img src = "images/search.gif" /> </div> #apDiv3 input{float:left;height:16px;padding:2px;} Gives this is FF, Whereas in IE there is a small gap between the right end of the input and the gif, and also the input field is smaller I have to say i don't really undertsand the css there, i got it form the web. Why is there a gap and why is it smaller? Ok. I'm brand new to html and website building. I'm doing pretty ok, but I can't understand why this link won't work: <td><a href="path03"><a target="_blank" ref="maps.htm">Maps</a></a></td> Any thoughts? Thanks. Hows it goin everybody.. I'm just starting to get involved in web design. I have a quick question. I have the template and have modified it to fit my needs. I understand it uses the images from the pack/bundle I D/L'd. I want to load it into geocities and I copied and pasted the code over , but it comes up with just blank with text and a grey screen. I loaded the images into my yahoo account but its not sourcing them. i believe they still have the path that was on my comp. What path would I use to load them off off a remote server (i.e. yahoo) ??? Thanks in advance. I'm sure this could of been worded more efficiently but I'm still very new to this. After the "marital status" and "sex" are selected, I want to assign a default value to the "Title" field. I think I am calling the function DefaultTitle incorrectly because I am not even seeing the initial alert box. Any suggestions? function DefaultTitle(strng,x) { alert("Checking Title."); var Sex=documet.PatientEntry.personal_sex.value; var MaritalStatus=strng; if (Sex=="Female" && MaritalStatus=="Married") {document.PatientEntry.personal_Title.value="Mrs."; HighlightWhite(x); Return; } if (Sex=="Male") {docment.PatientEntry.personal_Title.value="Mr."; HighlightWhite(x); Return; } if (Sex=="Female" && MaritalStatus=="Single") {document.PatientEntry.personal_Title.value="Miss"; HighlightWhite(x); Return; } if (Sex=="Female") {document.PatientEntry.personal_Title.value="Ms."; HighlightWhite(x); Return; } } Sex: <SELECT name="personal_sex" id="personal_sex" tabindex=7> <OPTION>Male</OPTION> <OPTION>Female</OPTION> </SELECT> Marital status: <SELECT name="personal_MaritalStatus" id="personal_MaritalStatus" onmouseout="DefaultTitle(this.value,this.id)" tabindex=8> <OPTION>Married</OPTION> <OPTION>Single</OPTION> <OPTION>Separated</OPTION> <OPTION>Divorced</OPTION> <OPTION>Widow(er)</OPTION> </SELECT> Title: <SELECT name=personal_Title tabindex=9> <OPTION>Mr.</OPTION> <OPTION>Mrs.</OPTION> <OPTION>Ms.</OPTION> <OPTION>Miss</OPTION> <OPTION>Dr.</OPTION> </SELECT><BR> Hi, Just a quick post here to ask for some help. My website (http://www.anewtake.com/ted) which I am making, works fine in Safari and Chrome. However, it does not work quite in Firefox: the top bar, where it says 'welcome' is placed too far over to the right. I'm not sure whether it works in IE7 or IE8, because it won't install on my computer! And I'm not bothered about IE6 because it's just old. So my question is; can anyone help me with getting this page to work in Firefox and validate? Thanks, Ted Does anyone know how to get a .html file with javascript to work in a .tpl file? I need to display variables on my thank you page from my opt-in page (using Aweber as my autoresponder). They say to display variables use <script>printElement("custom communication")</script> which is fine and displays correctly but I need to include that within a IF/Else statement so I can display a different message based on the variable. Here is my If/Else which does not work - I assume because the extra <script> <script type="text/javascript"> var d = new Date() var time = <script>printElement("custom communication")</script> if (time=='Satisfied') { document.write("<b>Good morning</b>"); } else if (time=='Dissatisfied') { document.write("<b>Good day</b>"); } else { document.write("<b>Hello World!</b>"); } </script> Any help on how I can solve this would be great!!! I've had a simple php counter on a web page for years. Now I change the webpage and put the counter html on it just like before and this time it doesn't work! Could this be something to do with the new page being xhtml instead of html? Or because this time there's already a 'javascript' section whereas before there wasn't? Or what? The page is at http://greenpepper.org if anyone would care to look. the html line is right at the bottom of the page, just before </body> and the line itself is: <script language="Javascript" src="counter.php"><!--//--></script> The php counter code is very simple, too, it is: <? $filename = "count.txt"; $fp=fopen("$filename","r"); $count=fread($fp, filesize("$filename")); fclose($fp); $count++; $fp=fopen("$filename","w+"); fwrite($fp,$count); fclose($fp); // Use this line below if you like to use this counter to count hits in a PHP file. //echo "This page has been visited $count times."; // Use this line if you like to use this counter to count hits in a HTML file. You also need to add a code in your HTML file. See the guide for details. echo "document.write('$count');"; ?> The text file is still there in the directory, I checked everything by running the old file again and it runs the counter okay. Nevermind. This post can be deleted. |