Hello Jez, yes, there is an easier way.
Firstly, I'm not sure if you're using the word
form correctly. You mention get and post operations but they way you describe a form, it seems more like a page form rather than an HTML
FORM tag.
With the HTML FORM tag, you would do a submit. Basically, this just saves you the trouble of fashioning the HTTP request string yourself. It appends all the form's object values to the request string for you. So your example above isn't quite correct.
However, you can dispense with a form and do the whole operation yourself. For example, I did this recently with a grid and some buttons which did actions from the grid -
function buttoncallback()
{
var val = obj1.getSelectedRows()
if (val.length != 1)
alert("Please select a row")
else
{
var foo = devdata[val]
window.location.assign("/cgi-bin/graph?CSERVER="
+ foo[1].replace(/\s+$/,"") + "&DEVICE=" + foo[2])
}
}
So you can use window.location.assign (or its variants) to load a new window without creating a form to do it. This matches what your example does.
However, from what you are describing, it seems you might actually want to use AJAX methods to change some details on an existing page. Have a look at this -
http://www.activewidgets.com/aw.http.request/
Also, you might want to check your use of
localhost.
Regarding your last problem, I'm not entirely sure I understand what you're describing. Practically all the AW objects are built using spans. The tabs use divs, however. Are you saying your buttons appear on the first tab's div or on the main encompassing div?
You could try placing your buttons outside the divs. But would depend on what you're doing. Try starting a new thread here
http://www.activewidgets.com/ui.tabs/ and post some code to illustrate your problem better.
Note that the Firebug plugin debugger for FireFox is very handy for working out what's going on with more complicated objects like tabs.