HTML - Onchange="if(options[selectedindex].value) ...works Great, But...
Similar TutorialsHi, I have a problem with validating Strict XHTML 1.0 ... The tag: "option" doesn't have an attribute: "onchange" in currently active versions.[XHTML 1.0 Strict]... Is there a way around this? Here's the code:. <select name="birth_month" onchange="form_d('yes');" size="1" style="width:8em"> <option<?php echo empty($a_birth_month)?' selected="selected"':''?> value="" onchange="form_d('yes');" >Month</option> Thanks Only another million pages to go. This is for a myspace layout (yes i know those are dreaded words to any web developer) . As the title says it works fine on firefox but hangs up severely on IE This is the only block of code i've added. If anyone can help i would appreciate it greatly! <style type="text/css">body{background-image:url("http://i4.photobucket.com/albums/y146/RyanVessell/myspacebg-1.jpg"); padding-top: 625px; background-attachment:fixed; background-repeat:repeat; background-position: center; }table, tr, td {background-color:transparent; border: 0px; padding:2; }</style> <style type="text/css"> table table tbody tr td { background-image:url(http://i209.photobucket.com/albums/b.../tablebg.png); background-position:top left; background-repeat:repeat; padding: 2px; } </style> <style type="text/css"> td, a, body, table,p {font-family:Verdana; font-size:10pt; color:4f4f4f;} .blacktext10{color:b30000;} .blacktext12{color:b30000} .btext{color:white} .lightbluetext8{color:6f6f6f} .nametext{color:b5b5b5} table tr td font strong { color: ffffff; } .orangetext15{color:890303} .redbtext{color:silver;} .redbtext12{color:b30000;} .redtext{color:b30000;} .redtext8{color:white;} .text{color:890303;} .whitetext12{color:620202;} .redlink{color:890303;} .headlinetext{color:ffffff;} a:link{color:ffffff} a:hover{color:b80000} a.navbar{color:b30000;} a.navbar:link{color:7b7b7b} a.navbar:hover{color:620202} a.redlink:link{color:7b7b7b} a.redlink:hover{color:620202} a.searchlinksmall{color:FF4500} a.searchlinksmall:link{color:ADD8E6} a.searchlinksmall:hover{colorAA520} </style> <style type="text/css"> .contactTable { width:300px !important; height:150px !important; padding:0px !important; background-image: url(http://www.corvuscreative.net/images/contacttable.jpg); background-attachment:scroll; background-position:center center; background-repeat:no-repeat; background-color:transparent;} .contactTable table, table.contactTable td { padding:0px !important; border:0px; background-color:transparent; background-image:none;} .contactTable a img {visibility:hidden; border:0px !important;} .contactTable a {display:block; height:28px; width:115px;} .contactTable .text {font-size:1px !important;} .contactTable .text, .contactTable a, .contactTable img {filter:none !important;} </style> Hi Folks, I've got my form dynamically generating text fields (which are contained in a form which is in another) and other objects and now I want to give them the "onchange" attribute. I have a lot of code so I'll keep it as small as possible. Here is the function that generates text fields function createText( inputForm, txtName, txtValue, txtWidth ) { var newTxt = document.createElement( "INPUT" ); inputForm.appendChild( newTxt ); newTxt.name = txtName; newTxt.setAttribute( "STYLE", "position:relative; left:20px; width:" + txtWidth + "px;"); newTxt.type = "TEXT"; newTxt.value = txtValue; newTxt.id = txtName; newTxt.onchange = "some_function( this.value )"; return newTxt; } The function for responsible for creating the form is: function createNewForm() { // Main form is a global reference to the main body mainForm = document.getElementById( "adminForm" ); var profileForm = document.createElement( "FORM" ); mainForm.appendChild( profileForm ); profileForm.method = "POST"; profileForm.name = "Profile"; profileForm.id = "ProfileForm"; return profileForm; } This function calls the profile creation form and specifies the objects that will appear on the form. function profileForm() { // Delete and reassign current form if( currentForm != "") deleteForm( currentForm ); currentForm = "ProfileForm"; var newProForm = createNewMenuForm(); newProForm ( menuForm, "Item1", "data1", 140 ); newProForm ( menuForm, "Item2", "data2", 140 ); newProForm ( menuForm, "Item3", "data3i", 140); return newProForm; } I've seen examples of objects being created by JavaScript and they work just fine. Anyone have any suggestions or have an idea where I can find some more info? Thanks! Hi there, Using fireFox I get the desired result, but when using IE I get the image on the *left* side?! this is my code (the header is a jsp page that has an image and user's info name and last logged in)) <td width="90%" valign="top" align="right"> <tiles:insert attribute='header'/> </td> as you can see the image (header) is align to the right, but IE pushes it to the left (I wrote center - and it still keeps on pushing it to the left) any idea why?? Hi all, In need of some advice if possible! Myself and a friend are putting together a website, we have little knowledge and I've came across a layout issue. The site looks good in Firefox but within IE the formatting is lost in one small section see below; I need the 'read more' box to be in the same location as the Firefox one when viewed IE. The page can be viewed here http://www.jeffkingsland.com/test3/aboutme2.html Any constructive advice is really appreciated. I'm aware of typos and colouring issues http://www.colletts.co.uk/winter_dolomites.htm I have the above page that redirects users to my Winter Website - the HTML below isn't valid W3C does anyone know of a better and valid way to get this done? Cheers, Mas HTML Code: <META HTTP-EQUIV="Refresh" CONTENT="2.5;URL=http://www.colletts.co.uk/winter/winter_dolomites.html" /> A customer gave me a Word doc that they want turned into a printer friendly web page. I understand that there are tons of ways to do this but I really want the answer to the subject. What i'm referring to is a form that someone can print from the browser and "fill in the blanks" on the page where there are "underscores". My question is how to code those underscores. I tried manipulating the <hr> tag but it's putting way too much space in between each <hr>. I've already coded a "fill in the blank" line using <u> nbsp;</u> but that looks very messy. What do you guys/gals think? I was hoping someone could clue me in as to whether or not this would be possible. I'm thinking it isn't but I need to make sure. I'd like to provide a file for people to download on my website, but when they click on the link and the download window appears I don't want them to have the option of opening it. Is it possible to only give them the option to save the file? Sounds incredibly unlikely but I gotta know. Hello, I want to load a page in a iframe, and when i do this, i want that page to be displayed not at the begining of that page, i want that page to be displayed at a "x" and "y" position specificated by me. How can i do that? Thank you. hi, i am working on <div> i have to hide some part of the table. I am not able to hide that table part can anybady tell me where is the error. Code: <html> <head> <script type="text/javascript"> function callme(){ document.getElementById("hid").style.visibility="visible"; } function hideme(){ document.getElementById("hid").style.visibility="hidden"; } </script> </head> <body> <form name="myform"> <table width="100%" border="4" cellpadding="2" cellspacing="2"> <tr> <td class="tableheader" colspan="9">TS </td> </tr> <div style="visibility:hidden" id="hid"> <tr> <td width="17%" class="labeltext">Tran Code</td> <td width="1%" class="blanktext">:</td> <td colspan="4" class="blanktext">Name</td> </tr> <tr> <td width="17%" class="labeltext">Product Type</td> <td width="1%" class="blanktext">:</td> <td colspan="4" class="blanktext"> </td> </tr> </div> <tr> <td> </td> </tr> </table> <input type="button" onclick="callme()" value="show"> <input type="button" onclick="hideme()" value="hide"> </form> </body> </html> thx in Adv, Hanm. Hi there, im trying to set up a new website to increase some sales and I am working with dreamweaver, a good friend of mine (also a small business owner) has given me access to his file directory and allowed me to use his templates and files from his webpage. I have changed all the pictures and the text to what i need and loaded it into my file directory and it looks wonderful in Internet explorer but in firefox (which is 25% of my traffic) it looks horrible, the boxes are all in the wrong places?? But when i go to his website it looks fine in both IE and firefox? I was wondering if anyone out there knew what what cause this? the site is alarmsecurityaz.com Very good forum,and is useful to my business,hope learn more from everyone here! Thanks Thanks to everyone and that includes the owner(s) of this website I'm a newbie at coding, learned a lot of stuff here have a nice day Hey, I'm trying to write some code for expanding and concealing text You can see this in action at youtube when you click the (more) button to expand text. Suppose I had a heading: MyHeading and a body of text: MyTextHere How do I make it so that when you click MyHeading it makes MyTextHere (initially not visible) appear, and when you click MyHeading again, it makes MyTextHere disappear? Thanks Alot. Hi all, I am currently working on a website using Dreamweaver CS3. Whenever I view the (currently very basic) site in Firefox I get the line of code I entered as the title of this thread at the top of the page (directly above the banner) as if I had just typed it into the canvas area (correct term?). Whenever I view it in IE it appears just fine, not sure about other browsers though. I began by creating a template and adding it to the page you see he HTML Code: http://www.geocities.com/makotronic/indexx.htm Here is the code for the template: Code: <%@LANGUAGE="JAVASCRIPT" CODEPAGE="65001"%> <!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" /> <!-- TemplateBeginEditable name="doctitle" --> <title>Template for Parish Website</title> <!-- TemplateEndEditable --> <!-- TemplateBeginEditable name="head" --> <!-- TemplateEndEditable --> <style type="text/css"> <!-- body { margin-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; } body,td,th { font-family: Arial Narrow, Verdana, Arial, sans-serif; } .style5 {font-size: 14px} --> </style></head> <body> <table width="750" border="0" cellspacing="0" cellpadding="0"> <tr> <td colspan="2"><img src="../Images/welcomebanner.gif" width="750" height="125" /></td> </tr> <tr> <td width="160"><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td> </td> </tr> <tr> <td> </td> </tr> <tr> <td> </td> </tr> <tr> <td> </td> </tr> <tr> <td> </td> </tr> <tr> <td> </td> </tr> <tr> <td> </td> </tr> </table></td> <td width="590" align="left" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td> </td> </tr> <tr> <td valign="top"><!-- TemplateBeginEditable name="Main Body" -->Main Body<!-- TemplateEndEditable --></td> </tr> </table></td> </tr> </table> </body> </html> And for indexx.htm (I added a second 'x' because I already had a 'index.htm' file in GeoCities): Code: <%@LANGUAGE="JAVASCRIPT" CODEPAGE="65001"%> <!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"><!-- InstanceBegin template="/Templates/template.dwt.asp" codeOutsideHTMLIsLocked="false" --> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <!-- InstanceBeginEditable name="doctitle" --> <title>Welcome to the Greencastle Parish Website</title> <!-- InstanceEndEditable --> <!-- InstanceBeginEditable name="head" --> <style type="text/css"> <!-- .style8 { font-size: 36px; font-weight: bold; } --> </style> <!-- InstanceEndEditable --> <style type="text/css"> <!-- body { margin-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; } body,td,th { font-family: Arial Narrow, Verdana, Arial, sans-serif; } .style5 {font-size: 14px} --> </style></head> <body> <table width="750" border="0" cellspacing="0" cellpadding="0"> <tr> <td colspan="2"><img src="Images/welcomebanner.gif" width="750" height="125" /></td> </tr> <tr> <td width="160"><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td> </td> </tr> <tr> <td> </td> </tr> <tr> <td> </td> </tr> <tr> <td> </td> </tr> <tr> <td> </td> </tr> <tr> <td> </td> </tr> <tr> <td> </td> </tr> </table></td> <td width="590" align="left" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td> </td> </tr> <tr> <td><!-- InstanceBeginEditable name="Main Body" --> <span class="style8">Header</span> <p class="style3">Main Body</p> <!-- InstanceEndEditable --></td> </tr> </table></td> </tr> </table> </body> <!-- InstanceEnd --></html> Cheers for any help! Niall Rather than write them out i took a screenshot. So how do i get past those? REally, I don't have that much time to be an expert at HTML or CSS - but was wondering what CMS' are quick to learn that has a lot of templates. I know WordPress is one - just wondering if there are anymore...I'm sure there is. Hi there, I have come across a great piece of code work. See the 'Feedback' option at the bottom of this page: http://www.adobe.com/products/ I would so like to incorporate the same on my website. Would greatly appreciate assistance with code. Best, wirefree I'm fairly sure that this is a quite a common thread, yet on doing a quick search of the forums couldn't find anything that matched my exact needs. So..... My site looks great in FF but not in IE and i need some help. http://tp.eyeoftime.co.uk/index.php (there is no php in the file yet, despite the extension) Ok, thats my site, as you can see there are problems with tables and images here. The site as viewed in firefox, is what i want the site to look like, the site as viewed in IE is how IE thinks i want the site to look like .Although i'm not a beginner with html, I am rather new at trying to get real cross-browser compatability. So, yeah, any help much appreciated. PS i know the page contains xhtml errors (fails validation), its still a work in progress. Hi There again, I didn't think I would be posting again so soon, however I have decided to play around with building a site for my personal company which does not even exist yet. I just downloaded a free version of Page Breeze which I am sure most of you have heard of and was wonering if it is any good from a "professional" stand point. Being a "newbie" or "rookie' myself and have only played around a little bit on it, it seems very user freindly. Is there anything out there in a "free" version that is better or is there a fairly inexpensive HTML editor out there that is GREAT? Any help or suggestions would be greatly appreciated. Thanks |