the scenario would be:
* the user clicks on the rectangle
* the javascript creates the textbox on top of the rectangle
* the user enters the data
* the textbox disappears
* the text is displayed in the rect
You can place the textbox in a separate window, but that's probably not that
user friendly.
Is it?
Another, probably easier way is to use javascripts window.prompt() mehod (as
Barend
suggested). That way you get a separate window, provided by the browser, which
allows
the user to enter the text.
ex:
var value = prompt("Please enter a text here", "");
//now use value to create the textbox
--- In [email protected], "chmavrog" <[EMAIL PROTECTED]> wrote:
>
> Hi Andreas,
>
> Can you give me a scenario of how to use it?
> My aim is that:
>
> When i press a rect, with a label "Enter Class Name", i want a new
> window to appear with the textbox in order to fill in the class name.
> Closing the new window the value from the textbox should appear in
> the top of the Class rectange
>
> Do i have to use document referrer to pass the value back to the
> main window?
no, the textbox allows to attach a callback function which gets notified each
time a value
in the textbox changes. And it also has a .getValue() method which allows to
get the value.
Andreas
------------------------ Yahoo! Groups Sponsor --------------------~-->
Get to your groups with one click. Know instantly when new email arrives
http://us.click.yahoo.com/.7bhrC/MGxNAA/yQLSAA/1U_rlB/TM
--------------------------------------------------------------------~->
-----
To unsubscribe send a message to: [EMAIL PROTECTED]
-or-
visit http://groups.yahoo.com/group/svg-developers and click "edit my
membership"
----
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/svg-developers/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/