IWETHEY v. 0.3.0 | TODO
1,095 registered users | 0 active users | 0 LpH | Statistics
Login | Create New User
IWETHEY Banner

Welcome to IWETHEY!

New Does the page need to be updated in response?
If not, you can post the form and simply not return anything. The page doesn't change. If you can ensure the javascript makes whatever changes in the page indicate a post happened, then you don't really need a return. It's flying without a net as far as user feedback ... but I guess you can return something on an error and just accepted valid posts silently. Hmm, interesting idea.
===

Implicitly condoning stupidity since 2001.
New Er, right, but...
I don't want to have a form to post, or a hidden frame, or whatnot, if there's a simple programmatic way to do it.
Regards,

-scott anderson

"Welcome to Rivendell, Mr. Anderson..."
New ?
The user adds some stuff to a form, then we want to send the form contents to the backend ...

I don't want to have a form to post ...

What's wrong with this:
\n<html>\n<head>\n  <script language="javascript">\n<!-- \n    function update_page(){\n      // do stuff to the page to indicate submission\n    }\n// -->\n  </script>\n<body>\n<form name="nullform" action="submit_handler.cgi" method="POST">\n  <input name="foo">\n  <a href="javascript:document.nullform.submit(); update_page()">Link text</a>\n</form>\n</body>\n</html>\n

As long as 'submit_handler.cgi doesn't generate a return, the browser doesn't reload anything. The 'update_page' function handles user feedback, unless there is a problem with the submission that javascript can't handle in which case there is a return that reloads the page.
===


Implicitly condoning stupidity since 2001.
New I think we're going to have to return something.
To indicate if the operation failed or not.
Regards,

-scott anderson

"Welcome to Rivendell, Mr. Anderson..."
New I did something similar
the way I handled it was to have a vertically framed page. The left side was just decoration and held the JavaScript library. The main part of the page was the user interface and was composed by the JavaScript library. When the user made an update, the JavaScript validated the entries and sent the result to the server, the response from the server was essentially a set of JavaScript variable assignments with a call into the library code in the left part of the page. The assignments would happen and the library call would cause the user interface part of the page to be redrawn.

Does that explanation make sense? Does it fit your requirements?
Have fun,
Carl Forde
New The question is:
The part you glossed over:
When the user made an update, the JavaScript validated the entries and sent the result to the server,
That's the mechanism that I'm looking for. :-)
Regards,

-scott anderson

"Welcome to Rivendell, Mr. Anderson..."
     Opening a URL with Javascript without a window - (admin) - (13)
         Not sure if this would work.... - (ChrisR) - (3)
             Or reload a 1x1 image with GET params using Image.src -NT - (FuManChu) - (2)
                 That might work... -NT - (admin) - (1)
                     puller = new Image(); and you can skip including it in body? -NT - (FuManChu)
         Clarification - (drewk) - (7)
             Re: Clarification - (admin) - (6)
                 Does the page need to be updated in response? - (drewk) - (5)
                     Er, right, but... - (admin) - (4)
                         ? - (drewk) - (1)
                             I think we're going to have to return something. - (admin)
                         I did something similar - (cforde) - (1)
                             The question is: - (admin)
         Re: Opening a URL with Javascript without a window - (morganek)

At the tone, the time will be...
64 ms