Jump to content

banzemanga

Members
  • Content Count

    20
  • Joined

  • Last visited

Community Reputation

0 Neutral

About banzemanga

  • Rank
    Newbie
  1. So, i have this table of three rows and three columns. I want that when i mouse over a cell, the entire row and column of that cell gets highlighted. And of course, i want a pure CSS solution. For the rows, it is easy because i can just implement the ":hover" selector over the <tr> tag. However, i can't implement over the ":hover" selector onto <colgroup> or <col> tags. That is becauase, all browsers implement such tag with no height nor width. Even if i try to add a width and height, the browser debugger will immediately show that such values will be reset to zero. <!DO
  2. Thanks for the reply. Too bad i can't use it the way i want it to.The idea was to make use of the inline-block property without having to insert it using CSS.I wanted inline-block tags for text formatting.
  3. I know there are some elements that are block elements by default like div, p tags.And there are other elements that are inline by default like span, a tags.Is there any tag that is inline-block by default?
  4. I am not sure what it is called in CSS but i think it has to do with inheritance.Let's say i have the following HTML table: <table id="styleme"> <tbody> <tr> <td>Hello</td> <td>World</td> </tr> </tbody></table> So i want my CSS to give a background color at the td tag on the table with id "styleme" and not the td tags of other tables.I know that if i want to specifically give a style to the table tag i could do: table#styleme { //whatever style } But i want to give style to my td tag without giving it a class name or id bu
  5. I am writing a code that will generate the contents of a calendar into a table.For some reason, this code seems to work on all browsers except for IE which gives me an error of: Here is the piece of code:window.onload = constructor1;var cdate = new Date();var cday = cdate.getDate();var cmonth = cdate.getMonth();var cyear = cdate.getFullYear();var Month = cmonth;var Year = cyear;var calendar = document.createElement("table");calendar.id = "calendar";function constructor1(){ var doc = document; var txtNode = doc.createTextNode(""); //creates the skeleton of the calendar var tBody = doc.createE
  6. Well, in the DOM standard to select the text we use the .select() function. But the problem with this function is that it selects the entire text but i only want to make it select a portion.There is also the .setSelectionRange(start, end) but this is only for mozilla browsers including firefox. In other words, browsers like IE and Opera doesn't support it.To make it work in a IE browser, we need to create an activeX selection object, which has its own function.What i am wondering if there is any way to do it using DOM functions so that i don't have to write a function for each browser.What i h
  7. Hello, i know how to manipulate html DOM using Javascript but i want to do it with Java now.The thing is that i don't know how to use the dom library in java.I see that the dom library are interfaces and i don't know very much about interfaces.When i try to implement an interface, it says that the class must be abstract and i don't want to make abstract classes.So what i need is just a basic setup for the main method.Probably the simplest is to append some text on the body of the page.From there i believe i should be able to take it and make it run.I have been looking for simple examples like
  8. Yeah, i took a look at that one before.The reason i choose to do it with the textarea was because it only required on element while the conventional way uses three elements (two buttons and a textfield).I was hoping that somebody knew some trick or that in was someplace of the dom i couldn't find would have the customization of the scrollbars. (i even tried the div scrollbar trick on the textarea and didn't work)The div is a great idea and very creative too but it means that i must have multiple lines and text is not editable.If i didn't care about the number of elements needed, i just create
  9. I see, that is why you people where talking about multiple liners. I love this idea and will try something with it. But one last comment is that the scrollbar is not rendered correctly in firefox. It looks like it disapears when i shrink the height to the size of a textfield. The same problem happens to the textarea though.
  10. Here is some part of the code. Now if you try it, you will immediately see that you can't get multiple lines even if you press the enter key.Parsing the text content is a lot more trouble but can be done. So like i said it is not the challenge. <html> <head> <script type="text/javascript"> window.onload = constructor; function constructor() { textarea = document.getElementById("smart"); if (!textarea.status) textarea.onkeydown = enterhit; } function enterhit(evt) { if (evt.which == 13) return false; } </script> <style type="text/css"&g
  11. I think that what i have been trying to do have been confused with the second post.First of all, i am only going to have a one line value.Right, no multiple lines since line brake will be disabled using javascript keystroke events handlers.Second, i want to use the scrollbar arrows as the spinner buttons. So when i click to the up arrow it will change the value.(which i don't find anywhere any javascript code or in the DOM specifications on assigning a javascript function to the scrollbar arrows,so i am asking if it is possible or if anyones knows how to)Edit: Well troubles there are going to
  12. Yes, Deirdre's Dad. It works like a charm now. Thanks.
  13. There are a lot of things that can be done for that. One is to disable the edit and only allow the users only spin the values. Another one is to have a keystroke detector that will filter out the characters that must not go in there like line brake. And also a parser that reads the text and then decide if the text is in a valid format. If so then takes it and compute it. Otherwise the value will be reset to the previous value. Those things are easier to do for me. My challenge is in the scrollbar.
  14. I know that the usual way to do it is using graphics. But there is no point for me to create this topic if i don't find it challenging. Besides, wouldn't be great you get multiple features with only one object instead of three?Maybe i just give it up since it seems almost imposible to do it with the textarea. But if anyone knows how to control the textarea's scrollbar for something like this, please tell me. I would really like to do the spinner with this.
  15. Hm... after reading your post i tried again and i still get the same results i said. What version of Firefox do you use? I use 2.0.0.13.IE7 doesn't render it at all. Firefox only takes it when i include the tag.
×
×
  • Create New...