Skip to main content
Stack Overflow
  1. About
  2. For Teams

Return to Question

I have an HTML page with one button, and I need to execute a python script when we click on the button and return to the same HTML page with the result.

So I need do some validation on return value and perform some action.

Here is my code:

HTML:

<input type="text" name="name" id="name">
<button type="button" id="home" onclick="validate()" value="checkvalue">value="checkvalue"></button>

JS:

function validate(){
 if (returnvalue=="test") alert(test)
 else alert ("unsuccessful")
}

What my python code is doing is some validation on the name entered in the text box and gives the return status.

But I need the result back on the same page, so I can do the form submission later with all the details. Any help will be appreciated

I have an HTML page with one button, and I need to execute a python script when we click on the button and return to the same HTML page with the result.

So I need do some validation on return value and perform some action.

Here is my code:

HTML:

<input type="text" name="name" id="name">
<button type="button" id="home" onclick="validate()" value="checkvalue">

JS:

function validate(){
 if (returnvalue=="test") alert(test)
 else alert ("unsuccessful")
}

What my python code is doing is some validation on the name entered in the text box and gives the return status.

But I need the result back on the same page, so I can do the form submission later with all the details. Any help will be appreciated

I have an HTML page with one button, and I need to execute a python script when we click on the button and return to the same HTML page with the result.

So I need do some validation on return value and perform some action.

Here is my code:

HTML:

<input type="text" name="name" id="name">
<button type="button" id="home" onclick="validate()" value="checkvalue"></button>

JS:

function validate(){
 if (returnvalue=="test") alert(test)
 else alert ("unsuccessful")
}

What my python code is doing is some validation on the name entered in the text box and gives the return status.

But I need the result back on the same page, so I can do the form submission later with all the details. Any help will be appreciated

edited tags
Link
martriay
  • 5.8k
  • 3
  • 32
  • 39

Html button click execute Execute a python script on button click

I have an HTML page with one button, and I need to execute a python script when we click on the button and return to the same HTML page with the result.

So I need do some validation on return value and perform some action.

Here is my code:

HTML:

<input type="text" name="name" id="name">
<button type="button" id="home" onclick="validate()" value="checkvalue" >value="checkvalue">

JS:

function validate(){
 if (returnvalue ="test"returnvalue=="test") alert(test)
 else alert ("unsuccessful")
}

What my python code is doing is some validation on the name entered in the text box and gives the return status.

But I need the result back on the same page, so I can do the form submission later with all the details. Any help will be appreciated

Html button click execute a python script

I have an HTML page with one button, and I need to execute a python script when we click on the button and return to the same HTML page with the result.

So I need do some validation on return value and perform some action.

Here is my code:

HTML:

<input type="text" name="name" id="name">
<button type="button" id="home" onclick="validate()" value="checkvalue" >

JS:

function validate(){
 if (returnvalue ="test") alert(test)
 else alert ("unsuccessful")
}

What my python code is doing is some validation on the name entered in the text box and gives the return status.

But I need the result back on the same page, so I can do the form submission later with all the details. Any help will be appreciated

Execute a python script on button click

I have an HTML page with one button, and I need to execute a python script when we click on the button and return to the same HTML page with the result.

So I need do some validation on return value and perform some action.

Here is my code:

HTML:

<input type="text" name="name" id="name">
<button type="button" id="home" onclick="validate()" value="checkvalue">

JS:

function validate(){
 if (returnvalue=="test") alert(test)
 else alert ("unsuccessful")
}

What my python code is doing is some validation on the name entered in the text box and gives the return status.

But I need the result back on the same page, so I can do the form submission later with all the details. Any help will be appreciated

Loading
Improved code indention
Source Link
Passerby
  • 10.1k
  • 2
  • 37
  • 53
Loading
added 134 characters in body
Source Link
user2058205
  • 1k
  • 2
  • 11
  • 17
Loading
Fixed code formatting
Source Link
Passerby
  • 10.1k
  • 2
  • 37
  • 53
Loading
Source Link
user2058205
  • 1k
  • 2
  • 11
  • 17
Loading
default

AltStyle によって変換されたページ (->オリジナル) /