Jump to content

Saeed

Members
  • Content Count

    9
  • Joined

  • Last visited

Community Reputation

0 Neutral

About Saeed

  • Rank
    Newbie
  1. Good Day and Happy New Year. I'm trying to set the focus to a text field with this code:<body onLoad="document.formname.fieldname.focus();"> // (sorry, inserting the Codebox generated Invalid Argument in ips_text_editor.js.)<A name=OLE_LINK1>It kind of works! The focus is in the field, but not the cursor. That is, I don't see the I-beam in the field, but when I type a value, it appears there.The value entered in the field is then used to search for a database by clicking a button.And now the questions:1. Why is the cursor not blinking in the field although it has the focus?2.
  2. Good Day,Is it imperative to embed a JS script in an HTML page in order to execute the code? or is it possible to somehow run a script the way one would do a Java code from the command line?
  3. Good Day,I am really baffled: I just saved a file with .htm extension but without <html></html> or <body> tags. And it works! I mean it gets displayed. Even a button can be placed and the onClick method would work. I'm using IE6; tried it with IE7, same thing. Even the little Perl script and "submit" worked (XAMPP is installed on the IE7 machine).There must be very good reasons for having those tags; please share them with me. Thanks.
  4. Merci beaucoup dsonesuk!That's exactly what I was asking for!Thanks again and have a nice weekend.
  5. Good Day,I'm learning JS and CSS; to practice, I wrote a function to loop thru all rgb values and assign them to the backgroundColor property of a div: <script type=text/javascript><html><head><script type="text/javascript">function cs (){ var obj = document.getElementById('t'); var tmp = ["0", "0", "0"]; var a = tmp[0]; var b = tmp[1]; var c = tmp[2]; var clr; for (i=0; i<256; i++){ a = i; for (j=0; j<256; j++){ b = j; for (k=0; k<256; k++){ c = k; clr = "rgb(" + a + ", " + b + ", " + c + ")"; obj.s
  6. Good Day Deirdre's Dad,Thanks for your reply. However, 1. The pages are on an intranet, and thus not accessible from outside. I did try to somehow describe the setup, obviously not very successfully! Let's see if this one's any better: Basically by clicking a button, the following script is executed: function toggle (checked) { document.getElementById('tree').src = (checked) ? 'image1.gif' : 'image2.gif'; }Initially, image2.gif is displayed and "checked" is true; it is defined in another file. So, at first click, image1.gif should be shown. But it is not. It is there but invisible.T
  7. Good Day, I have a page with 3 horizontal frames. The middle frame is in turn divided into 2 vertical frames and the right frame again into 2 horizontal ones; it looks something like this: ___________________________________________________________ |..........................................header frame......................................||__________________________________________________________||.........|...............................optionsframe..................................||.........|____________________________________________________| |....left.|................................
  8. You're right, there's no such a thing as <id> or for that matter <class> element; they are both attributes, sorry. Thank you for the explanation about <div> & <span>. Please explain as well the different usage of <id> & <class>. The explanations on w3schools.com read rather similar. They both can be used by a JS script as well as styles.
  9. Good day,After more than 12 years, I've been thrown back to website design and maintenance. So a lot of newer HTML constructs are, well, new to me! I'd very much appreciate your support in getting up to speed. Here's my question:It seems to me that <div>, <span>, <class>, <id> (missed any?) do more or less the same thing, namely formatting the text following them. <div>, <span> are apparently local; the other 2 rather global. Is it so?Could you please describe the differences? What are the criteria for picking one over the other?Thanks.
×
×
  • Create New...