Jump to content

Search the Community

Showing results for tags 'function'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • W3Schools
    • General
    • Suggestions
    • Critiques
  • HTML Forums
    • HTML/XHTML
    • CSS
  • Browser Scripting
    • JavaScript
    • VBScript
  • Server Scripting
    • Web Servers
    • Version Control
    • SQL
    • ASP
    • PHP
    • .NET
    • ColdFusion
    • Java/JSP/J2EE
    • CGI
  • XML Forums
    • XML
    • XSLT/XSL-FO
    • Schema
    • Web Services
  • Multimedia
    • Multimedia
    • FLASH

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Languages

  1. This may be an HTML or PHP problem, or Java as well. I am trying to write an alphabetical index from inside a php file. Here's what I'm trying to accomplish: PHP script searches the My SQL table A link is generated out of each itemOn clicking on the link, a php variable is setand the script moves on. I need information for a function that the onClick refers to. I've only found rudimentary examples, and none are any help. So, I'm sending the problem to you. tim
  2. Hi there! I'm very new in PHP and just doing my first steps in this great world. I have copy&paste a code snippet from php.net which demonstrate how to use the mkdir() function.the code snippet was very short: <? mkdir("/path/to/my/dir", 0700);?> I have saved this file into my ftp server with the php extension and then I load this page into my browser.the code didn't work as I expected and didn't create a directory in my server.can someone explain me please what's wrong with this code? Thanks in advance!! atar.
  3. function keyE(e,n,v) {// some function here}; function editProp(n) {// the caller is a button with function onClick="editProp('userID')"// n = 'userID'var dStr = document.getElementById(n).innerHTML;document.getElementById('f_' + n).innerHTML = '<input type="text" name="i_' + n + '" id="i_userID" value="' + dStr+ '" onkeypress="keyE(event,' + n + ',this.value)" />'; //error heredocument.getElementById('i_' + n).focus();document.getElementById('i_' + n).setSelectionRange(0,dStr.length);} // debug with Mozilla Firefox 15.0.1 Developer Tools The editProp(n) function generate error and I don't know how to fix it. The error is at document.getElementById('f_' + n).innerHTML = '<input type="text" name="i_' + n + '" id="i_userID" value="' + dStr+ '" onkeypress="keyE(event,' + n + ',this.value)" />'; The phrase onkeypress="keyE(event,' + n + ',this.value)" generate error "userID is not defined". userID is a string defined in n variable but it detect it as a variable. How to fix it? Thanks for any help provided.
  4. Hey, This seems like a basic question, but I can't find any information on it. (Perhaps my google-fu is weak) When calling a function, what is the difference between "someFunction();" and "someFunction;"? It seems like they should be similar, but they are not interchangeable. Consider the following code: <!DOCTYPE html><html><head><title>Playing Around...</title><script> function theMain() { //Display the current time. function displayTime() { var elt = document.getElementById("clock"); var now = new Date(); elt.innerHTML = now.toLocaleTimeString(); setTimeout(displayTime, 1000); } //Show some info about the browser. function showInfo() { var navi = document.getElementById("navig"); navi.innerHTML = "<b>appName:</b> " + navigator.appName + "<br>" + "<b>appVersion:</b> " + navigator.appVersion + "<br>" + "<b>userAgent:</b> " + navigator.userAgent + "<br>" + "<b>platform:</b> " + navigator.platform + "<br>" + "<b>onLine:</b> " + navigator.onLine + "<br>" + "<b>geolocation:</b> " + navigator.geolocation; return; } //console.log("theMain"); showInfo(); displayTime(); } window.onload = theMain; </script><style> #clock { font: bold 24pt sans; background: #ddf; padding: 10px; border: solid black 2px; border-radius: 10px; } #navig { font: 12pt sans; background: #ddf; padding: 10px; border: solid black 2px; border-radius: 10px;</style></head><body><h1>Clock</h1><span id="clock"></span><h2>Navigator Information</h2><div id="navig"></div></body></html> There are three functions, and if the outer function is called like "window.onload = theMain;" everything is cool, but if we call it like "window.onload = theMain();" The inner functions fail with and uncaught type error ("can't set innerHTML of null.") Similarly, if the inner functions are called without without parentheses, they fail to execute. I'm sure this is a scope issue, but for the life of me, I can't figure it out. Can anyone shed some light on this? Thanks!
  5. I'm working on the TEI stylesheet for EPUB for a BA degree project. I'm trying to modify the stylesheet files, so that they create a list of names selected by me, displayed at the bottom of the file (a final index).I'm trying to force the xsl to write an xml code in preflight mode after the body section (inside “<back>”). But I find hard to define what to do in my template... I even thought to use a function, but I don't understand how do that.I tried to make sure that the right file is selected with the code xsl: attribute; I found this method on the internet but I do not know if it's right.This is my code: <xsl:template match="tei:body" mode="preflight"><xsl:attribute name="href"><xsl:value-ofselect="inputDir"/></xsl:attribute><xsl:choose><xsl:when test="position()=last()"><back><div type="indiceNomi"><b>Indice dei luoghi:</b><xsl:apply-templates select="tei:rs[@type='luogo']"><xsl:sort order="ascending"><p><xsl:value-of select="."/></p></xsl:sort></xsl:apply-templates></div></back></xsl:when><xsl:otherwise></xsl:otherwise></xsl:choose></xsl:template> I would like to know if you can show me which file I need to edit to change the CSS in the epub outuput.Can you please explain me what you would do in my situation, or help me in some other way?Thank you.
  6. hi dear frinds I have a tag like this: <input name="name1"> I wana add mutlti events for validation. this code works: <input name="name1" onchange="function1(arg1,arg2)" onclick="function1(arg1,arg2)" ?> but I think It does parallel Job and it is not normal. that code is true or is there a better way? in simple: I wana wirte Multiple events that call the same functiontnx
  7. I was able to complete a live search with a T-SQL database similar to the design found here on W3Schools, though now I am running into some difficulties passing multiple arguments/parameters to the JavaScript search page. Basically, we thought it would be a good idea to let people search by just a first name or last name if they wanted, as well as searching by their affiliation. Here is an excerpt from the form that appears to be giving me the problems: <form><input type="text" name="name" id="nameID" size="40" maxlength="64" onKeyUp="showNames('nameID', 'typeID', 'firstLastID')"onblur="if (this.value == '') this.value = this.defaultValue" onFocus="if (this.value == this.defaultValue) this.value = ''"value="Enter a name or a part of a name here"> <br><select name="type" id="typeID" onChange="showNames('nameID', 'typeID', 'firstLastID')"><option value="All">Members & Staff</option><option value="Member">Member</option><option value="Staff">Staff</option></select> <br><select name="firstLast" id="firstLastID" onChange="showNames('nameID', 'typeID', 'firstLastID')"><option value="Both">First & Last Name</option><option value="First">First Name</option><option value="Last">Last Name</option></select></form> Right now the form is passing the literal names of nameID, typeID, and firstLastID when I echo the variables in a separate PHP file. I've tried single quotes (which gives the literal names), double quotes (does not work), and no quotation marks (does not work) around the arguments just to see if that was the culprit, but no luck there. Before using the ID's I had been using "this.value", though unfortunately I couldn't use that any longer once we added the additional arguments to showNames(). Finally, I tried removing all of the arguments from showNames() and collecting the data using "document.getElementByID('...').value" (where '...' is the ID) in the JavaScript function, but that didn't work either. Can anyone help me figure this out? Thank you!
×
×
  • Create New...