How to disable onclick event using Bottle?

August 10, 2014 at 12:56:35
Specs: Windows 7, 8 Gb

I’m novice to python and Bottle but I’m trying to develop a simple web application which will inventory items in boxes that company receives. Using Bottle I was able to create a form which has 2 text boxes and one ‘Save’ button. I scan box ID and it get into text box1. Then I scan item ID and it get into text box2. Then I click on Save button. It works … but after I click on ‘Save’ the form get reloaded i.e. it open blank page and I have to move back page, delete the content from text box1 and do it again until I switch to the next Box which will start with empty box1 and box2 My request: I want that every time I click on ‘Save’ button it submitted data into my database but the form stay intact i.e. not reloaded and the content of text box1 get empty. Then I could just scan next item and so on until I complete all items. Could please someone help me with that? Here’s how my code look for now in Bottle template:

<form action="/accession" method="GET">
Scan Box: <input type="text" size="18" name="package">      
Scan Item: <input type="text" size="13" name="sample">
<input type="submit" name="save" value="Save" >

See More: How to disable onclick event using Bottle?

Report •

August 23, 2014 at 19:13:24
Well ... discussion could be closed because I resolved the problem myself.

Report •
Related Solutions

Ask Question