Yea, give me a <br>! Since when can JavaScript create files on the user's hard-drive? I thought this was totally verboten. Please show code that can do this.
From my O'Reilly JavaScript (admittedly old at this point 4th edition, covers JavaScript 1.5) manual:
page 12
1.6.7 What JavaScript...
I was playing with it and I noticed that if you remove the "float:left;" from the style for div two, then it will wrap (Although the width % then seems to mean something different than what it did when you include "float:left;". Try "width:90%;" instead).
ChrisHunt - Appreciate it, but the question was how to do it inline.
BillyRayPreachersSon - you nailed it with your reference, thanks!!
The reason I was wondering about this was because of this question I got on my midterm. I'm curious how you HTML/CSS experts would answer it.
If one wants to...
stevexff - Hahaha! Just yesterday morning, before I had read your post, I had kept thinking, I remember from way back that if you Xor 2 variables, the result is a variable that, if you Xor that variable with either of the original 2 variables, it results in the other original variable. So...
Yes, you are right that doing it this way is probably going to be more processor-intensive and since this is a sorting routine, you certainly don't want to have to do more processing than necessary. But it does point out a definite shortcoming of Java, doesn't it. I mean, I was thinking what...
Not sure whether to put this in the C++ forum or here. But I seem to remember one time being very impressed when I read somewhere of a slick way to swap 2 variables without the use of a temporary var. I wanted to use this in a bubble sort I am writing for a class in Java. Here is the dumb...
I am reading a series of lines from a file, each of which has a set of strings separated by commas, and storing each of those strings into arrays. So I have an array of arrays. The first string on line 1 would be $WL[1][1], the second string on line 1 would be $WL[1][2]. The first string of...
myval = myval.replace(/^\s+|\s+$/g,'');
theniteowl, that's very very nice! My problem was I didn't realize that the replace method doesn't operate on its string, so you got to do myval = myval.replace(). It wasn't leaving just one space, it wasn't doing anything because I wasn't saving the...
QstrVal.replace(/^\s+(.+)/, "$1"); // replace one or more SPACEs at start of string with nothing
QstrVal.replace(/(.+)\s+$/, "$1"); // replace one or more SPACEs at end of string with nothing
I wanted to come up with a small piece of code for removing preceding and trailing spaces. From what I...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.