By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,843 Members | 2,300 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,843 IT Pros & Developers. It's quick & easy.

Popups or callouts for simple data entry

P: n/a
I am working on an application that includes a screen with a list of
people on the right and a list of groups they can be involved in on the
left. The user can drag-and-drop people from the right to groups on
the left and visa-versa.

I would like to be able to have a quick way for the user to add a new
person in the right-hand list. Preferrably the user could click a
"new" link, a popup or callout would appear and user could enter the
person's name and contact info, click "save" and never leave the screen
through all this. I'm not too concerned about the AJAX code to
dynamically update the list of people - I'll be using prototype.js for
that.

I'm simply looking for a primer on creating that callout code. Does
anyone know of a good starting place?

Thanks,

Barry

Sep 6 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
ASM
bj****@gmail.com a crit :
I would like to be able to have a quick way for the user to add a new
person in the right-hand list. Preferrably the user could click a
"new" link, a popup or callout would appear and user could enter the
person's name and contact info, click "save" and never leave the screen
through all this.
JS :
function showNew() {
var n = document.forms['new'].style;
n.display = n.display==''? 'block' : '';
}
function saveNewMember(Form) {
var memberName = Form.name.value;
var memberContact = Form.contact.value;
// job to add to list(s)
showNew(); // hidde adding form
}

HTML :
<a href="#" onclick="showNew();return false;">Add member</a>
<form
name="new"
style="display:none"
onsubmit="saveNewMember(this);return false;">
<p>Name <input name="name">
<p>Contact <input name="contact">
<p>input type=submit value="Add">
</form>

--
Stephane Moriaux et son [moins] vieux Mac
Sep 6 '06 #2

P: n/a
Thanks for the reply. This did work for the most part (change noted
below). However, I'd also like to create a version where a callout
appears as a layer above the rest of the page rather than inline with
the page. Does anyone have another tip for that type of situation?

Thanks.
ASM wrote:
JS :
function showNew() {
var n = document.forms['new'].style;
n.display = n.display==''? 'block' : '';
}
I changed that last line to:

n.display = n.display=='none' ? 'block' : 'none';

Sep 7 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.