473,385 Members | 1,927 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

submit with value from select

Hi:

Here is my page, I do not know how to write the onlcik="..." line.

<input type=button value="Submit"
onclick="location.href='http://mypage.html?param=***">

<form>
....
</form>

<select name="param">
<option value=1>1
<option value=2>2
....
</select>

When user click the "Submit" button, I would like to replace the *** in
the link by the value from selection "param". Please not that there is
a form between the button and the selection, so I can not use form for
the button part.

How can I wirte my onclick="..." line?

Thanksm

qq

Jan 9 '06 #1
1 1347
qu******@yahoo.com said the following on 1/8/2006 12:44 AM:
Hi:

Here is my page, I do not know how to write the onlcik="..." line.

<input type=button value="Submit"
onclick="location.href='http://mypage.html?param=***">

<form>
....
</form>

<select name="param">
<option value=1>1
<option value=2>2
....
</select>

When user click the "Submit" button, I would like to replace the *** in
the link by the value from selection "param". Please not that there is
a form between the button and the selection, so I can not use form for
the button part.

How can I wirte my onclick="..." line?


You write it by reading my other reply to your other post that you
posted just a little while ago.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Jan 9 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Stephen Witter | last post by:
I have two asp pages. Both have similar purposes. I am trying to get the inline frame in both pages to update (submit) when a user clicks on a drop-down box (I would prefer the change or after...
4
by: Eric | last post by:
Hey Everyone.. I have a form that has approximately 7 text fields and 1 checkbox. Generally when this form is submitted(to itself BTW) it works fine, however, when the checkbox is only field...
2
by: DB | last post by:
Hi All Having stared at this all morning and altered various things with no effect other then to exasperate the problem i'm wondering if anyone could take a look at the code below and see why on...
4
by: Ike | last post by:
Oh I must be missing somethign so simple and stupid. I need to do a submit() via an href, which I do (succesfully) in JavaScript in many other pages with <a...
7
by: Bosconian | last post by:
I have a simple search form inside a table with 2 selects and text and submit inputs. When entering a string into the text input and hitting return (without tabbing to and clicking "Submit") the...
2
by: a10392 | last post by:
Hi, I'am triyng to create a form where i have 2 comboBox and 2 textbox, when the selection changes on the first combo , the content of second also changes. i have to use onchange=form.submit() ...
2
by: somaskarthic | last post by:
Hi In my php code , i dynamically created table rows on button click event. Each row contain 3 selectboxes, 7 checkboxes . On each click of these elements i need to submit the form and save the...
3
by: chifm | last post by:
Hi ALL, I dont know much about php, but have got a long form that i need to split into two pages, i want to have the inputs from the page 1 past to page 2 and all submitted via email at the end. I...
2
by: sbettadpur | last post by:
Hi everybody, Hi iam strugling with more than one submit buttons with in one form here is my code <form method="post" action="Offer.php" name='issueFrm' onSubmit="return fullOfferfields();">...
15
by: colyn7 | last post by:
I really can't see what's wrong in my code... the submit() onChange doesn't work.. I've tried.. <select name="ddlTestCenter" id="ddlTestCenter" style="width:180px"...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.