Tuesday, September 02, 2008

Cancel Postback

Not using submit, not using confirm, but want to use javascript to validate inputs and have have the postback cancelled the server side executions? Normally people complain the returning true or false not working as always. I have encountered the same problem before, but simply figure out why.

Server Side Code:
// register the javascript onclick event on page load
// the magic happened here: RETURN
// it's the key to put the RETURN, or you won't get any returning values
// from the javascript functions.
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
btnSearch.Attributes.Add("onclick", "return validate();");
}

}
ASP Code:

< button="" id="btnSearch" runat="server" text="Search" onclick="btnSearch_Click">


Client Side scripts:
function validate(){

var Comment = document.getElementById('Comment');
if (stop!=0){
Comment.text = "Selection required: " + err;
return false;
}else{
return true;
}
}

Labels: , , ,

Wednesday, July 16, 2008

Where the hell is the iPhone?

if it's out of stock, then don't say it on July 11. well, anyway, I will wait um....6 months. hope it comes out a better version.

Wednesday, February 20, 2008

Another toy - HTC Touch

The best smart phone I have ever used. It's highly compatible of 3rd party application installed and small but with big touch screen as iPhone. I am not trying to argue that iPhone and Touch, which is better. They both got their strength. Frankly, I was also fascinated on apple's products that all my notebooks are apples' and iPod of course. However, the iPhone was really disappointed me as it couldn't be running as an independent OS and it's highly depended on WI-FI that the subscribers couldn't get high quality internet access in remote area. Or probably that's the reason of iPhone hasn't been launched in Canada so far.

The only draw back of HTC-Touch is the gravity sensor and gesture commands not that perfectly design as iPhone, but they improved it on the cruiser version.

Monday, June 04, 2007

NES Emulator for the Q

hohooo...found something interesting finally. Nintendo's old school games available for MS Mobile 5, which means my Q could play around, eh? Like Contra, Super Mario, Duck Hunt, ...

Now I need to buy an SD for the smartphone, the called mini or micro whatever. Found some in factorydirect.ca, very cheap. just $19 include the adaptor. But don't know where the factorydirect is. Anyway, I will find it out. Because I need another USB adaptor as well, whcih I have to take it from Ottawa. Anyway, I will get it in two weeks.

I don't put any hope on my mac to be able to connect the smartphone that having windows mobile installed. Fortunatly, I have got a PC laptop from the company I worked. Kind of relief that I don't need to buy another PC for none-sense. Honestly, I don't want to buy a PC with my own money. Well, I would buy an iPhone for myself when the market cooled down a bit. So, gonna suffer the Motorola Q for a year.

Labels:

Sunday, June 03, 2007

Got a Motorola Q smartphone

Associated with my personality, picky & skeptical, or you may call curiosity, I am just looking for the bad site of this toy. btw, I am not the guy who paid this toy and the services came with it, so basically I have no choice of getting this product. Probably I could ask for another model with Palm OS, such as Treo 700p.

The first thing was the short life battery, 5 hours, done. I was just opening the msn chatting with my honey on my way back home from Toronto to Ottawa. And it was a thick battery, the chuncky one. Damn! So upset about that. So every time I am going out of my cubic for more than 5 hours, I must have a backup battery with me. Ok, lets say you were out of work at 5pm, go for dinner with your friend, and go for couple drink after that, it was 12 o'clock at night. Then you realized that your cell phone ran out of battery and even couldn't make a call for the cab or anybody else but the cops. That was so fuck up. eh?
Without long last battery, I dare not u use it to play any games, watch vedio clips, or listen MP3 musics. Basically it was sounds like nothing to me.

Yes, it could view the powerpoints, word, excel such microsoft office files, but you cann't edit them and sent it back. Still kind of step back.

It's not compatible with my Mac that I am really hate it , huh...windows mobile.

I haven't reviewed the BlackBerry products.

Labels: