Jump to content

Search the Community

Showing results for tags 'passing'.

  • 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

Found 3 results

  1. Hi all, This is my first question in W3Schools forum, and my question is I want to know whether it is applicable or possible to pass multiple parameter for a single attribute in xml tag?For example: <book name="Need" name="Help" price="10$"/><book name="Soon" name="Plz" price="20$/>...... Is it applicable? I know it may sound silly but if it is not possible then I'll go for any other option that may exist.So plz help me ASAP. Thanks in advance.
  2. hey anyone, i have a problem about passing variable. gridpEmp.PHP <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"><HTML><HEAD><TITLE></TITLE><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta http-equiv="Content-Style-Type" content="text/css"><meta http-equiv="Content-Script-Type" content="text/javascript"><script type="text/javascript">var preEl ;var orgBColor;var orgTColor;function HighLightTR(el, backColor,textColor){ var rowindex = el.sectionRowIndex; if(typeof(preEl)!='undefined') { preEl.bgColor=orgBColor; try{ChangeTextColor(preEl,orgTColor);}catch(e){;} } orgBColor = el.bgColor; orgTColor = el.style.color; el.bgColor=backColor; try{ChangeTextColor(el,textColor);}catch(e){;} preEl = el;}function ChangeTextColor(a_obj,a_color){ ; for (i=0;i<a_obj.cells.length;i++) a_obj.cells(i).style.color=a_color;}<style>table.selectable-table td { font-size:10pt; font-family: Arial; }table.selectable-table td { cursor:pointer; margin:0px; border:0px; padding:2px 5px 2px 5px; }table.selectable-table { border-spacing:0px; background:#eef;}</style></script></HEAD><BODY><table id="gridemp" border="1" cellspacing="0" cellpadding="4" align="center"><th>Employee Initial</th><th>Employee ID</th><th>Employee Name</th><tbody><?phpinclude('check/conDBodbc.php');$empid = $_POST['searchemployee']; function dbquery($sql) {include('check/conDBodbc.php'); $arr = array(); $rs = odbc_exec($con,$sql); $x = 1; while (odbc_fetch_row($rs)) { for ($y = 1; $y <= odbc_num_fields($rs); $y++) $arr[$x][$y] = odbc_result($rs,$y); $x++; } if ($x > 1) return $arr;}$arr = dbquery("select * from getemployee where employeeid like '%$empid%' or employeename like '%$empid%' or employeeinitial like '%$empid%'");echo $arr[1][3]; $rs1 = odbc_exec($con,"select * from getemployee where employeeid like '%$empid%' or employeename like '%$empid%' or employeeinitial like '%$empid%'");while(odbc_fetch_array($rs1)){?><tr onClick="HighLightTR(this,'#c9cc99','cc3333')"><!--<tr onClick="getvalue(this)">--><td align=left><?php echo odbc_result($rs1,employeeinitial);?></td><td align=left><?php echo odbc_result($rs1,employeeid);?></td><td align=left><?php echo odbc_result($rs1,employeename);?></td></tr><?php }?></tbody></table></BODY></HTML> i want to passing variable var rowindex = el.sectionRowIndex;how to do that passing variable in one file php??because i want to get value of row index from user selected row after that i can echo value of selected row from user by function dbquery($sql).
  3. 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...