Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > Popups or callouts for simple data entry

Reply
Thread Tools

Popups or callouts for simple data entry

 
 
bjhess@gmail.com
Guest
Posts: n/a
 
      09-06-2006
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

 
Reply With Quote
 
 
 
 
ASM
Guest
Posts: n/a
 
      09-06-2006
http://www.velocityreviews.com/forums/(E-Mail Removed) 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
 
Reply With Quote
 
 
 
 
bjhess@gmail.com
Guest
Posts: n/a
 
      09-07-2006
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';

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Popups not working, even if Popups are allowed in IE Moe Sisko ASP .Net 1 08-04-2008 03:33 PM
Allowing entry of a Carriage Return during data entry Mike Owen ASP .Net Web Controls 3 07-27-2006 02:34 PM
Form field entry directs to diff URLs based on entry? AtomicBob HTML 14 05-02-2006 07:07 AM
Regular expressions: recursive patterns and callouts Carlos Python 1 01-22-2006 03:56 AM
Being pestered by popups / word lastig gevallen door popups. Martijn Computer Support 21 11-03-2004 06:45 PM



Advertisments