HTML - Xhtml Or Javascript?
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 Similar TutorialsI have been creating a website with Javascript. When the user rolls over an image button, the button will glow and when the user presses on the button it will change to and image of the button being pressed. This program has been working with at least 6 buttons but the current button i'm working on stops doing what the previous buttons did and I would like to know why. I copied the codes exactly the same as the previous buttons, changed the image picture and provided the correct links to each image but somehow it just stops working. Thank you for your help (: -=Example of the codes=- Button 1: <a href="'test2.htm" onMouseDown="pressButton('chatBtn');return true;" onMouseOver="overButton('chatBtn');return true;" onMouseOut="releaseButton('chatBtn');return true;"><img name=chatBtn src="images/chat.png" border="0" alt="Chat" /></a> Button 2: <a href='test.htm' onMouseDown="pressButton('backBtn');return true;" onMouseUp="overButton('backBtn');return true;" onMouseOut="releaseButton('backBtn');return true;"><img name=backBtn src="images/back.png" border="0" alt="Back" /></a> Javascript code: // Preloading Images if (document.images) { chatBtn_up = new Image(); chatBtn_up.src="images/chat.png"; chatBtn_down= new Image(); chatBtn_down.src="images/chatPress.png"; chatBtn_hover = new Image(); chatBtn_hover.src="images/chatHover.png"; backBtn_up = new Image(); backBtn_up.src="images/back.png"; backBtn_down= new Image(); backBtn_down.src="images/backPress.png"; backBtn_hover = new Image(); backBtn_hover.src="images/backHover.png"; } // Event Handlers for button function pressButton(btName) { if (document.images) eval('document.'+btName+'.src='+btName+'_down.src'); } function releaseButton(btName) { if(document.images) eval('document.'+btName+'.src='+btName+'_up.src'); } function overButton(btName) { if (document.images) eval('document.'+btName+'.src='+btName+'_hover.src'); } Ok, so, I have a copy of Macromedia Fireworks. I used it to create a rollover navigation bar for my site (see link at the end of this post). Fireworks exports the file as HTML, and not XHTML, so the JavaScript in the code doesn't validate. The W3C Validator has found 4 problems (there was around 70,but i fixed those all up, because they were just img tag issues): If anyone knows JavaScript and can fix these (or at least help me fix them), please post! Link to the page in question: http://ericsartor.freehostia.com/new-template/ Just view the source to see what I'm talking about. Hi. My entire site is 100% XHTML1.1. Except for some new code I added which causes errors in validation. the code is HTML Code: <a href="http://babelfish.altavista.com/babelfish/" onclick="window.open('http://babelfish.altavista.com/babelfish/trurl_pagecontent?lp=en_it&url='+encodeURIComponent(location.href));return false;" title="Translate to Italian"><img title="Italian" src="http://geekimo.com/licons/it.png" alt="Italian" /></a> I understand maybe CDATA islands can help with this? or making it external? but I have no idea how to do that with it having html code in there too.. I don't know if you can surround it in CDATA tags. There are other lines of code too, exactly the same except have different languages. Any help would be awesome! Which one is better? XHTML STRICT 1.0 or XHTML 1.1 Please anybody tell me about the XHTML. so xhtml elements should always be in lowercase how does this extend to the case in css. for example if im using a xhtml doctype should i be using lower case color values like color:#ffffff vs color:#FFFFFF. I know as per a hexidecimal value "ffffff" is the same as "FFFFFF" and the same as "fFfFfF". they are all equal to the same value so it really doesn't matter but does the xhtml doctype dictate that these values should be in lowercase? I am reading about XHTML now and noticed that it is really no different than HTML. The only difference(s) are, correct me if I'm wrong, that XHTML is more strict with the rules. Lowered-cased letters, properly closed tags, etc, all that mumbo jumbo. If I'm already doing that with HTML, must I need to worry about XHTML? hi and goodafternoon i run wapsites and i want to convert the wml scripts to xhtml all my scripts are php based which i know will work in xhtml too. i also use mysql coding for database side of things . here is one of my smaller scripts . <?php <wml> <card title="sitename"> <p align="center"> <img src="logo.gif" alt="logo"/><br/> Welcome!!<br/><br/><a href="login.php"><img src="login.gif" alt="Login"/></a><br/><a href="terms.php"><img src="register.gif" alt="Register"/></a><br/> <br/> <big><b><a href="terms.php">Terms of use!</a></b></big> <br/> You are here with<br/> END; print 'Browser:'; $browser = explode ('/', $HTTP_USER_AGENT); print $browser[0]; print '<br/>'; print "IP-Adress: $REMOTE_ADDR<br/>\n"; print <<<END ---<br/> </p> </card> </wml> END; ?> how would i convert that to xhtml . and if its just a case of changing the tags then would it work on the rest of the scripts with sql coding in too . nclemale@hotmail.com or post your replies here thanks in advance Hi. I *hate* I.E. I'm usually browsing websites in Google Chrome - & sometimes Mozilla / Opera. Ive designed a website (not public as yet), & it does validate for XHTML - it looks perfect on Opera / Mozilla & Chrome. But IE messes it up. Basically it uses Divs, & has a left menu, & the main content is a Google map. Also, top menu / banner & a footer at the bottom.. on IE7, the google map is UNDER the list of cities etc (left menu), instead of in the middle / right of the left menu.. Can anyone advise a website listing common IE problems & how web designers can fix it.. what is xhtml? can make dynamic website in xhtml I'm pretty new to XHTML and I see that to properly close a br tag (and others), you usually put a space, then a slash, then a closing chevron, a la <br />. But I was wondering if there is anything fundamentally wrong with eliminating the space before the slash. It seems to work in my browser either way, and I think it makes the code a little easier to read and type. Thanks! What is the difference between HTML and XHTML? What are the benefits and is it worth learning? Thanx 4 the help! Tell me..... hello friends , I want to know that what is what is XHTML ? plz anybody help me . I want to know about this . Thankx ==== I get this error with this code: Attribute "allowtransparency" must be declared for element type "iframe". Code is: <iframe src="http://www.facebook.com/plugins/like.php?href=http://www.vibrantscent.com/" scrolling="no" frameborder="0" style="height: 62px; width:100%" allowtransparency="true"></iframe> Question does anyone know what the correct code would be? Thanks Hi there i would like to create a 3D list of website links, like whats in the middle of this page: http://www.tamberlow.com/ Is this possible using HTML/XHTML/JavaScript If yes, please could some1 point me in the right direction on how to go about this Thanks, jackie xxx I'm not sure but I think I want to try to migrate to XHTML 2.0. Does anyone know of any analytical tools that look at your existing HTML code and tell you what is not compliant with that standard, making specific recommendations on how to make it compliant? Given how much content I have to update, doing this by hand is out of the question. I need to write a program to parse my files and generate new copies for me. ........................ Hello, I am coming back after a long time without doing xhtml, but i have a question, I want one page to pretty much be a page where the user browses for the jpg file or bmp file and uploads it with the text box information they have below, i have 3 text boxes which will have their name, last name and description, after they click submit, i want it to be able get the image, with the text box information and post it on another web page, stupid question but, can this be done in xhtml? if so, i got the page already done with the 3 text boxes and the browse button to find jpg and bmp, but the rest such as getting that info and posting it on another webpage is a different story, how would I accomplish that? Also, on the browse feature, how do i tell it to find only jpg and bmp and not other file extensions? thanks again Ok i have this one error and ive deleted the entire line but it repeats the same error again because the link below it has the same error aswel.. Not sure what the error is.. Any ideas please? CLICK HERE TO SEE THE XHTML VALIDATION ERROR Ive pasted the error below aswel.. # Error Line 61 column 96: there is no attribute "target". ...l_2_briefs/IND382_brief.html" target="_blank">IND382</a><br /> You have used the attribute named above in your document, but the document type you are using does not support that attribute for this element. This error is often caused by incorrect use of the "Strict" document type with a document that uses frames (e.g. you must use the "Transitional" document type to get the "target" attribute), or by using vendor proprietary extensions such as "marginheight" (this is usually fixed by using CSS to achieve the desired effect instead). This error may also result if the element itself is not supported in the document type you are using, as an undefined element will have no supported attributes; in this case, see the element-undefined error message for further information. How to fix: check the spelling and case of the element and attribute, (Remember XHTML is all lower-case) and/or check that they are both allowed in the chosen document type, and/or use CSS instead of this attribute. If you received this error when using the <embed> element to incorporate flash media in a Web page, see the FAQ item on valid flash. |