Welcome to TalkGraphics.com
Page 3 of 4 FirstFirst 1234 LastLast
Results 21 to 30 of 34
  1. #21
    Join Date
    Apr 2012
    Location
    SW England
    Posts
    17,814

    Info Re: Xara Designer Pro X / Text Entry Field?

    Quote Originally Posted by BerndR View Post
    First, I do not get an input field placed?
    When I do the preview, I see the field only as a text field and not as an input field.
    Great that I want to help so many !!!
    Thank you in advance :-)
    BerndR, here is an updated design file - JS - Jumping Pages-2.xar.

    You need to Preview it with Preview website (F5) so all three pages are rendered.
    The black box contains all the code. All you have to do is add pages 100 through 999 as the Page filename.

    Acorn
    Acorn - installed Xara software: Cloud+/Pro+ and most others back through time (to CC's Artworks). Contact for technical remediation/consultancy for your web designs.
    When we provide assistance, your responses are valuable as they benefit the community. TG Nuggets you might like. Report faults: Xara Cloud+/Pro+/Magix Legacy; Xara KB & Chat

  2. #22
    Join Date
    Feb 2019
    Posts
    14

    Default Re: Xara Designer Pro X / Text Entry Field?

    Hi!

    The first is now running :-)

    But Now i Need a Input field wich a decimal Input...

    It will nor be running!?!?!
    __________________________________________________ _______________

    <input style="height:45px;width:230px;font-size: 1rem;font-family:Verdana;background:#FFECECEC;border-radius:8px; text-align:center;" id="jumptopagebodymass"; type="number"; pattern="[0-9]+([,\.][0-9]+)?; min="1,0"; step="0,1"; lang="de" ; placeholder="Ihr persönlicher Wert";" wi>

    <div <br> <br> </div>

    <button style="height:55px;width:235px;font-size: 1rem;font-family:Verdana;transform: scale(0.99);border-radius:8px;background:#a6a6a6;color:#FFFAFA;" id="btnGobodymass" onclick="goJumpbodymass()">Auswerten</button>

    <script>
    var pageinput = document.getElementById("jumptopagebodymass");
    pageinput.addEventListener("keyup", function(event) {
    if (event.keyCode === 13) {
    event.preventDefault();
    document.getElementById("btnGobodymass").click();
    }
    });

    function goJumpbodymass() {

    var page = jumptopagebodymass.value;
    if (page > 1,0 && page < 100,0)
    {
    if (page < 18,5) {
    location.href = "body-mass-1.htm";
    } else if (page > 24,9 && page < 30,0) {
    location.href = "body-mass-2.htm";
    } else if (page > 29,9 && page < 35,0) {
    location.href = "body-mass-3.htm";
    } else if (page > 34,9 && page < 40,0) {
    location.href = "body-mass-4.htm";
    } else if (page > 39,9) {
    location.href = "body-mass-5.htm";
    } else {
    location.href = "body-mass-index.htm";
    }
    }
    else {
    location.href = "index.htm";
    }


    }
    </script>

    __________________________________________________ _______________

    Where is the bug?

    Best Regards

    Bernd

  3. #23
    Join Date
    Feb 2019
    Posts
    14

    Default Re: Xara Designer Pro X / Text Entry Field?

    Input Example: "18" / "30,5" / "45,2" / "15,5"…. then jump to the Right page….

  4. #24
    Join Date
    Aug 2010
    Posts
    533

    Default Re: Xara Designer Pro X / Text Entry Field?

    You would need to use a (.) Instead of a (,)

  5. #25
    Join Date
    Feb 2019
    Posts
    14

    Default Re: Xara Designer Pro X / Text Entry Field?

    but I need as input a ","

    Can I do this in a "." convert?

    var page = jumptopagebodymass.value.replace… is not working…?

  6. #26
    Join Date
    Apr 2012
    Location
    SW England
    Posts
    17,814

    Default Re: Xara Designer Pro X / Text Entry Field?

    I would look for an existing German BMI from and copy that across.
    Javascript used a ',' as the decimal point.

    Try, page = page .replace(/,/g, '.');
    Then set all the number ranges in you if then elseif statements to decimal dots.

    Acorn
    Acorn - installed Xara software: Cloud+/Pro+ and most others back through time (to CC's Artworks). Contact for technical remediation/consultancy for your web designs.
    When we provide assistance, your responses are valuable as they benefit the community. TG Nuggets you might like. Report faults: Xara Cloud+/Pro+/Magix Legacy; Xara KB & Chat

  7. #27
    Join Date
    Feb 2019
    Posts
    14

    Default Re: Xara Designer Pro X / Text Entry Field?

    this will not working?

    __________________________________________________ __

    <input style="height:45px;width:230px;font-size: 1rem;font-family:Verdana;background:#FFECECEC;border-radius:8px; text-align:center;" id="jumptopagebodymass"; type="number"; placeholder="Ihr persönlicher Wert";" wi>

    <div <br> <br> </div>

    <button style="height:55px;width:235px;font-size: 1rem;font-family:Verdana;transform: scale(0.99);border-radius:8px;background:#a6a6a6;color:#FFFAFA;" id="btnGobodymass" onclick="goJumpbodymass()">Auswerten</button>

    <script>
    var pageinput = document.getElementById("jumptopagebodymass");
    pageinput.addEventListener("keyup", function(event) {
    if (event.keyCode === 13) {
    event.preventDefault();
    document.getElementById("btnGobodymass").click();
    }
    });

    function goJumpbodymass() {

    var page = jumptopagebodymass.value;
    page .replace(/,/g, '.');

    if (page > 1.0 && page < 100.0)
    {
    if (page < 18.5) {
    location.href = "body-mass-1.htm";
    } else if (page > 24.9 && page < 30.0) {
    location.href = "body-mass-2.htm";
    } else if (page > 29.9 && page < 35.0) {
    location.href = "body-mass-3.htm";
    } else if (page > 34.9 && page < 40.0) {
    location.href = "body-mass-4.htm";
    } else if (page > 39.9) {
    location.href = "body-mass-5.htm";
    } else {
    location.href = "body-mass-index.htm";
    }
    }

    else {
    location.href = "index.htm";
    }


    }
    </script>

    __________________________________________________

  8. #28
    Join Date
    Apr 2012
    Location
    SW England
    Posts
    17,814

    Default Re: Xara Designer Pro X / Text Entry Field?

    You entered "page .replace(/,/g, '.');" it has to be
    page = page.replace(/,/g, '.');
    TG added the space!

    Acorn
    Acorn - installed Xara software: Cloud+/Pro+ and most others back through time (to CC's Artworks). Contact for technical remediation/consultancy for your web designs.
    When we provide assistance, your responses are valuable as they benefit the community. TG Nuggets you might like. Report faults: Xara Cloud+/Pro+/Magix Legacy; Xara KB & Chat

  9. #29
    Join Date
    Feb 2019
    Posts
    14

    Default Re: Xara Designer Pro X / Text Entry Field?

    Sorry, your Right ;-)

    Many Thanks for the Hint :-))))))

  10. #30
    Join Date
    Feb 2019
    Posts
    14

    Default Re: Xara Designer Pro X / Text Entry Field?

    Now a i have a litte problem with a radio button :-(

    __________________________________________________ ____________________

    <div id="MyGeschlecht">

    <input type="radio"; id="rbmaenlich"; checked; style="height:15px; width:30px; name="Geschlecht";>
    <label style="font-size: 1rem; fontWeight = 'bold'; font-family:Verdana;background:#FFECECEC;border-radius:8px;" ; for="rbmaenlich"> männlich</label>
    </input>

    <input type="radio"; id="rbweiblich"; style="height:15px; width:30px; name="Geschlecht";>
    <label style="font-size: 1rem; fontWeight = 'bold'; font-family:Verdana;background:#FFECECEC;border-radius:8px;"; for="rbweiblich"> weiblich</label>
    </input>

    </div>


    __________________________________________________ ___________________

    On this code a can click on both radio button... but why?

    Normal only one radio button can by active...

 

 

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •