473,396 Members | 2,020 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,396 software developers and data experts.

Select an option in a form with javascirpt

In this page by example, I have a form with options to secet the right panel
http://www.jmrw.com/Chess/Bron/base.htm

<form>
<center>
<select name="" onChange="LoadNextPage(this.selectedIndex,0);Resse t=1;">
<option>&nbsp;Bron,V - 1927-1&nbsp;
<option>&nbsp;Bron,V - 1927-2&nbsp;
....
<option>&nbsp;Bron,V - 1948-6
</select>
</center>
</form>

I would like to open the page http://www.jmrw.com/Chess/Bron/base.htm with a
option of my choice (0, 1, ...,26) from a another page html with
javascript.and not on clicking the label of the option.

I hope my explanations are clear.

I don't know if it is possible but it would be very useful for me.

If you can help me thanks veyr much.

JMR
May 22 '07 #1
2 1451
On May 22, 2:08 am, "Tantale" <D...@ifrance.comwrote:
In this page by example, I have a form with options to secet the right panelhttp://www.jmrw.com/Chess/Bron/base.htm

<form>
<center>
<select name="" onChange="LoadNextPage(this.selectedIndex,0);Resse t=1;">
<option>&nbsp;Bron,V - 1927-1&nbsp;
<option>&nbsp;Bron,V - 1927-2&nbsp;
...
<option>&nbsp;Bron,V - 1948-6
</select>
</center>
</form>

I would like to open the pagehttp://www.jmrw.com/Chess/Bron/base.htmwith a
option of my choice (0, 1, ...,26) from a another page html with
javascript.and not on clicking the label of the option.

I hope my explanations are clear.

I don't know if it is possible but it would be very useful for me.

If you can help me thanks veyr much.

JMR
Tantale,

the best thing you can do is the chain events. Because you can change
the selection with javascript but nothing will happen, since the
change does not come from the DOM. Many library allow you to make your
own events.

If you don't mind using MooTools, this framework has a method
fireEvent() [http://docs.mootools.net/Element/Element-Event.js] that
can help you.

May 22 '07 #2
May I suggest reading this article: http://www.htmlgoodies.com/beyond/ja...le.php/3471111

It will explain some client side code you will have to implement in
order to pass these variables using javascript. However, have you
thought about using Server Side Scripting, such as ASP/PHP??

Hope this helps!
On May 22, 2:08 am, "Tantale" <D...@ifrance.comwrote:
In this page by example, I have a form with options to secet the right panelhttp://www.jmrw.com/Chess/Bron/base.htm

<form>
<center>
<select name="" onChange="LoadNextPage(this.selectedIndex,0);Resse t=1;">
<option>&nbsp;Bron,V - 1927-1&nbsp;
<option>&nbsp;Bron,V - 1927-2&nbsp;
...
<option>&nbsp;Bron,V - 1948-6
</select>
</center>
</form>

I would like to open the pagehttp://www.jmrw.com/Chess/Bron/base.htmwith a
option of my choice (0, 1, ...,26) from a another page html with
javascript.and not on clicking the label of the option.

I hope my explanations are clear.

I don't know if it is possible but it would be very useful for me.

If you can help me thanks veyr much.

JMR

May 22 '07 #3

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

Similar topics

1
by: Michael Hoffmann | last post by:
Hello, As you might guess I am completely new to this language. Maybe I get some help here. I try to execute a user defined funciton from a select option in a document to read a file into an...
19
by: Neal | last post by:
I can have a visitor choose a subject line for an email. <div><label for="subject">Subject:</label><br /> <select class="form" id="subject" name="subject"> <option value="one">One</option>...
4
by: Jeff Anderson | last post by:
Is there a style for a select option's "selected" color? For example: <HTML> <BODY> <FORM NAME="form1"> <SELECT NAME="mySelect" SIZE="7" style="background-color:red;"> <OPTION>Test 1...
4
by: Old Lady | last post by:
Hi, I need help! I have a SELECT/OPTION list. My goal is to have a TEXT input field in a form that is normally disabled, but it should become enabled when the user select one predefined OPTION....
11
by: Stefan Finzel | last post by:
Hi trying to remove one or all elements of select options fails for Pocket Internet Explorer. Is there a way to do this? if is_PIE { // this does not work on Pocket IE while (opt.length) {...
2
by: shagy | last post by:
Hi, I'm having a problem with a <select><option> which has white space in values... When I post the data I only get the first word (up to the white space). "Testing white space" becomes...
1
by: kirke | last post by:
I want to load textarea's value in drop-down box. In first page, such form is existed. <form name="form1" method="post" action="next.php"> <textarea name="dayList" Id = "dayList" cols=20...
3
by: pravinnweb | last post by:
Hi i have select option in my page which works fine in firefox in which i mention specific width for select option when i clicked select list the option lengths are large the option area is expanded...
7
by: fsalvador | last post by:
Hi, I am trying to figure it out how to to hide in onmouseout the select options of a form. Below is the code I got so far. It isn't working. Please help. Thanks <!DOCTYPE HTML PUBLIC...
2
by: saurabh moses | last post by:
hi can anybody help me on <select> option in website I have multiple option bar with multiple choices i want when i select one choice in one bar it show only related choices on another option bar....
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.