Solved

Submit problem ?

Posted on 2000-04-04
4
172 Views
Last Modified: 2010-04-09
I got a situation. There is one form but there are a few submit button but else submit button would like to open separate page.. and all data in the form is avaiable to all page that is created by a submit button in the form... how can i do?
0
Comment
Question by:mrvithan
  • 2
4 Comments
 

Accepted Solution

by:
chteril earned 10 total points
ID: 2683351
try this:

<script>
function submitForm(s){
  document.theForm.action=s;
  document.theForm.submit();
}
</script>

<form name='theform'>

<input type='button' value='submit1' onclick='submitForm("page1.html");'>

<input type='button' value='submit2' onclick='submitForm("page2.html");'>



</form>
0
 

Expert Comment

by:qiang8
ID: 2683378
First create the main.html form.

<form name="btn" Action="choose.asp" method="post">

<input type="submit" name="btnSelect" value="a">
<input type="submit" name="btnSelect" value="b">
<input type="submit" name="btnSelect" value="c">

There make the decision where to go at choose.asp

<%
dim toPage

select case request("btnSelect")
case "a"
  toPage = "page1.asp"
case "b"
  toPage = "page2.asp"
case "c"
  toPage = "page3.asp"
end select

response.redirect toPage

%>

I believe this will work well.
0
 

Expert Comment

by:qiang8
ID: 2683398
Opps..., the one I post is a server side scripting.
0
 

Author Comment

by:mrvithan
ID: 2683422
I didn't try it yet? but i quite believe it work
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Do you want to insert HTML5 video into your site? This is the tutorial how to do so. What are the main advantages of HTML5 video? 1) Have good compression, good image quality, and low decode processor use. 2) It is royalty-free 3) It is easi…
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now