Module ajaxstub
[show private | hide private]
[frames | no frames]

Module ajaxstub

Function Summary
  getExamples()
Return a dictionary of the examples used in this page.
  getURL(scriptName)
Get the server's URL and add the port if it is not port 80.
  htmlEnd()
Dump the remaining HTML to standard out.
  htmlStart()
Dump the header et at.
  javascript(script)
Dump the JavaScript to standard out.
  login()
Return the results of choosing the 'Login Example'.
  primeNumbers()
Return the results of choosing the 'Prime Number Example'.
  submit(name, pswd)
Return the results of validating the username and password.
  username(name)
Return the results of validating the username.

Imported modules:
cgi, datetime, os, re, simplejson, sys, time, traceback, types
Imported classes:
AjaxStub, AjaxStubDispatch, PublicAPI, StringIO, StubContainer
Imported exceptions:
AjaxStubException
Imported variables:
regex
Function Details

getExamples()

Return a dictionary of the examples used in this page. The key becomes the option's text property and the value becomes the value property.
Returns:
Dictionary {Option Name: Stub Name}

getURL(scriptName=None)

Get the server's URL and add the port if it is not port 80. If scriptName is not None add it to the URL else add this script to the URL.
Parameters:
scriptName - CGI script that will respond to the page request.
Returns:
The URL that the client will send requests to.

htmlEnd()

Dump the remaining HTML to standard out.

htmlStart()

Dump the header et at. to the page.

javascript(script=None)

Dump the JavaScript to standard out.
Parameters:
script - The response script. See getURL()

login()

Return the results of choosing the 'Login Example'.
Returns:
A dictionary of the JavaScript and HTML code to be executed: {String of JavaScript: String of HTML}

primeNumbers()

Return the results of choosing the 'Prime Number Example'.
Returns:
A dictionary of the JavaScript and HTML code to be executed: {String of JavaScript: String of HTML}

submit(name, pswd)

Return the results of validating the username and password.
Parameters:
name - The username to validate.
pswd - The password to validate.
Returns:
A string indicating a response from the server.

username(name)

Return the results of validating the username.
Parameters:
name - The username to validate.
Returns:
A string indicating a response from the server.

Generated by Epydoc 2.1 on Fri Aug 3 23:25:20 2007 http://epydoc.sf.net