- Strength to Increase Rep
- +8
- Strength to Decrease Rep
- -2
- Upvotes Received
- 48
- Posts with Upvotes
- 47
- Upvoting Members
- 30
- Downvotes Received
- 4
- Posts with Downvotes
- 4
- Downvoting Members
- 3
270 Posted Topics
Re: [QUOTE]This code to disable ctrl (control)[/QUOTE] The bad news is that your code is not cross-browser compatible. Even in IE, it doesn't prevent copying with other keystrokes or with the mouse. It also doesn't deal with <iframe>s [and possibly <frame>s as well, but I didn't bother to test]. The good … | |
Re: Please give some examples of what the user is prompted to type and what you expect to happen (when it is valid and when it is not). | |
Re: [QUOTE]javascript did not like the fact that I was using numbers[/QUOTE] Here is a test [CODE]<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"> <html> <head> <meta name="generator" content= "HTML Tidy for Windows (vers 25 March 2009), see www.w3.org"> <script> var count = 0; for (var item = 0; item < 20; item++) … ![]() | |
Re: [QUOTE] no javascript in any browser (error shown in IE8) [/QUOTE] Save this [CODE]<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN"> <html> <head> <meta name="generator" content= "HTML Tidy for Windows (vers 25 March 2009), see www.w3.org"> <script type="text/javascript"> alert('hello') </script> <title></title> </head> <body> </body> </html> [/CODE]to your desktop as an .html file … | |
Re: [QUOTE=samaru;1126022]The way it would work would be JavaScript creates an XmlHttpRequest object which fires off GET/POST method [/QUOTE] In principle XMLHttpRequest supports PUT (which be used upload a .txt file). | |
Re: Here is one example. [CODE]<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta name="generator" content= "HTML Tidy for Windows (vers 25 March 2009), see www.w3.org"> <title></title> </head> <body> <form name="myform" id="myform" action="html_form_action.asp" method="get"> First name: <input type="text" name="FirstName" value="Mickey"><br> Last name: <input type="text" name="LastName" value="Mouse"><br> </form> <button onclick="myform.submit();" value="Submit">SUBMIT</button> … | |
Re: [QUOTE]docuemnt.getElementbyId("<divid>").style.visibility:"visible" or "hidden" [/QUOTE] That code has obviously not been tested. The keyword [ICODE]document[/ICODE] is misspelled. | |
Re: The described behavior in IE8 isn't seen here with the code provided (although I may not have stumbled on the <input> that causes the problem. What DOCTYPE are you using? | |
Re: It isn't your code. A very detailed test program fails here in a similar way. I can get the w3schools hint in Safari (PC) and IE8, I can't get it in Chrome, Firefox or Opera. I strongly suspect that the problem is cross-domain blocking (which conforming user agents are supposed … | |
Re: [QUOTE]good JavaScript project for beginners?[/QUOTE] A display clock. When you tire of changing formats/styles/animation/timezones/etc. move on to a simple [unix-style] calendar: mmm yyyy d d d d d d d 1 2 3 4 5 6 7 8 9 etc Basic as they are, these will acquaint you with quite a range of language features (both good and bad) and a fair number of … | |
Re: Using a "strict" DTD effectively 'blocks' attributes and elements that are being phased out. Instead of removing the DTD completely, using an appropriate "transitional" one would also have solved the problem. | |
Re: Are the cells in columns 1 and 3 all empty? Or can they have content? If they can, could the content of any column 1 or column 3 cell be taller than the content of the column 2 cell in the same row? Can the rows vary in height? Or … | |
Re: [QUOTE]how to enable the javascript while loading the page automatically.[/QUOTE] You can't. The nearest you may get with javascript alone is to try to prevent users with javascript not enabled from accessing the page(s) in question. | |
Re: Excellent find :) Too bad you didn't post this solution when this thread was active - three years ago :( | |
Re: For a typical async exchange I see 1,1,2,3,4 in IE8 and Firefox. I don't know whether it has anything to do with your situation but in both Chrome and Safari(pc) the same exchange generates only 1,2,4. | |
Re: Your comment comes a little late. This thread has been dead for almost three years. | |
Re: [QUOTE] retaining the selected value from the drop down throughout the website [/QUOTE] The usual approach is to set a cookie. If the value(s) to be saved are only a few bytes, some stupid-html tricks can get a similar effect without all the overhead. In HTML5 [where supported] the sessionStorage … | |
Re: [QUOTE=hashimu;1213496] complete code[/QUOTE] Here is a complete implementation using css and classes. [CODE] <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta name="generator" content= "HTML Tidy for Windows (vers 25 March 2009), see www.w3.org"> <style type="text/css"> .vol {display:none} .npi {display:none} </style> <script type="text/javascript"> function showHide(cls, show) { // browser-compatibility … | |
Re: Um, 'onmouseout' by itself won't do what you want. It will keep changing the <div> as the mouse moves around regardless of whether a given radio button was selected (or deselected, or not even touched). You may find this recent post [INDENT][url]http://www.daniweb.com/forums/post1273341.html#post1273341[/url][/INDENT] (which solves this very problem) useful. | |
Re: Your answer comes a bit late. This thread had been dead for over a year and a half when you jumped in. | |
Re: [QUOTE] I'm not quite sure why it doesn't work... [/QUOTE] Here [url]http://www.pageresource.com/jscript/jpreload.htm[/url] is a recipe that works. | |
Re: VB != javascript. | |
Re: java != javascript | |
Re: Have you enquired at the TinyMCE forum? | |
Re: This[CODE]<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"> <html> <head> <meta name="generator" content= "HTML Tidy for Windows (vers 25 March 2009), see www.w3.org"> <title></title> </head> <body onload="slideshow()"> <div id='packages'></div> <script type="text/javascript"> function slideshow(src){ var picture=new Array(); picture[0]="package1.jpg"; picture[1]="package2.jpg"; var active=0; document.getElementById('packages').innerHTML="<img src="+ picture[0] +">"; } </script> </body> </html>[/CODE]fixes the immediate problem. However, … | |
Re: What are you trying to do, exactly? Are you trying to adjust the page content based on some setting? If so, that is not a Good Thing. My current keyboard configuration has nothing to do with the language(s) I want to see in pages I visit. Offer the user a … | |
Re: [QUOTE]I want to auto bookmark for the user. Any suggestions?[/QUOTE] Yes: don't do it. And if you do, don't expect universal approval. I can only hope that most users know enough to keep their toolbars and bookmarks locked. | |
Re: [QUOTE] Steps to be fllowed to write a custom Validator: [/QUOTE] I doubt that the original poster will be thanking you for your detailed sugg... suggestion - this question was asked and answered over a year ago. | |
Re: If you mean a literal popup window, don't forget that many users have them blocked. Would the hourglass cursor be enough? Between those two extremes there are plenty of choices. | |
Re: Sorry, I don't know what you are trying to describe. However, I can guess that CSS alone, or a frameset, or a table will do what you want. CSS is the professional way to do it; a table is the easy way. | |
Re: A common solution in javascript is image pre-loading [url]http://www.pageresource.com/jscript/jpreload.htm[/url] You may not have to code it yourself in Ajax; I don't know. If that approach by itself doesn't solve the problem, it is possible to test the image property 'complete' and/or wait for it to become 'true'. | |
Re: Actually, the resize logic is working - but it is resizing to the wrong value(s). The problem is that the <iframe> is loaded with two <embed>s, each having a height of 505. The total height of the <iframe> should thus be (roughly) 1010, but the height reported to the resize … | |
![]() | Re: [QUOTE] don't know where to start.[/QUOTE] Read about the methods of the Date() object [url]http://www.w3schools.com/jsref/jsref_obj_date.asp[/url] |
Re: This line of original code [iCODE]for (i=0; i<iframeids.length; i++){[/iCODE] is still on the test page. My previously suggested change [CODE]for (var i=0; i<iframeids.length; i++){[/CODE] should be made even if that alone doesn't fix the problem with dynamic resizing. | |
Re: [QUOTE] moves the pie slice over to the right a ways. [/QUOTE] I may regret commenting without having looked at the code. Let me repeat: I haven't even glanced at the code. However, having a pie chart look as though an actual piece of the pie is being removed is … | |
Re: If I were you, I would ask this question at the Smarty forums [url]http://www.smarty.net/forums/[/url] preferably after reading their FAQ and wiki. | |
Re: You were on the right track. This [CODE]<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"> <html> <head> <meta name="generator" content= "HTML Tidy for Windows (vers 25 March 2009), see www.w3.org"> <meta http-equiv="Content-Type" content= "text/html; charset=us-ascii"> <title> Untitled Document </title> <style type="text/css"> #style {width:880px; height:229px;} #styleimage {width:610px; height:229px; float:left;} #stylenav {width:270px; height:229px; float:left;} … | |
Re: Start by looking up the <noscript></noscript> tags. Note: although technically not 'legal', a construct in the <head> section like[CODE]<noscript> <meta http-equiv="refresh" content="0;url=altpage.html"> </noscript>[/CODE] works in 'all' browsers. | |
![]() | Re: Here [CODE]<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"> <html> <head> <meta name="generator" content= "HTML Tidy for Windows (vers 25 March 2009), see www.w3.org"> <title></title> </head> <body> <div class="cmonth"> <div class="ctrl"> <table cellspacing="0" cellpadding="0"> <tr> <td align="left" style="width: 15px;"> <a class="calendar_prev" href="#">«</a> </td> <td align="center"> <span><strong><?php echo date("M Y"); ?></strong></span> </td> <td … |
Re: Start at [url]http://www.w3schools.com/Css/pr_pos_z-index.asp[/url] You also need to tweak the locations of the menus and the size/shape of their selections. | |
Re: A good first step would be to learn that javascript != java. | |
Re: Here[CODE]<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta name="generator" content= "HTML Tidy for Windows (vers 25 March 2009), see www.w3.org"> <title></title> <script type="text/javascript"> function setXY() { var oZ = document.getElementById('z') function setX(x) { oZ.style.left = isNaN(x) ? 0 : x % 100 } function setY(y) { oZ.style.top = … | |
Re: Start here [url]http://sixrevisions.com/javascript/graph_chart_plot_data_javascript/[/url] There are many, many more. | |
Re: [QUOTE] This works fine in every browser except Safari. [/QUOTE] Safari(pc)? Safari(mac)? Both? | |
Re: Putting javascript in the <head></head> of one page does not mean that will be included in any other page. To put script in the <body></body> use tags like this [CODE]<body> ... <script type="text/javascript"> ... </script> ... </body>[/CODE] | |
Re: I can't test from here but I can tell you in words something that should work. The key observation is that resizeIframe(){} is called both when a 'filter' link is clicked and when the browser navigation buttons are used. If I have followed the logic correctly, immediately after var [iCODE]currentfr=document.getElementById(frameid)[/iCODE] … | |
Re: Edit this line [CODE]<span id="fxma" class="instructiontext">FILTER[/CODE] (to insert the id=) and replace this function [CODE]function resizeIframe(frameid) { var currentfr = document.getElementById(frameid) var cAs = document.getElementById('fxma').getElementsByTagName('a') for (j = cAs.length, i = 0; i < j; i++) { cAs[i].style.backgroundColor = 'white' } var a; switch (window.frames['fxm'].document.URL) { case 'http://www.rjt-online.com/photos_latest.php': a = … | |
Re: [QUOTE][code]alert(listboxelem.length);[/code][/QUOTE] [code]alert('The question you are answering was asked 2 1/2 years ago');[/code] | |
Re: Works fine in Chrome, Safari(pc), Opera and IE8 (at least a map appears with an airport icon overlay). Firefox complains that downloadUrl() is not defined. That appears to be the result of a problem with [ICODE]bindInfoWindow(marker, map, infoWindow, html);[/ICODE] (since after commenting that out the display appears). Further testing would … | |
Re: To do this in a perfectly general way you would need to know quite a bit about the DOM and the differences between IE and other browsers. To do it in exercise you need only make one assumption: that the first child of the <p> to be changed is a … |
The End.