Did you sign anything specific about this when you were hired? I ask this because many professional jobs require such things.
I am required to give two months notice before I leave my job. If I don't, my principal has the right to have the state recind my teaching license. Obviously, lots of things come into play with this. A teacher who is in good standing and who leaves for unexpected reasons isn't going to have any problem. On the other hand, a teacher who withholds information and puts the school in a bad spot (without a replacement) might find herself without a license.
Speaking only for myself and my job, if I were looking for another job, I would tell my princpal upfront. I'm assuming I'd be looking for something the following school year -- not mid-year -- and if I were looking to switch schools within my own county, she'd find out anyway. I'd always rather tell things like that myself than have her find out second-hand. When I switched schools a couple years ago, I did tell my principal upfront; I explained that I was moving during the summer and I wanted to teach at the school nearest my house /where my children would attend eventually. He wasn't happy, but he understood.
Way back when my husband started his job, he signed an agreement about whether he can/can't go to a competetor within a certain amount of time. I don't really know the details, but he isn't completely free to go just anywhere. Also, he can't take something he invented on company time along with him (and he holds numerous patents).