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

Return to Answer

Commonmark migration
Source Link

You're gonna want to use AJAX and submit the form, then you can access the returned data without ever refreshing the page.

Basically:

#HTML Submative formative

HTML

#JavaScript

<select name="combo" id="combo_1">
 <option value="2">Submative</option>
 <option value="1">formative</option>
</select>

JavaScript

$('#combo_1').change(function() {
 $.post('calcScript.php', $(this).serialize(), function(data) {
 alert(data);
 });
});

in PHP, you can access your combo data via $_POST['combo'].

You're gonna want to use AJAX and submit the form, then you can access the returned data without ever refreshing the page.

Basically:

#HTML Submative formative

#JavaScript

$('#combo_1').change(function() {
 $.post('calcScript.php', $(this).serialize(), function(data) {
 alert(data);
 });
});

in PHP, you can access your combo data via $_POST['combo'].

You're gonna want to use AJAX and submit the form, then you can access the returned data without ever refreshing the page.

Basically:

HTML

<select name="combo" id="combo_1">
 <option value="2">Submative</option>
 <option value="1">formative</option>
</select>

JavaScript

$('#combo_1').change(function() {
 $.post('calcScript.php', $(this).serialize(), function(data) {
 alert(data);
 });
});

in PHP, you can access your combo data via $_POST['combo'].

Source Link
casraf
  • 21.8k
  • 10
  • 60
  • 93

You're gonna want to use AJAX and submit the form, then you can access the returned data without ever refreshing the page.

Basically:

#HTML Submative formative

#JavaScript

$('#combo_1').change(function() {
 $.post('calcScript.php', $(this).serialize(), function(data) {
 alert(data);
 });
});

in PHP, you can access your combo data via $_POST['combo'].

default

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