Jump to content

iwato

Members
  • Content Count

    1,506
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by iwato

  1. iwato

    Undefined Function

    orfunction overprompt3() { . . . }For some reason all of the other, nearly identical functions were properly described. I am lucky I posted this one, or you may have not found the error. Sometimes I feel, so stupid, but I guess this comes with the territory.Many thanks.Roddy
  2. I have an error that varies from browser to browser. This variation is brought about, because the purpose of the code is to retrieve browser information and respond to that information with new information that varies from user to user.Fortunately, all of the errors point to the same source file indicating a recurring pattern -- the syntax or description of my overprompt( ) functions. There are five such functions and they all reside in the following JavaScript file: popUpBoxConfiguration.js.These functions are a combination of code that I found on the jQ_Impromptu plug-in webpage (a jQuery plug-in) and my own creation. What is mine in the following example are1) the name of the function,2) the variable errorMSG, 3) the function assigned to this variable -- namely, loadErrorMessages ( ), and 4) the property assigned to the object created by the loadErrorMessages( ) -- namely, ipvb_approval.The loadErrorMessages( ) function is defined in errorMessages.jsI suspect that the problem lies in my own code. Nevertherless, I am also suspicious of the author's specification of the $.prompt( ) method which is described in jQ_Impromptu-2.5.js at the very top of the document. function = overprompt3() { var errorMSG = loadErrorMessages(); var temp = { state0: { html:errorMSG.ipvb_approval, buttons: {Continue: true}, focus: 1, opacity:0.6, submit:function(v,m,f){ if(v) { return true; } return false; } } } $.prompt(temp); } SOURCE DOCUMENT: Imagine_PrototypeAny insight would likely be helpful, because I can find nothing wrong.Roddy
  3. QUERY: I have recently decided to make the transition from client-side to server-side functionality and would like the forum's insight with regard to the best application to achieve server-side functionality.BACKGROUND: MobileMe of Apple Computer has recently told me that they are freezing all of their .Mac accounts in favor of MobileMe. This means that my entire website will remain visible at the online address, but that I will no longer be able to service any of its content. This leaves two alternatives: transfer all of my files into the new MobileMe domain name or abandon Apple as my online host.Transferring my site's content to the new MobileMe environment would devastate my online presence. Simply leaving it frozen in time in the .Mac domain would be a slow and tragic death. Faced with this choice I have decided to find a new host that permits server-side content. In so doing I will also satisfy an important long-term goal, albeit prematurely -- namely, server-side functionality.Recently I contacted Akamai Technologies and identified a reliable global web-hosting service called Rackspace. They have promised to call me tomorrow with an offer, and I need to be ready. As a dedicated Apple user with a high level of mobility it is probably unwise for me to host my own website on my own computers.CURRENT PREFERENCE: Without any consultation from anyone I would choose PHP, simply because I remember having read that it is both open and free. Moreover, I see it often as an extension when I surf, and it appears to be very popular. This said, I know that there is a lot more out there, and I am very well versed in Adobe's CS3 Master Collection. Finally, I only have until tomorrow to prepare myself. What application would you recommend and why?Roddy
  4. QUERY: I have recently decided to make the transition from client-side to server-side functionality and would like the forum's insight with regard to the best application to achieve server-side functionality. BACKGROUND: MobileMe of Apple Computer has recently told me that they are freezing all of their .Mac accounts in favor of MobileMe. This means that my entire website will remain visible at the online address, but that I will no longer be able to service any of its content. This leaves two alternatives: transfer all of my files into the new MobileMe domain name or abandon Apple as my online host. Transferring my site's content to the new MobileMe environment would devastate my online presence. Simply leaving it frozen in time in the .Mac domain would be a slow and tragic death. Faced with this choice I have decided to find a new host that permits server-side content. In so doing I will also satisfy an important long-term goal, albeit prematurely -- namely, server-side functionality. Recently I contacted Akamai Technologies and identified a reliable global web-hosting service called Rackspace. They have promised to call me tomorrow with an offer, and I need to be ready. As a dedicated Apple user with a high level of mobility it is probably unwise for me to host my own website on my own computers. CURRENT PREFERENCE: Without any consultation from anyone I would choose PHP, simply because I remember having read that it is both open and free. Moreover, I see it often as an extension when I surf, and it appears to be very popular. This said, I know that there is a lot more out there and only have until tomorrow to prepare myself. What application would you recommend and why?Roddy
  5. One of the ways that I had tried wasdocument.getElementById("someID").preventDefault();but this failed in all of my test-browsers including the most recent versions of Firefox, Safari, and Opera. It was not a question of being old-fashioned. Simply I wanted to yield control to the user.By the way, during my investigation I found the following page: Event Compatibility Tables. It might prove useful to others.
  6. Yes, thanks Ingolme. I was stumbling on the double return. I had tried so many different code arrangements before posting. Only after I posted, did I figure it out on my own. It really does make good sense. In any case, thank you for the confirmation.Roddy
  7. QUESTION: Why would the following code fail to stop the default behavior of the anchor tag? function userControl(element) { var defaultControl = confirm("If true, click OK"); if (defaultControl !== true) { element.preventDefault(defaultControl); } }<p>This <a href="http://www2.gol.com/users/hsmr/emblem/name.html" onclick="userControl(this)">hyperlink</a> demonstrates how the function to which the event-handler refers can be used to prevent the default behavior of the anchor tag.</p>Can you fix it?Roddy
  8. You must like jQuery. I am just getting started with it.Roddy
  9. This is much easier than what Ingolme taught me, but it is not exactly JavaScript. Many thanks, anyway! This was true, but having had trouble with the JavaScript that Ingolme has since corrected, I began experimenting with the <dfn> and <span> tags and a display block. Unfortunately, I have not yet mastered the technique, as the resulting display is inconsistent from element to element and browser to browser. Simply, when it works, it appears much better than the title attribute. If you'd like to take a look, please do so at橋守岩人 Its Derivation!If I knew how to apply CSS to the display of the title attribute, it would probably be ideal since all browsers appear to support this attribute. I am not sure what you mean other than the use of inline tags, like <em> with CSS rules attached. The <dfn> tag offers inconsistent results across browsers. Not at all!Roddy
  10. I did not know that you can apply the title attribute to other HTML tags. It is a pleasure learning from you, Ingolme.Roddy
  11. QUESTION: How does one get the focus rectangle to disappear in Internet Explorer?BACKGROUND: I recently included the following script in my webpage in an effort to eliminate the focus box in Firefox when the user clicks on links used only for the purpose of revealing the contents of the title attribute upon mouse over. I have been told that this script does not work in IE8. I know that it works in the most recent versions of Safari, Opera, and Firefox.JS CODE:<script typt="text/javascript"> function onFocus() { if (this.blur) { this.blur(); } }</script>HTML SAMPLE CODE:<a href="#" onclick="return false" onfocus="onFocus()" title="Japanese equivalent" class="Text_Translation"><em>katakana</em></a><em>English equivalent</em></a>SOURCE PAGE: http://www2.gol.com/users/hsmr/emblem/name.htmlRoddy
  12. But why, I also misspelled a word.Roddy
  13. I have decided for the moment that it is not worth the effort . In any case, thank you for your kind effort.Roddy
  14. Hier ist das Problem das gedoppelte "t". Mach' aber weiter. Mir gefehlt es, ab und zu auf Deutsch zu schreiben.Roddy
  15. OK. I am now able to assign new classes to button objects with mouse events and change the appearance of buttons with the :hover pseudo class. This new knowledge makes me very happy. However, what I am unable to do is preserve the appearance of my buttons -- namely, the buttons' rounded corners. Short of using a JavaScript program like SVG-Roundies what must I do?The following pair of sample pages work together. Each uses a different approach to achieving the same button effects. Neither preserves the rounded edges of the button.SAMPLE PAGES: Mori and TennisRoddy
  16. This is good to know, and I always create my HTML pages with XHTML 1.0 Strict. But, what about invoking a different class? Is it alright to write: document.getElementById("SomeID").style.class="SomeClass"; ?Roddy
  17. So, I eliminated the name and replaced it with an id. It worked. Hooray and thanks! I hope the name was not important. . .Originally I tried to change the class of my button dynamically and use CSS. Unfortunately, I had never used the pseudo classes :link, :hover, :visited, and :active with anything but <anchor> tags.1) Can I really write input.SomeClass:hover? Will it work? I do not remember ever having seen how to change the appearance of a button using such a script. 2) Can I also write document.getElementById("SomeID").style.class="SomeClass"; ? Will this work? Yes, I have experienced this same phenomenon and have learned to guard against it by not pasting anything from another document until I have first changed the copied content into TXT format. It has already become a matter of habit, as it was the source of several mysterious errors elsewhere. W3C validation cured me of this problem very quickly.Roddy
  18. QUESTION: How does one change the appearance of an <input> tag -- specifically type="button"?BACKGROUND: The below set of code produces two error messages in Firebug: one going in and one coming out. At minimum, these errors tell me that I have targeted my button properly. What I do not understand is why Firebug is telling me that onHover() and mouseOut() are not functions.<head><script type="text/javascript"> function onHover() { document.getElementById("bottom_right").style.color="#FFF"; } function mouseOut() { document.getElementById("bottom_right").style.color="#FFF"; }</script></head><body><input type="button" name="bottom_right" value="Bottom Right" onclick="openWindow()" onmouseover="onHover()" onmouseout="mouseOut()"/></body
  19. Thanks, Deirdre's Dad. I substituted the text that you suggested and the result was the same. I still have not fixed the problem, but at least my knowledge of Javascript has increased.Roddy
  20. QUESTION: Could someone please explain the use of the slash and vertical bar in the following statement:if (/loaded|complete/.test(document.readyState)) return initfb();Roddy
  21. QUESTION: How does one get the return statement to return more than one value?BACKGROUND: The following code works great up to the point where I try to return the values of both bName and bVersion. Here is what I have tried:return bName bVersion; // Returns an errorreturn bName, bVersion; // Returns only bVersionUnfortunately, I need the values of both bName and bVersion, and I need them separately. Must I create an object? function getVersionNameAndNumber() { var patt1 = /\S+\/\S+/g; var bNV_String = navigator.userAgent; var bNV_Matches = new Array(); var bNV = new Array(); bNV_Matches = bNV_String.match(patt1); for (var i=0; i<bNV_Matches.length; i++) { bNV_Match = bNV_Matches[i]; bNV = bNV_Match.split("/"); var bName = bNV[0] var bVersion = bNV[1]; if (bName == "Firefox" || bName == "Opera") { return bName, bVersion; } else if (bName == "Safari") { for (var j=0; j<bNV_Matches.length; j++) { bNV_AppleMatch = bNV_Matches[j]; bNV_Apple = bNV_AppleMatch.split("/"); var bName_Apple = bNV_Apple[0]; var bVersion_Apple = bNV_Apple[1]; if (bName_Apple == "Version") { bVersion = bVersion_Apple; return bName, bVersion; } } } else {} }}document.write(getVersionNameAndNumber());
  22. Sorry for getting back to you so late, but your suggestion would have required an additional iteration that I was able to avoid with a different approach. Moreover, once the variable name were created I was not at all sure that the following would work:var varName[i] = "ith string of information"; Your comment in regard to the above code would surely be appreciated.Roddy
×
×
  • Create New...