Need help, how to create more than one rectangle from a button in one step of canvas

Dear Guys,

I have a problem to create more than one rectangle from a button canvas. here my role to create:

1. I create entry-level size with textfield

2. I click on the button called "submit query."

3. my web creates a rectangle with specific dimensions.

My problem come when I click on the button again, my old rectangle has been remove from my new rectangle was created.

My question is: How can I create more than one without delete/remove the former I created?

Here is my Code:

<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<link rel="stylesheet" type="text/css" media="all" href="css/style.css">

<script src="kinetic-v4.7.2.min.js"></script>

</head>

 

<body>

<label>Length</label><input name="panjang" id="panjang" type="text" size="5" maxlength="5"><br>

 

<label>Width</label><input name="lebar" id="lebar" type="text" size="5" maxlength="5"><br>

 

<label>Height</label><input name="tinggi" id="tinggi" type="text" size="5" maxlength="5"><br>

 

<label>Packing Name</label><input name="nam_pac" id="nam_pac" type="text" size="5" maxlength="5"><br>

 

<input name="submit" type="submit">

 

<script defer>

              var stage = new Kinetic.Stage({

                container: 'container',

                width: 943.5,

                height: 254.10

              });

              var layer = new Kinetic.Layer();

              var rectX = stage.getWidth() / 2 - 50;

              var rectY = stage.getHeight() / 2 - 50;

             

              var group = new Kinetic.Group({

                draggable: true

              });

             

            

              var box = new Kinetic.Rect({

                x: rectX,

                y: rectY,

                width: <?php echo ($_POST['panjang']/10)/1.3; ?>,

                height: <?php echo $_POST['lebar']/10; ?>,

                //fill: '#00D2FF',

                stroke: 'blue',

                strokeWidth: 2

                //draggable: true

              });

 

              var simpleText = new Kinetic.Text({

                x: Math.round(box.getWidth() / 2),

                y: Math.round(box.getHeight() / 2),

                text: '<?php echo $_POST['tinggi'].'/'.$_POST['nam_pac']; ?>',

                fontSize: 30,

                fontFamily: 'Calibri',

                fill: 'blue',

              });

             

             

              // add cursor styling

              box.on('mouseover', function() {

                document.body.style.cursor = 'pointer';

              });

              box.on('mouseout', function() {

                document.body.style.cursor = 'default';

              });

             

              group.add(box);

              group.add(simpleText);

              layer.add(group);

              stage.add(layer);

            </script>

</body>

 

It's my printscreen can help you help me:

my_web.jpg

Thanks before help me

Kind regards

Prabowo.

My script only deletes the last comic layer. If you copy all and paste into a new document, you should be able to see that it works. You can try this?

--

Kenneth Kawamoto

http://www.materiaprima.co.UK/

Tags: Dreamweaver

Similar Questions

  • How can I create more than one CSS style for the text links?

    Hello

    Just like the title says, I need help to create more than one CSS text link style in Dreamweaver CS4. For example, I want that navigation on the site that I am building to have a style of link different text as a link in a certain part of the body copy. I played with Dreamweaver for awhile and can't find a way to do this. If it is still possible to do so, I'd appreciate any help.

    It is a common requirement in most Web sites.

    It's faster and easier to implement directly in Code view

    Good tutorial here

    http://www.Projectseven.com/Tutorials/CSS/Pseudoclasses/page3.htm

  • HOW AN OPEN MORE THAN ONE WINDOW ON SCREEN SAME TIME?

    In older versions of window, I could easily open several windows on the screen.  With Windows 7, still cannot find out how to have more than one window open at the same time... work very useful when transferring photos around or bank statements to open and my own Quicken data transfer!  Pls advise.

    If you mean a window of Windows Explorer (file)... simply...

    1. open a window and go to the first folder.
    2 - Again open Windows Explorer and navigate to the location 2.
    Tip: Shift + click (or click with the middle button of the mouse) icon in the taskbar to open a 2nd copy of the same program.

    If it was useful, you can vote by clicking on the green triangle. If it solves the problem, click on propose as answer. Thank you!

  • Why we cannot create more than one primary key on a table. Why we create several unique key on a table. Please explain if anyone have details of this.

    Why we cannot create more than one primary key on a table. Why we create several unique key on a table. Please explain if anyone have details of this.

    «a primary key has semantic meaning, it is to be immutable (never change of value), unique and not null.»

    a unique constraint is simply "at any time, these values are unique - they can change and they can be null.

    You use a unique when constraint

    (a) you do not already have a primary key for a table can have only one
    (b) you allow NULL values in attributes
    "(c) to allow you to update the values in the attributes.

    https://asktom.Oracle.com/pls/Apex/f?p=100:11:0:P11_QUESTION_ID:5541352100346689891

  • How to create more than 1000 IUCN in FDQM

    Hi gurus

    1. how to load places to FDQM without manual entry?
    Can load us locations using flat files?

    Requirement: I need to create more than 1000 entities in Application of FDM for mapping target in HFM Application.
    How to get there?

    concerning
    Dev

    Two things:

    #1-tables, you add data to are: tPOVPartition, tStructPartitionHierarchy, tStructPartitionLinks. The first table is the location of basic information. The last two tables define the hierarchy of the relationship where the pitches are. I expect that if missing information Strcut, FDM will not be able to place it anywhere on the display of the locations.

    In addition, for the tPOVPartition, there are information and you must make sure that you include this information when you create your record.

    #2-Si you are at hand to coding, I'm positive there is an API call to create a location. It would be more sensible perhaps to write a script that uses the API to create locations so that you can be sure that it is done right.

  • How to remove more than one favorite at a time or organize my favorites with windows xp?

    whenever I have delete a toic of my favorites, I have to start over again.  Is there a way to select more than one a Favorites saved at the same time?

    Hello

    You can remove / Organize Favorites from C:\Documents and Settings\\Favorites.

    I hope this helps.

  • How to use more than one condition set?

    Dear Sir

    I want to define more than one type of condition and use it together for all objects on the page, for example, page element, button page and etc.

    Is it possible to manage in "PL/SQL tends" to condition type? ("for example = >"Request = Expression'and'current page! = 1 Expression',..) If no response, is please tell me otherwise.

    Kind regards

    Saeed.

    Hi Saeed,

    Saeed reports says:

    I would like to know the conditions CGI and browsers. Can I view the document or essay on the condition type in pl/sql?

    Yes, you can also view the conditions of CGI Environment Variables and browser in "PL/SQL Expression.

    For example:

    • "The condition type" cgi_env SERVER_NAME = Expression 1 "can be transformed into" PL/SQL Expression"as:
    OWA_UTIL.GET_CGI_ENV('SERVER_NAME') = 'MyServer'
    
    • The condition type for browser condtions can be can be transformed into "PL/SQL Expression" as:
    instr(upper(OWA_UTIL.GET_CGI_ENV('HTTP_USER_AGENT')),upper('Firefox/37.0')) > 0
    

    The following is old, but complete documentation on the Types of conditions:

    https://docs.Oracle.com/CD/E14373_01/AppDev.32/e11838/condition.htm#HTMDB25942

    I hope this helps!

    Kind regards

    Kiran

  • How to add more than one electronic signature on a model

    Hi, I searched online and on the Bulletin Board in regard to trying to add more than one additional signature area to the I am working on a form template, which requires more than one signature. I went through the whole process and placed all the boxes of signature for each participant (3 in total), but whenever I send on should be dealt with by my colleagues and we have try to sign, it only allows us to do an e-signature and not the other 2 signatures that must be included with the paperwork. Please can someone advise if there is a step that I might be missing?

    Thank you.

    Hi karlac94348387 ,

    Please provide the application & version of the OS installed on your system.

    Also share you workflow & name of the application using what document is signed.

    If you submit this form using Acrobat application place digital signature fields, make sure that save you the form with Reader features Extended so that if other users have only the Reader app they can fill out the form as well. (File > save as other > Reader Extended PDF > allow more tools)

    You can also place electronic signature fields after the role definition for all participants for the respective fields using "send to the signature" (if you have Acrobat Pro DC continuous version), more on this please refer to the article:- adding form fields. Tutorials

    Send agreements and collecting signatures

    Let me know how it goes.

    Kind regards

    Christian

  • How to use more than one address at the same time?

    The Adobe server page that allows entry of a recipients address should not inform users how to add another address?  We separate them by semicolons? Commas?  Or is it still possible to use more than one address?

    Hi orison123,

    You talk about Adobe send? If Yes, you are absolutely right. Who should be written somewhere I had to double check and was able to send to multiple email addresses separated by commas or semicolons.

    Best,

    Sara

  • How to use more than one page to design a report of similar form?

    Hello
    I'm designing a report of similar shape. and expand the extensible framework to contain the entire page or window like this page:
    Image:! http://up1.m5zn.com/photo/2008/12/21/07/e728mos12.jpg/jpg!

    Now, there is no space in the window to complete the design of the report.
    How the extensible framework to contain more than one page or a single window to complete the design of the report?

    Replace the panels vertical by Page 2 (or more if necessary) for the main page layout model.

  • How to select more than one track

    Hello

    I'm new to Audition and I can't find a way to select more than one clip/track in 2014 Audition multitrack view.  I tried now the shift or command clicking on more than a clip or track, and who doesn't.  I have clips separated on different tracks and I wish I could select them all moving them the same distance.  Is it possible to do this?  Thank you.

    Also, is there something like a "missing manual" online for the hearing?  All I can find are specific tutorials on specific topics.  Thanks again.

    Massi says:

    I tried now the shift or command clicking on more than a clip or track, and who doesn't.

    What operating system do you use? On the PC, the Ctrl key and clicking on the titles is multiple selections, but I don't know if it's the same on Mac computers.

    Oh, and I think that Adobe are looking for an interesting experience. We seem now to be the missing manual, and it's interactive...

  • Slide show, how to select more than one track for background music?

    Hi, my last slide show for about 10 minutes, is it possible that a chosen more than the first track of my music library to play as back ground?  Thank you.  Best bitter

    Could use a music mixing app like garage band to mix two tracks into one.

    R

  • How can I create more than one set of recovery disks?

    I have created a recovery on a set of disks DVD media. As documented, the system will not allow the creation of other sets of recovery media.

    Why is this restriction exist?

    Is there some way to create recovery media sets?

    Hello

    The restriction is simply under the OEM license, but another option to consider is to use disk imaging software - if you are using Windows 7, this facility is shipped with the operating system and can be found by opening windows control panel, open Backup and restore, then click on create a link to the image to start the process - you can also choose the destination of the Image (IE on several external DVDs Hard Drive, etc.).

    Kind regards

    DP - K

  • When I try to reinstall vista family premium, to create more than one partition is greyed out.

    I installed a new 500 GB HD in my notebook and want to partition into two equal parts, one for the OS and the other for stuff.  After formatting the only options available are to a single partition.

    Hi Jesse,.

    Are you booting from the disk and do the installation?

    If you are, then you will need to click on advanced options to get the options to make changes on the HARD disk.

    Now if you have a partition created aldready it give you an option to create a new partition.

    What you need to do is to delete the existing partition and THEN ONLY it will give you the opportunity to create a new partition of the size of your favorite.

    Aldready you could have a partition created and it has no more space available on the disk, the create partition option will greayed out.

    Hope that helps.

    PS Deleting the existing partition wil clear all data and installed programs. So please be sure that you have all important data backed up.

  • How to add more than one VPN in an existing VPN config

    Dear team

    I would like to ask your help fast... am not a Cisco guru, but I would like to know if I can get help on how to add a VPN to an existing one. My company already implemented a VPN site to site with a dealer or partners where they are or sharing some data them and make transactions, but the question is, I am now about to add 2 several other company so that I can create another tunnel VPN to each of them without risk of breakage or unplug the old one that is running. How can I do, can someone help me to implement it?

    Thanks in advance for your help.

    use Cisco 1841 version 7.

    1. now I want to know, is who should I ask for an IP access list? Should I create or I have to ask my partner to put it for me so I can put it in.

    The access list consists of the IP / subnets on your local network and the Remote LAN.  If the source of the ACL will be your local LAN and destination will be the Remote LAN.

    access-list 101 extended allow ip

    2. is the name given by my partner transfer or I have to create it myself.

    The name of game of transformation is locally important.  However, it specifies the encryption standards 2 phase so this part will have to be coordinated with the peer.

    Crypto ipsec transform-set RIGHT aes - esp esp-sha-hmac

    in the foregoing turn together, RIGHT is just a big local name so you can reference it in a card encryption.  ESP esp-ae-sha-hmac is the part of encryption that should be agreed between you and your counterpart. According to the image that you posted would use you esp-3des esp-sha-hmac.

    3. because I see that the strategy of the first customer VPN (partner) is set on 10 policy should I do also each VPN on 10 policy or the policy number is not serious.

    The policy number is a sequence number and is matched in a top to bottom fashion until a match is found.  If no match is found, then Phase 1 will not end and establish the tunnel.  This is important if you have several peers and some of them use different phase 1 settings.  If this is the case, you will need to use different sequence for each policy numbers.

    4. I have also seen that we have life time security association 2 phases one to use?

    Both are used, and they are both at their default values, you don't need to do any configuration for those.

    --

    Please do not forget to select a correct answer and rate useful posts

Maybe you are looking for