How do I add a GO button to these multi combo boxes?

This is a discussion on "How do I add a GO button to these multi combo boxes?" within the JavaScript Forum section. This forum, and the thread "How do I add a GO button to these multi combo boxes? are both part of the Program Your Website category.



 Subscribe in a reader

Go Back   Webforumz.com > Main Forums > Program Your Website > JavaScript Forum

Notices


Reply
 
LinkBack Thread Tools
  #1  
Old Jul 28th, 2005, 21:39
Reputable Member
Join Date: May 2005
Location: Sheffield
Posts: 107
Thanks: 0
Thanked 0 Times in 0 Posts
How do I add a GO button to these multi combo boxes?

I am experimenting with this script found here:

http://www.javascriptkit.com/script/...plecombo.shtml

In the last box I have a URL assigned to each name.

How do I add a GO button to the end of this which will open the url in the CURRENT window please?

I have used this function before:

Code: Select all
function go(){
newwindow=window.open("")
newwindow.location=temp.options[temp.selectedIndex].value

}
if possible I would like to use something like this but not opeing in a new window.
.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

  #2  
Old Jul 29th, 2005, 04:03
Most Reputable Member
Join Date: Jul 2003
Posts: 1,856
Thanks: 0
Thanked 0 Times in 0 Posts
Code: Select all
function go(){ 
window.location=temp.options[temp.selectedIndex].value 
}
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3  
Old Jul 29th, 2005, 09:00
Reputable Member
Join Date: May 2005
Location: Sheffield
Posts: 107
Thanks: 0
Thanked 0 Times in 0 Posts
That does not work because the temp variable is not defined anywhere. That function was an example from something else and is not related to this.

By pressing the button it does nothing. I need to reference the last combo box somehow?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4  
Old Jul 29th, 2005, 09:24
Reputable Member
Join Date: May 2005
Location: Sheffield
Posts: 107
Thanks: 0
Thanked 0 Times in 0 Posts
I have be playing around and have this code:

Code: Select all
var temp=document.menu2.combo2

function go(){

temp.options[0].selected=true

newwindow=window.open("")
newwindow.location=temp.options[temp.selectedIndex].value

}
This opens a new browser window with a URL ....com/0
So it appears to be referencing the options[0] part.

I have this function which changes the combo boxes:

Code: Select all
function change(currentbox) {
	numb = currentbox.id.split("_");
	currentbox = numb[1];

    i=parseInt(currentbox)+1
Maybe combininig these somehow would work??
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5  
Old Jul 29th, 2005, 20:03
Most Reputable Member
Join Date: Jul 2003
Posts: 1,856
Thanks: 0
Thanked 0 Times in 0 Posts
Maybe try

Code: Select all

function go(){ 

var temp=document.menu2.combo2 

window.location=temp.options[temp.selectedIndex].value 

}
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
add, button, these, multi, combo, boxes

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Multi-league and Multi-tiered team schedule overkil6 Website Planning 3 Jun 17th, 2008 22:04
Help! Flash CS3 - Combo Boxes with formulas cocoonfx Flash & Multimedia Forum 0 Apr 2nd, 2008 02:43
6-level combo boxes Phoenix1664 JavaScript Forum 2 Mar 21st, 2007 12:22
grabbing data from combo boxes benbacardi Classic ASP 2 Jan 25th, 2005 13:46
Annoying Linked Combo Boxes!! Hangs Classic ASP 7 May 25th, 2004 07:21


All times are GMT. The time now is 23:40.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42