473,785 Members | 2,424 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Select value and window popUp

263 Contributor
Hello.

It's possible at this select when you select only the value BBB automatically open a web page in the window popUp ?

Expand|Select|Wrap|Line Numbers
  1. <form method="POST" action="next.asp">
  2.   <p>
  3.   <select size="1" name="D1">
  4.   <option>Select</option>
  5.   <option value="AAA">AAA</option>
  6.   <option value="BBB">BBB</option>
  7.   </select>
  8.  
  9.   <input type="submit" value="GO" name="B1">
  10.   <input type="reset" value="RESET" name="B2">
  11.   </p>
  12.  
  13. </form>
Aug 18 '08 #1
3 1640
acoder
16,027 Recognized Expert Moderator MVP
Yes, you can call a function onchange which checks the value of selected. If it's "BBB", open a pop up window using window.open().
Aug 19 '08 #2
viki1967
263 Contributor
thanks x your answer.

I write this code and working... its right?

Expand|Select|Wrap|Line Numbers
  1. <select size="1" name="D1" onchange="if(this.value=='BBB')window.open('http://myurl.com');">
Aug 19 '08 #3
acoder
16,027 Recognized Expert Moderator MVP
Yes, that should work. If you're later planning to have more than one line of code, it would be better in a function. Anyway, a good job on figuring it out yourself :)
Aug 19 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

6
2997
by: Mica Cooper | last post by:
Hi, I have a series of Select menus on a page. I am trying to allow the user to click on the Select title and have it popup a help window. This works fine with the following code except that all the Select choices are lost. <A HREF="javascript:location='menu.jsp';window.open('menuhelp.jsp?menuID=5','me nuhelp',)">MenuTitle</A> I saw an example of a popup on a website that did not lose the menu choices.
3
6525
by: toufik toufik | last post by:
Hi, I'm using the folowing javascript code to oprn a popUp window msgWindow=window.open('','messageWindow', 'scrollbars=yes,width=300, height=150'); msgWindow.document.open(); msgWindow.document.write(strHTML); msgWindow.document.close(); In this window I've a form containing a text TXTNAME and a button that call another function javascript popUpProcess()
1
5071
by: Tony Farrell | last post by:
Hi Everyone - I have a data entry form that allows the user to click a button and have that button popup a list of available values - the code on the popup window uses the name of the form to determine what field to populate on the opener...
2
1903
by: JonQuark | last post by:
Hi I'm trying to dynamically add content to a select box when it is clicked (because the app that I am developing contains many, many select boxes with huge lists that are just way too slow to populate on page load). I have written code that works fine in gecko based browsers but in Internet Explorer 6 after the select is populated, it is resized and the popup is closed before the user can select an option. I have tried
6
3469
by: passion_to_be_free | last post by:
This is probably simple, but I can't seem to find it anywhere. I have have some values stored in javascript variables. I have a <select> dropdown list whose options correspond to these values. I want to be able to select an item on the dropdown list based on the value of the javascript variable. Let's say this is my list and my variable: <select id='popup'>
4
10490
by: Davey | last post by:
I have a website which has a popup window (this only opens when the user chooses to open it). In the popup window I have a <select> control which lists a selection of "classes". Each class has a description and a class_id (stored in the value attribute of each option). The user will then select a class from the drop-down list. What I want to do is have a control in the parent browser window which can store the class_id and the...
1
3010
by: ABC | last post by:
I has a parent and a popup lookup ASP.NET Form. Both has javascript. I test the popup window's window.Form1.SelectedProductCode.value has a value. But don't know why the return variable "retvar" has not any value pass from popup? -- Parent Windows Script function DoSelectProductCode() { var selectedstr = "";
5
2178
by: GTi | last post by:
Whats wring with this code? <select class=EditField size="1" name="PlantUnitID" title="Select line"> <option value="0" >Standalone Unit</option> <option value="1" selected >Connected Unit 1</option> <option value="1" selected >Connected Unit 2</option> </select> <span onclick="NewWindow('pluginpage.html?EditUnitGUID='+this.form.PlantUnitID.options.value+'&DoPostBack=1','namexx',200,310);"
1
9362
by: Steve M. | last post by:
Hello all. I have a dropdown list: <select name="select" class="mapMenu" onChange="JumpToIt(this)"> <option selected value="none">Select a Tool --</option> <option value="javascript:onCreatePrintable()">Print Map</option> <option value="javascript:onFindLatLong()">Find Lat/Long</option> </select>
0
9647
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9485
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10161
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10098
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8986
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7506
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6743
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5523
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4058
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.