[Proto-Scripty] hi
Hi , what is up ? Christmas is drawing near , have you got any idea about the gifts ? What about a good electric product ? There is good news I want to share . For a long time , I want to buy a laptop , one that is high quality but low price . This morning I got my laptop , just one week after I put the order on the site ( www.olcekn0.com ) . The company Olcekn has many kinds of electric products , like mobile phones , TV , Games , and so on . All of the products are original and brand new . You can see it yourself in your spare time . I believe you won't disappoint and get some surprises . The laptop I get is really high quality and it arrives me so quickly . Hope you can get what you want on the site , too . Best regard -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptacul...@googlegroups.com. To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en.
[Proto-Scripty] AJAX.Request concatenating headers?
Hi, I have been trying to get an AJAX upload form working with the File API recently introduced, but the uploaded files are corrupted. A quick look in an hex editor have confirmed my suspicions about this being charset error as the raw string from the binary file (zip file) is turned into an utf8 string when it is decoded on the server. I am not exactly sure where the error is but during my work i attempted to override the headers sent by the AJAX.Request passing this information in the options object: requestHeaders: { Content-Type: 'text/plain; charset=x-user- defined-binary', Cache-Control: no-cache, X-Requested-With: XMLHttpRequest, X-File-Name: fileName } I was expecting this to override the HTTP headers with the request, but after some testing and debugging (using WebScarab) this works apart from the Content-Type header. Using Content-Type concatenates the specified input to the Content-type header field resulting in the following Content-type: application/x-www-form-urlencoded; charset=UTF-8 text/plain; charset=UTF-8, note that my specified charset is changed. Correcting the key in my specified headers from Content-Type to Content-type resolves this and correctly changes the type to text/ plain, but the charset is still set to UTF-8. Is this intended behavior or should it be reported as a bug? Best Regards, Eirik Eggesbø Ottesen -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptacul...@googlegroups.com. To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en.
[Proto-Scripty] Re: Traverse table cells
On Dec 3, 6:16 am, KenB kenber...@gmail.com wrote: I am new to prototype and need to learn how to traverse an html table and hide some columns. The only id I have is table id or the class it is associated with. Can anyone give me an example? Here is what I am trying to accomplish. var tbl = document.getElementById('ctl00_m_g_0ab7c148_0e6c_49e4_bc03_fd1064ca4b41_ctl00_Grid'); if (tbl != null){ var rows = tbl.getElementsByTagName('tr'); table elements have a rows property that is a collection of all the rows in the table, so no need for getElementsByTagName: var rows = tbl.rows; var cols = rows[0].getElementsByTagName('th'); Table rows (TR) have a cells property that is a collection of all the cells in the row, so if all the cells are TRs then: var cols = rows[0].cells; cols[0].style.width = '300px'; cols[1].style.display = 'none'; cols[2].style.display = 'none'; //Now loop through the data rows and hide specific cells for (var row = 1; row rows.length; row++) { var cels = rows[row].getElementsByTagName('td'); Same here, no need for getElementsByTagName: var cels = rows[row].cells; //alert(cels[1].valueOf); cels[0].style.width = '300px'; cels[1].style.display = 'none'; cels[2].style.display = 'none'; } } Rather than looping over every cell in every row, consider creating col[1] or colgroup[2] elements whose purpose is to provide a mechnaism for applying styles to columns instead of each cell individually. 1. URL: http://www.w3.org/TR/html401/struct/tables.html#edef-COL 2. URL: http://www.w3.org/TR/html401/struct/tables.html#edef-COLGROUP -- Rob -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptacul...@googlegroups.com. To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en.