Is there a layout tool to use where I could input random numbers on a page and they will auto set
to ascending. ( total numbers could be 50 are more )
Lets say I have
1345 ... 1567 ... 1824 ... 2020 ...
Then I input 1649 and the layout would adjust to
1345 ... 1567 ... 1649 ... 1824 ... 2020
Best layout tool to use for ascending numbers ?
Forum rules
IMPORTANT NOTE!!
DO YOU HAVE A QUESTION OR PROBLEM AND WANT QUICK HELP?
THEN PLEASE SHARE A "DEMO" PROJECT.
PLEASE READ THE FORUM RULES BEFORE YOU POST:
http://www.wysiwygwebbuilder.com/forum/viewtopic.php?f=12&t=1901
MUST READ:
http://www.wysiwygwebbuilder.com/getting_started.html
WYSIWYG Web Builder FAQ
IMPORTANT NOTE!!
DO YOU HAVE A QUESTION OR PROBLEM AND WANT QUICK HELP?
THEN PLEASE SHARE A "DEMO" PROJECT.
PLEASE READ THE FORUM RULES BEFORE YOU POST:
http://www.wysiwygwebbuilder.com/forum/viewtopic.php?f=12&t=1901
MUST READ:
http://www.wysiwygwebbuilder.com/getting_started.html
WYSIWYG Web Builder FAQ
- BaconFries
-
- Posts: 5867
- Joined: Thu Aug 16, 2007 7:32 pm
Re: Best layout tool to use for ascending numbers ?
Sorry there is no specific layout tool as this will require a custom solution with the likes of javascript.
- BaconFries
-
- Posts: 5867
- Joined: Thu Aug 16, 2007 7:32 pm
Re: Best layout tool to use for ascending numbers ?
With a little help of AI you can try the following:
Using the HTML Object insert the following using between the <body></body> tags* and place the object where you wish on the page.
Copy the following and add inside of a text file save as script.js. Now you need upload to your host/server you can do this manually or you can use the File Publisher Object and add to it and then publish the page. Note that this is provided untested and for information only
Using the HTML Object insert the following using between the <body></body> tags* and place the object where you wish on the page.
Code: Select all
<input type="text" id="numberInput" placeholder="Enter numbers separated by commas">
<button onclick="sortUserInput()">Sort Numbers</button>
<div id="numbers-container"></div>
<script src="script.js"></script>
Code: Select all
function sortUserInput() {
// Get the user input from the text field
const input = document.getElementById('numberInput').value;
// Split the input into an array of numbers
const numbers = input.split(',').map(Number).filter(num => !isNaN(num));
// Sort the numbers in ascending order
const sortedNumbers = numbers.sort((a, b) => a - b);
// Display the sorted numbers
const numbersContainer = document.getElementById('numbers-container');
numbersContainer.innerHTML = `<p>Original Numbers: ${numbers.join(', ')}</p>`;
numbersContainer.innerHTML += `<p>Sorted Numbers: ${sortedNumbers.join(', ')}</p>`;
}