Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

19 Good

About tinfanide

  • Rank

Previous Fields

  • Languages

Contact Methods

  • MSN
  • Website URL

Profile Information

  • Location
  • Interests
    C#, ActionScript
    Just wanna script something that is useful for my daily life...
  1. xmlDoc = xml.responseXML; table = document.createElement("table"); Employees = xmlDoc.getElementsByTagName("Employee"); for (x=0; x<Employees.length+1; x++) { if (x==0) { tr = table.insertRow(-1); // does not work tr.className = "header"; tr.setAttribute("class","header"); for (z=0; z<5; z++) { th = tr.insertCell(z); th.innerHTML = headers[z]; } } else { tr = table.insertRow(-1); Employee = Employees[x-1].getElementsByTagName("*"); for (y=0; y<Employee.length; y++) { td = tr.insertCell(y); td.in
  2. @davej <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>title</title> </head> <style> th { font-size: 30px; /* doesn't work */ } td { font-size: 20px; /* works for both <th> and <td> */ } </style> <script type="text/javascript"> var xmlhttp; var Staff, obj; var url = "staff.json"; function init() { xmlhttp =
  3. th { font-size: 30px; /* doesn't work */ } td { font-size: 20px; /* works for both <th> and <td> */ } I'd like to ask why the font-size of <th> and <td> must be the same. Thanks for any help.
  4. var xmlhttp; var Staff, obj; var url = "staff.json"; function init() { xmlhttp = (window.XMLHttpRequest) ? new XMLHttpRequest() : new ActiveXObject("Microsoft.XMLHTTP") ? new ActiveXObject("Msxml2.XMLHTTP") : null ; xmlhttp.onreadystatechange = function() { if (this.readyState == 4 && this.status == 200) { Staff = JSON.parse(this.responseText); var table = document.createElement("table"); document.body.appendChild(table); obj = Staff.Staff[0]; for (var y in obj) { var header_row = document.createElement("th"); var column = document.createElement
  5. I'm not sure if I'm posting this ques in a correct forum (whether it's related to HTML). I'd like to ask: When I type the addr below (just an example), http://ss.activate.ilongman.com/getfile/269/id/415 it'll redirect me to download a file. How is it made? Is it PHP? Or just HTML / JS redirecting? Another ques is: I'd like to batch download (automate downloading) the files according to the pattern (xxx): http://ss.activate.ilongman.com/getfile/xxx/id/415 What program language should I use to achieve this? Thank you.
  6. The file I want to modify is an mp4 video file (of course a bunch of them; that's why I need to do it programmatically). But I wonder why an API is needed. Does VBScript not support it natively? It can read those properties by FolderItem.GetDetailsOf(), yet can't write it, can it?
  7. I have successfully modified the file properties of MS Office files with the use of DSOFile. But how can files other than those be modified?
  8. <style type="text/css">table{ border-collapse: collapse;}table th{ text-align: left; }td { border-bottom: 1px solid #F00;}table th, table td{ padding: 5px 10px; }</style> Yes, change from <tr> to <td>. That's one thing. Another thing is that "table border-collapse: collapse" does inhibit border-bottom in TABLE. (in FF)
  9. // ...session_unset(); // added this linesession_destroy();// ... Yes. Checked online and added the session_unset() function.
  10. I wonder why session_destroy() does not work on the page (destroy_session.php). Set the session: http://learntolive.x10.mx/PHP/Sessions/set_sessions.php <?phpsession_start();$_SESSION['username'] = "username1";$_SESSION['password'] = "password1";$_SESSION['array'] = array('array0','array1','array2');?><html><head><script type="text/javascript">var sPageFullPath = String(window.location.href);var iDelim = sPageFullPath.lastIndexOf("/");var sPageRootPath = sPageFullPath.substring(0,iDelim+1);var iCount = 3;var iTimerCount = iCount*1000;var sRedirectURL = "get_sessio
  11. First, I wonder why "border-bottom: 1px solid #ccc" should go with "border-collapse: collapse" in order to come into effect. Second, it is not compatible across all browsers to the best I know (only IE8+, Chrome support). In FF or IE7-, the bordor-bottom does not come out. The test page: http://learntolive.x10.mx/HTML/table.html
  12. Sorry to both who've answered me.I should have shown you the whole codes instead of the one that is wrong and that was just typed by me in the example. Sub a()Dim oIE As SHDocVw.InternetExplorerSet oIE = New SHDocVw.InternetExplorerDim oHTML As HTMLDocumentoIE.Visible = TrueoIE.navigate "http://www.website.com/"While oIE.Busy DoEventsWendSet oHTML = oIE.documentDim oTr As HTMLTableRowFor Each oTr In oHTML.getElementsByTagName("tr")''' return Null Debug.Print oTr.getAttribute("Style.backgroundImage")Next oTr End Sub I think I should have posted it in the VBA forum. Well, but sorry I h
  13. <tr style="background-image: url("background-image.jpg")"></tr> I wonder how we can get the attribute (url).I'm not sure about it. document.getElementsByTagName("tr").getAttribute("style.backgroundImage");
  14. Yes, ya're right. And you've made a point.First, the pre tag is not accepted by PHP. After removing the tags, the warning generated by PHP disappears.Second, the DOMDocument method achieves what I want. I don't need an external lib like the Simple HTML Dom. By the way, I can't check up online. I wonder if I can do this in PHP:<?phpecho $html->getElementsByTagName('li',0)->childNodes[0]->textContent;// it generates warnings// instead of using item()?>
  • Create New...