HTML - Functions In Html As In C Programming
Is it possible to have user-defined functions in an HTML code that you can call whenever needed (like in C language)?
I am developing a website and it has many pages. All pages have common features like banner image, footer etc. For example, I want to change a common feature, what I am currently doing is go do each page and make the correction. Is there any way that I can make the change in one place and let all other pages change by itself? For example, is it possible strip out of a section of code, save it another file and call it from all pages? I know this can be done when using javascript by making a new .js file and calling it. Is it possible in HTML? Say export a table (the code) to another file and call it from different pages? Any suggestions would be much appreciated. Similar TutorialsCan you guys tell me what you consider to be the best best visual HTML programming application(s)? I'm talking about a program that has a GUI (graphical user interface), something similar to MS Word, which you could use to design a web page layout, and when you finish the program will spit out your layout in HTML code. Thanks, any help and advice is appreciated so I am building a website, and I decided to test out a code before doing any major programming. Of course, it didn't work. I basically need a square covered in thumbnails of images, but then when the mouse is moved over a thumbnail the full-size image will show in that square (overtop of the thumbnails) until the mouse is moved off of the thumb. right now, however, it will not work on mouseover, but needs to be clicked on and only shows while the mouse button is held. I am relatively new to DIV codes other than their use for alignment, but I think it might have something to do with layering? I got the code from he http://www.technorealm.co.uk/scripts...rshowtext.html and altered it to include my content, but as I was looking through the code I noticed there was no z-index within the DIV tag. Also, I know quite a bit about HTML but not very much about CSS, JavaScript, etc. Below is the code for the entire page, which you can view at this address: http://www.freewebs.com/tintedlens/ Any help would be appreciated! Thanks! <html> <head> <title>Photos.</title> <script language="Javascript"> <!-- function toggleDiv(id,flagit) { if (flagit=="1"){ if (document.layers) document.layers[''+id+''].visibility = "show" else if (document.all) document.all[''+id+''].style.visibility = "visible" else if (document.getElementById) document.getElementById(''+id+'').style.visibility = "visible" } else if (flagit=="0"){ if (document.layers) document.layers[''+id+''].visibility = "hide" else if (document.all) document.all[''+id+''].style.visibility = "hidden" else if (document.getElementById) document.getElementById(''+id+'').style.visibility = "hidden" } } //--> </script> <style type="text/css">#div1, #div2, #div3 {position:absolute; top: 91; right: 91; visibility:hidden}</style> </head> <body bgcolor="FFFFFF"> <div id="link1" style="position: absolute; top: 100; right: 100;"> <a href="#" onMouseOver="toggleDiv('div1',1)" onMouseOut="toggleDiv('div1',0)"><img border="0" src="link1.jpg"/></a> </div> <div id="link2" style="position: absolute; top: 190; right: 100;"> <a href="#" onMouseOver="toggleDiv('div2',1)" onMouseOut="toggleDiv('div2',0)"><img border="0" src="link2.jpg"/></a> </div> <div id="link3" style="position: absolute; top: 280; right: 100;"> <a href="#" onMouseOver="toggleDiv('div3',1)" onMouseOut="toggleDiv('div3',0)"><img border="0" src="link3.jpg"/></a> </div> <div id="div1"><img border="0" src="image1.jpg"/></div> <div id="div2"><img border="0" src="image2.jpg"/></div> <div id="div3"><img border="0" src="image3.jpg"/></div> </body> </html> 2 Quick questions: 1) Is it considered good, poor, or indifferent programming style to implicitly connect labels with other form tags. For instance, is one of these preferable to the other? Code: <label for="username">Username</label> <input type="text" name="username" id="username" /> <label>Username: <input type="text" name="username" id="username" /></label> 2) Is it good or bad programming style to have the name and id of a tag the same? For instance, in the example above, the input object has an id and name of "username". Is this considered ok? Tahnks for all the help~ Hello I am a Professional Website Programmer/Cloning I am Currently Available to Work on Any website Cloning and Programming PM Me For for My Portfolio And I can Get Started ASAP Also we will discuss rates in Pm. Web Design Company is a site previously built in using only html and javascript.Now it wants to switch to J2EE or php.What is the best choice for it,can any one help? web design Ok, here's the problem. I have 2 onload functions. One is directly inside the body tag but the other is in a seperate script. Obviously I'm posting because I have a problem, they don't work together. I know that there's a workaround using javascript but I couldn't seem to implement it. Can someone specifically tell me what the script is, where to put it, etc (as specified as possible) I have a Search text box and box on every page on a website. How do I get the user the results from the search after they enter a search term in and hit the Search button? Any help is greatly appreciated. Hey all. I'm having issues trying to run 2 functions at the same time in onload. <BODY OnLoad="function({ReadRSS('http://rss.news.yahoo.com/rss/science','rssBodyTemplate','rssTitleTemplate'),JSFX_StartEffects()"> I can't seem to get these to work no matter what I do. if I do them individually as in get rid of the other one and just OnLoad one of them, it works great. What's the proper way to run both of these in OnLoad? ...to force me to learn how to work with html I am a relative newbie at this but really enjoy it (does that make me a sickie??) Am I asking for trouble? By blog functions I mean that I am trying to design a webpage that looks like a blog and does has all of the same functions available - rss feeds, archives, calendar, etc. I would appreciate your input before I get too far. Actually what started me down this road is that I wanted to have 6 articles on my blog page and none of the setups I checked into would allow so many. Hi there, what should I do to get validated the following error? I have to validate it with XHTML 1.0 Strict. Please someone help me, thanks so much. Code: Line 39, Column 32: character "&" is the first character of a delimiter but occurred as data . onsubmit="return validateForm() & & validateMessage();"> This message may appear in several cases: * You tried to include the "<" character in your page: you should escape it as "<" * You used an unescaped ampersand "&": this may be valid in some contexts, but it is recommended to use "&", which is always safe. * Another possibility is that you forgot to close quotes in a previous tag. My html problem keeps failling, with all my image codes.. shown for 10 errors which are all for the images what's wrong? Here is the 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" /> <!-- New Perspectives on HTML and XHTML 5th Edition Tutorial 2 Case 2 Fiddler Home Page Author: Date: 2-16-2011 Filename: home.htm Supporting files: fiddler.jpg --> <title>, ITSE 1411 Lab Project 2, Tutorial 2 Case 2, Due 02/23/2011</title> </head> <body> <div> <img src="fiddler.jpg" alt="Fiddler on the Roof" /> <hr /> <a href="home2.htm"><img src="home.jpg" alt="home" /></a> <a href="slide1txt.htm"<img src="start.jpg" alt="start" /></a> <a href="slide1txt.htm"<img src="back.jpg" alt="back" /></a> <a href="slide2txt.htm"<img src="forward.jpg" alt="forward" /></a> <a href="slide6txt.htm"<img src="end.jpg" alt="end" /></a> <br /> <a href="slide1txt.htm"<img src="thumb1.jpg" alt="slide1" style="border-width: 5" /></a> <a href="slide2txt.htm"<img src="thumb2.jpg" alt="slide2" style="border-width: 0" /></a> <a href="slide3txt.htm"<img src="thumb3.jpg" alt="slide3" style="border-width: 0" /></a> <a href="slide4txt.htm"<img src="thumb4.jpg" alt="slide4" style="border-width: 0" /></a> <a href="slide5txt.htm"<img src="thumb5.jpg" alt="slide5" style="border-width: 0" /></a> <a href="slide6txt.htm"<img src="thumb6.jpg" alt="slide6" style="border-width: 0" /></a> </div> <hr /> <div> <img src="slide1.jpg" alt="slide1" /> </div> <blockquote> <p><i>Do You Love Me?</i> sung by Deb Ingalls and Thomas Gates</p> </blockquote> </body> </html> I just upgraded all my .HTML pages to .PHP . But now I noticed that when my pages pull up in the search engines like Google, Yahoo, and MSN. They still show the old .HTML links?? When they click on the webpages from the search engines results you get error 404 page cannot be found. How can I update the search engines or add code to my page so the search engines will reflect the new .PHP pages. Also it's been over a good week since I've update to .PHP Thank you all in advanced!! Hi, so I'm trying to make this e-mail newsletter. It's entirely images, tables and text. So no javascript, just plain stuff. I tried attaching it as a signiture file and I had trouble sending it. It also didn't come out right. I'm trying to avoid using a software. Its basically just a block of HTML I need to show up as the only content in an email. If you just put HTML into a email text field, it just shows the HTML code in the email as text. Any ideas? As the title states I've been using Microsoft Word 2000 to create my web page but now want to make a simple no frills html HTML document. Is there a simple and quick way to do it ? I know I can simply create a new HTML document and then just copy and paste the links but is there a utility that can do this ? Many thanks Hi everyone, I've been searching around the web trying to find out how I can send using Outlook a html and text email newsletter automatically. I am quite happy creating html only newsletters, and text ones for that matter, but I have been digging and believe that by using multi-part code I can send to both and the recipients email client "allows" whichever version to be displayed - does this sound right? I'm hoping to simply create the html with the relevent mime references and boundaries (dont know what they are but have seen them on enough Google'd pages to know that they mean something!) and then copy and paste into Outlook - the newsletter is only going out to a few people at a time. Any suggestions or advice would be very greatly appreciated. Regards Allan i just started working on addicted2ally.com, and for some reason, my index.html is showing the text of the html instead of well, doing it lol helppp!? I am still new to the web page world, but the website I originally created (in japanese) was passed on to a programmer. He did a lot of "upgrades" to the site so he says, but he left. Now I am in charge again of re-modeling the site. The problem is I am trying to figure out why there are so many dead links. I have looked up and down the server, but can't find anything. Ok before I confuse anyone else here is what I am talking about. For example this page that I originally made : Code: http://www.discoveryfirm.com/tokushu/index.html cannot be found but if I take of the end: http://www.discoveryfirm.com/tokushu/ the page is there. Now I am trying to fix a lot of dead links, but I cannot figure out what the programmer did to the site. I am still new to all the high-tech features in the web world. Could somebody please explain. Hello Everyone, Please help in build the code for the site , the layout should be as the below layout , I need to submit this by today EOD. Image Link1: http://8648180184665331224-a-1802744...attredirects=0 Image Link 2: http://8648180184665331224-a-1802744...attredirects=0 Please mail me the code ASAP. Thanks and Regards, ceenuu2002@gmail.com hello i have a page 'gallery.html' that i want to show up when the URL www.site.com/gallery is requested. how do i achieve this? thanks in advance rlbw I need a simple example to take input, and give an output, such as input: height weight output: body BMI thanks |