Justin Fox

Ranch Hand
+ Follow
since Jan 24, 2006
Merit badge: grant badges
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
1
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Justin Fox

I found what I'm looking for:

document.getElementById("id").style.cssText="value";

Justin
I guess another alternative would be to store an actual style of a DOM node in the class.

So for my dataGridCell class:



I could just use that _domElement object in my toDom function as well.
I guess I could assign default classNames (same as actual object class name)
for default and selected/highlighted and just assign the .style, if anything is set
it will trump, if not, default cssclass.

Sound like a good idea?

thanks,

Justin

Is it possible to obtain a Style object in Javascript which represents a defined
CSS class in an external file?

I have a custom control, but I would really hate to have to define the style in code
rather than assign a class name to the DOM node.

I have call back events from the control and I would like to be able to assign a child
node's className equal to its 'selected' style class via getElementById instead of changing
the class object's _defaultCellStyleCSSName and removing/appending the parent control.


Thanks,

Justin
Thanks for the link, it really helped me out!

Justin
Ok, I have the following code:



If I return this._id or this._classid in the function tostring(), 'sam' and 'sam's class' get alerted successfully. However, for some reason, this._icontrol is always 'undefined'. I'm not sure what I'm doing wrong. Or maybe what I'm trying to do isn't possible? Just trying to super a DOM element to a parent 'class'.

Thanks,

Justin
Yeah I've been looking around and figured I'll either just go with ASP.Net or rewrite API in PHP and go that way.

Thanks for the explanation : )

Justin.
12 years ago
PHP
I've written a series of class libraries using .NET that parse websites and store the information in classes.

I would really hate to have to convert that code to php now that we have decided to go php on a linux system.

Is there a way to use my DLL's functions and class objects from php, on a Linux OS?

Thanks,

Justin
12 years ago
PHP
Ok... I got the bright idea maybe I should look at the print queue to see if it's even getting that far, and it is.
I looked at the document properties and it says 0 bytes. I tried some different flavors, but none work besides AUTOSENSE.

The print job starts and then just deletes itself, but I'm sure that's because it's 0 bytes...

anyone know a way to deal with this problem?

Justin
12 years ago
I'm starting to think Java's ability to print to HP printers is limited if not non-existent.

I have a wireless laserjet at home that won't print and I have a LasterJet 1000 series at work that won't print as well.

No more HP printers for me!

Justin
12 years ago
And the PrintJobListener class code:

12 years ago
here is my code:


Justin
12 years ago
I added a PrintJobListener to the job, only the 'DataTransferCompleted' and 'NoMoreEvents' events are raised.

Justin
12 years ago
Instead of using a String [], use a Color []. That way you can get a random integer and get the Color object at that index and use it.
Color doesn't have a static variable/function called 'backgroundColor', that's why you're getting that error.

Justin
12 years ago
I'm using javax.print package to print a text document. I can get the default printer (I can print the name of the printer). But when I create the DocPrintJob object and call it's .print() function,
nothing happens .

The only difference between this printer and the one I test on at the office is that the one at the office is a network printer (non-wireless) and the one at my house is wireless.
Is there something different I have to do to get it to print to a wireless printer? No exception is throw so I don't know how to debug it to see what the problem is.

Thanks,

Justin
12 years ago
Cool, I replaced '\n' with '\r\n' and it worked great : ).

Thanks
13 years ago