HTML form in gadget submits to new window. How can I stop this?

Hi all, I'm new to sidebar gadgets as well as Windows Vista. I'm a web developer, coming from Windows 2000 Pro, where I had a small php-based form that kept track of my hours. In Windows 2000 I was able to add it to my desktop fairly easily with "Active Desktop". It is proving to be somewhat more difficult with Vista Sidebar Gadgets. I was able to create the gadget, and the php form now displays. To do this, I created the .gadget folder in my User directory, then in the html file in that folder, I created an iframe with a source pointing to the php file in my localhost webserver directory. So that's my background...

Anyway, when I try to submit the form, instead of reloading the gadget, it opens the form in a new window. This occurs even when I set the form target to "_self". I read in the microsoftgadgets.com forum somewhere that the gadgets are configured this way on purpose. I was wondering if there was a way around this, or if there was a configuration file somewhere that I could edit so that I can reload the page inside the gadget window.

Thanks all


Answer this question

HTML form in gadget submits to new window. How can I stop this?

  • tovarish

    I figured someone would say that :) I don't have a problem implementing ajax, I think I just wanted to avoid reworking my script.

  • Deepak83

    have a look at http://www.devx.com/DevX/Tip/17500 i hope it helps
  • Aaron Sulwer

    You can post data using the XMLHttpRequest that will be your best bet
  • HTML form in gadget submits to new window. How can I stop this?