0

How to submit a dropdown box value in php without using submit and javascript is that possible or am i wrong.also i dont want to use following way

document.forms["adminorder"].action = "../controller/vieworderprocess.php?name="+combine;
document.forms["adminorder"].submit();
6
  • 1
    why not submit? you can use ajax, but it isn't less complex than plain submit. Commented Jul 2, 2013 at 10:52
  • 1
    use onchange event for the select. like: <select onchange='document.forms["adminorder"].submit()'> Commented Jul 2, 2013 at 10:52
  • @MuhammedHedayet <select onchange='this.form.submit()'> looks much simpler Commented Jul 2, 2013 at 10:54
  • @mpapec: indeed, but I tried to stay close to OP's code :-) Commented Jul 2, 2013 at 10:55
  • @mpapec How to use ajax i don`t know ajax. Commented Jul 2, 2013 at 11:00

4 Answers 4

1

Use window.location.href="../controller/vieworderprocess.php?name="+combine";

Sign up to request clarification or add additional context in comments.

Comments

1

Maybe you can use ajax... is javascript, but you can send a value to a server in async mode... without submit the form

Comments

0

You cant submit a form without either having a submit form or thorough using the submit() function in JavaScript.

Comments

0

You can submit the form using j query form submit() method or java script form submit() method without submit buttons.Or you can use Ajax for sending the necessary values without submit method.

2 Comments

I don't want to use javascript form submit method.
If you dont want to use submit method try with ajax

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.