Pages

Thursday, December 27, 2007

Drag-n-Drop with Resizable object across iframe

I got a weird problem when dealing with Resizable Drag-n-Drop (RDD) object across iframe. I have a RDD object which is required to be movable and resizable on an iframe enclosed by a div tag. When the object is out side of the iframe, everything works really well (with both scriptaculous + prototype and jQuery libraries). However, the object seems to over-sticky and out of control by mouse events on iframe. It took me nearly three days to figure out that the problem came on the render of object over iframe.

To fix this problem, I try to make a "layer" with transparent background (I highly recommend that you should make a transparent 1x1 pixels image, this will help you out of most of the problem with browsers) which lays upon the iframe, this will create a virtual background to keep RDD working promptly on iframe.

Monday, December 17, 2007

Gửi email tự động qua Yahoo

Yêu cầu: Yahoo Mail

* Chủ nhân của 1 web hosting trên Yahoo với Username/Password đầy đủ.
* Email account phải được thiết lập sẵn trên Yahoo server.
* Có nhu cầu gửi email reply bằng code, chứ không phải gửi Spam mail

Giải quyết:

* POP3: pop.bizmail.yahoo.com, port 110
* SMTP: smtp.bizmail.yahoo.com, port 587, chứ không phải port 25 nhưng thông thường
* Username: [tên account]@[tên miền (domain)].com
* Password: [ẩn]

Hàm trả về nhiều giá trị thuộc nhiều dạng dữ liệu

Yêu cầu:
  • Sử dụng ngôn ngữ C#
  • Muốn viết 1 hàm trả về nhiều hơn 1 giá trị với các kiểu biến (data type) khác nhau.

Giải quyết:
  • Tạo 1 hàm với biến trả về array các object.
  • Gán các biến đầu vào lên array đó.
  • Trả về array các object.

private object[] GetObjectWithMultipleDataType([những giá trị đầu vào của hàm])
{
object _myObject = new object[3];
// Khai báo và khởi tạo giá trị trả về
_myObject[0] = “My name is FHDN”;
// Gán giá trị đầu của array thành kiểu string
_myObject[1] = 100;
// Gán giá trị thứ 2 thành kiểu int
SortedList _myList = new SortedList();
// Khai báo và khởi tạo biến phức kiểu SortedList
_myObject[2] = _myList;
return _myObject;
}

Sử dụng:

object[] expectedObject = GetObjectWithMultipleDataType([những giá trị đầu vào của hàm]);
string expectedString = (string)expectedObject[0];
int expectedInt = (int)expectedObject[1];
SortedList expectedList = new SortedList();
expectedList = (SortedList)expectedObject[2];

Thursday, November 29, 2007

Follow-Me Browsing vs. Co-Browsing

I'm recently getting an attractive assignment on researching "Follow-Me Browsing" (FMB) vs. "Co-Browsing" (COB) technology. Let's go a briefly description:

What's FMB?

This can be considered as one-way interaction. In which, one browser plays a role as host browser and one or more browsers play the role of following browser. Any action taken on host browser will be reflected on following browser(s) simultaneously. Following browser cannot have the control, it's always in the passive mode.

What is FMB used for? This is mostly valuable in case of letting another or other users viewing a document or a presentation over the web page but not letting them taking over the control or modifying any stuff.

Current technology: This can be included in COB services, but previously an add-on tool developed by Advance Reality, Inc. called Jybe pioneered this technology on Real Estate and eMortgage.

What's COB?

This can be considered as all-way interaction. In which, all browsers play the host role as well as the following role as the same time. Any user can take over the control and have the full permission to interact.

What is FMB used for? This is mostly valuable in case of letting everyone sharing the control on a web page.

Current technology: There are many companies going with this technology such as web conference, web presentation, online meeting, etc. All of them go with a compatitive price and let user doing a try for free in 7 to 30 days.

What to do?

I have to do a research on the advantages and disadvantages, the cost of time and human resource used and the difficult level we should obtain when performing this task.

If we can go with FMB, we can face the top difficult level and if we can pass it, that will be greatest thing and also an expected target.

But within the time constraint, we maybe go with COB. This is an easier solution but will cost not only us but our customer money to train their users and to use the existing tools.