Reply
jave script
Old 04-26-2002, 08:00 PM jave script
Extreme Talker

Posts: 168
Location: Alton , Illinois
This is the code...that im working with...My question is ...how do i make the links open in a new browser ? Like these two links...need them in a new browser ?

<option value="http://www.altonpost.net/bowl/bowlpage.htm"> Bowling Game

<option value="http://www.altonpost.net/blackjack/index.html">
BlackJack




Thanks

Jeff


<HEAD>

<SCRIPT LANGUAGE="JavaScript">

<!-- Original: Alex Tu <boudha1@hotmail.com> -->
<!-- Web Site: http://www.geocities.com/alex_2106 -->

<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->

<!-- Begin
function formHandler(form){
var URL = document.form.site.options[document.form.site.selectedIndex].value;
window.location.href = URL;
}
// End -->
</SCRIPT>
</HEAD>

<!-- STEP TWO: Paste this code into the BODY of your HTML document -->

<BODY>

<center>
<form name="form">
<select name="site" size=1>
<option value="">Go to....
<option value="http://www.altonpost.net/bowl/bowlpage.htm"> Bowling Game
<option value="http://www.altonpost.net/blackjack/index.html">BlackJack
<option value="http://www.jokesgalore.com/members/show.php?flag=2&cat=all&uid=18661">Jokes
<option value="http://www.altonpost.net/stock.htm" target="_blank">Stock Pick</a>
<option value="http://www.lycos.com">Lycos
<option value="http://yahoo.com">Yahoo
</select>
<input type=button value="Go!" onClick="javascript:formHandler(this)">
</form>
</center>

<p><center>
<font face="arial, helvetica" size="-2">Enjoy the Links<br>
by <a href="http://www.altonpost.net">The Alton Post</a></font>
</center><p>
altonpost is offline
Reply With Quote
View Public Profile Visit altonpost's homepage!
 
When You Register, These Ads Go Away!
Old 04-26-2002, 08:53 PM
TimSchroeder's Avatar
Admin/Owner

Latest Blog Post:
RIP eMonetized?
Posts: 6,141
Location: Orlando, FL
Just add:
target ="_blank">
at the end of each of your links...

Example Below

<a href="http://www.webmaster-talk.com" target="_blank">Visit the Webmaster-Talk.com Forums!

You would have:

<option value="http://www.altonpost.net/bowl/bowlpage.htm" target="_blank"> Bowling Game
<option value="http://www.altonpost.net/blackjack/index.html" target="_blank">BlackJack


Let me know if you have any questions...
__________________
Webmaster-Talk Admin - Forum Rules | Other ePressive Websites: PC Forum |eMonetized Blog
Follow Tim Schroeder on Twitter! | Free Magazines


TimSchroeder is offline
Reply With Quote
View Public Profile Visit TimSchroeder's homepage!
 
Old 04-26-2002, 10:06 PM java reply
Extreme Talker

Posts: 168
Location: Alton , Illinois
yep....I did that...didnt work...I had tryed that before....I think Java might be different...weird....hmm..any other suggestions ?

thanks

Jeff
altonpost is offline
Reply With Quote
View Public Profile Visit altonpost's homepage!
 
Old 04-26-2002, 10:16 PM Hey
TimSchroeder's Avatar
Admin/Owner

Latest Blog Post:
RIP eMonetized?
Posts: 6,141
Location: Orlando, FL
Can you post the exact URL of the page/site you got the javascript code from and I'll see if I can get it to work...

Thanks
__________________
Webmaster-Talk Admin - Forum Rules | Other ePressive Websites: PC Forum |eMonetized Blog
Follow Tim Schroeder on Twitter! | Free Magazines


TimSchroeder is offline
Reply With Quote
View Public Profile Visit TimSchroeder's homepage!
 
Old 04-26-2002, 10:26 PM Site and code
Extreme Talker

Posts: 168
Location: Alton , Illinois
Thanks




http://javascript.internet.com/navigation/menu.html




<!-- TWO STEPS TO INSTALL PULLDOWN MENU:

1. Paste the coding into the HEAD of your HTML document
2. Add the last code into the BODY of your HTML document -->

<!-- STEP ONE: Copy this code into the HEAD of your HTML document -->

<HEAD>

<SCRIPT LANGUAGE="JavaScript">

<!-- Original: Alex Tu <boudha1@hotmail.com> -->
<!-- Web Site: http://www.geocities.com/alex_2106 -->

<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->

<!-- Begin
function formHandler(form){
var URL = document.form.site.options[document.form.site.selectedIndex].value;
window.location.href = URL;
}
// End -->
</SCRIPT>
</HEAD>

<!-- STEP TWO: Paste this code into the BODY of your HTML document -->

<BODY>

<center>
<form name="form">
<select name="site" size=1>
<option value="">Go to....
<option value="http://www.yahoo.com">Yahoo
<option value="http://www.metacrawler.com">Metacrawler
<option value="http://www.altavista.digital.com">Altavista
<option value="http://www.webcrawler.com">Webcrawler
<option value="http://www.lycos.com">Lycos
<option value="http://javascript.internet.com">JavaScript Source
</select>
<input type=button value="Go!" onClick="javascript:formHandler(this)">
</form>
</center>

<p><center>
<font face="arial, helvetica" size="-2">Free JavaScripts provided<br>
by <a href="http://javascriptsource.com">The JavaScript Source</a></font>
</center><p>

<!-- Script Size: 1.20 KB -->
altonpost is offline
Reply With Quote
View Public Profile Visit altonpost's homepage!
 
Old 04-26-2002, 10:33 PM ...
TimSchroeder's Avatar
Admin/Owner

Latest Blog Post:
RIP eMonetized?
Posts: 6,141
Location: Orlando, FL
The first error (why it was not working for me) is here:

onClick="java script:formHandler(this)">

make it:

onClick="javascript:formHandler(this)">

Without the space after java....

Next I gotta figure out getting it to open in a new window...
__________________
Webmaster-Talk Admin - Forum Rules | Other ePressive Websites: PC Forum |eMonetized Blog
Follow Tim Schroeder on Twitter! | Free Magazines


TimSchroeder is offline
Reply With Quote
View Public Profile Visit TimSchroeder's homepage!
 
Old 04-26-2002, 11:04 PM thanks
Extreme Talker

Posts: 168
Location: Alton , Illinois
it works just fine...even with the space...just cant get the new window up...ok...keepworking....eheheheh

Thanks

Jeff
altonpost is offline
Reply With Quote
View Public Profile Visit altonpost's homepage!
 
Old 04-26-2002, 11:21 PM hmm
TimSchroeder's Avatar
Admin/Owner

Latest Blog Post:
RIP eMonetized?
Posts: 6,141
Location: Orlando, FL
Didnt work for me with the space, but maybe it was something else.

I've been trying a number of different things to try and get it to open up in a blank window but the darn thing just won't work for me

I'll keep trying...
__________________
Webmaster-Talk Admin - Forum Rules | Other ePressive Websites: PC Forum |eMonetized Blog
Follow Tim Schroeder on Twitter! | Free Magazines


TimSchroeder is offline
Reply With Quote
View Public Profile Visit TimSchroeder's homepage!
 
Old 04-26-2002, 11:33 PM Yeah
Extreme Talker

Posts: 168
Location: Alton , Illinois
Don't give up...This is ridiculous...Ive tryed alot of things myself...

Thanks....If your frustrated it can wait.....

Thanks

Jeff
altonpost is offline
Reply With Quote
View Public Profile Visit altonpost's homepage!
 
Old 04-26-2002, 11:44 PM
TimSchroeder's Avatar
Admin/Owner

Latest Blog Post:
RIP eMonetized?
Posts: 6,141
Location: Orlando, FL
Quote:
Don't give up...This is ridiculous...Ive tryed alot of things myself...
I'll get it. I just don't know if it will be tonight though
__________________
Webmaster-Talk Admin - Forum Rules | Other ePressive Websites: PC Forum |eMonetized Blog
Follow Tim Schroeder on Twitter! | Free Magazines


TimSchroeder is offline
Reply With Quote
View Public Profile Visit TimSchroeder's homepage!
 
Old 04-27-2002, 12:02 AM !
TimSchroeder's Avatar
Admin/Owner

Latest Blog Post:
RIP eMonetized?
Posts: 6,141
Location: Orlando, FL
I got it to work! Sort of...

In the Header change to:

<!-- Begin
function formHandler(form){
var URL = document.form.site.options[document.form.site.selectedIndex].value;
window.location.href = window.open(URL);
}
// End -->
</SCRIPT>

It opens the URLS in new windows, but then causes a 404 error on the goto page...
__________________
Webmaster-Talk Admin - Forum Rules | Other ePressive Websites: PC Forum |eMonetized Blog
Follow Tim Schroeder on Twitter! | Free Magazines


TimSchroeder is offline
Reply With Quote
View Public Profile Visit TimSchroeder's homepage!
 
Old 04-27-2002, 12:11 AM lol
Extreme Talker

Posts: 168
Location: Alton , Illinois
Thats a good one......I think it has something to do with the http:...the code isnt reconizing it...I beleive java has there own codes for windows opening in a new browser....Not sure...keep trying....and you don't need no stinking sleep...heehhehe

Thanks

Jeff
altonpost is offline
Reply With Quote
View Public Profile Visit altonpost's homepage!
 
Old 04-27-2002, 12:19 AM Well
TimSchroeder's Avatar
Admin/Owner

Latest Blog Post:
RIP eMonetized?
Posts: 6,141
Location: Orlando, FL
I know how to use JavaScript to open up links i new windows, just not when it is in a drop down like that.

Sorry, but I'll have to try some more tommorrow.
I'm sure some of our other members know how to do this also (when they find the post)...

Your site is coming along very nicely!
Did Chopper get ahold of you yet?

See YA
__________________
Webmaster-Talk Admin - Forum Rules | Other ePressive Websites: PC Forum |eMonetized Blog
Follow Tim Schroeder on Twitter! | Free Magazines


TimSchroeder is offline
Reply With Quote
View Public Profile Visit TimSchroeder's homepage!
 
Old 04-27-2002, 12:23 AM Hiya
Extreme Talker

Posts: 168
Location: Alton , Illinois
Havent heard from chopper...and thanks for helping...I know you know what your doing...but im a wanna be...and I have to act like I know something...ehheehhe...thanks for the compliment...

Thanks alot

Jeff p.s Dont let the bed scripts bite
altonpost is offline
Reply With Quote
View Public Profile Visit altonpost's homepage!
 
Old 04-30-2002, 12:42 PM alton
TimSchroeder's Avatar
Admin/Owner

Latest Blog Post:
RIP eMonetized?
Posts: 6,141
Location: Orlando, FL
altonpost,

Did you ever figure this out?
__________________
Webmaster-Talk Admin - Forum Rules | Other ePressive Websites: PC Forum |eMonetized Blog
Follow Tim Schroeder on Twitter! | Free Magazines


TimSchroeder is offline
Reply With Quote
View Public Profile Visit TimSchroeder's homepage!
 
Old 05-14-2002, 11:32 PM ooops
Extreme Talker

Posts: 168
Location: Alton , Illinois
sorry....been out of town for awhile...I gave up on that menu and went with a different one !

Thanks anyways
altonpost is offline
Reply With Quote
View Public Profile Visit altonpost's homepage!
 
Old 05-23-2002, 02:14 PM I have a solution!
kline11's Avatar
King Spam Talker

Latest Blog Post:
Back in Time with Google
Posts: 1,281
Name: John
Location: USA
I have a Drop-Menu generator on my site SearchBliss that allows you to open the URLs in a new window using JavaScript. I think you will find the solution using my generator.
kline11 is online now
Reply With Quote
View Public Profile Visit kline11's homepage!
 
Old 06-16-2002, 01:47 PM
Junior Talker

Posts: 4
Location: texas