JavaScript Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsWeb DesignJavaScript Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old September 10th, 2001, 03:54 AM
yhcmarc's Avatar
yhcmarc yhcmarc is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2001
Location: Heemskerk, The Netherlands
Posts: 254 yhcmarc User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 53 m 49 sec
Reputation Power: 12
Question navigation with buttons and javascript

I've got a question, when I use something like this

<button onClick='go(window.location.href = "http://somewhere")'>goto</button>

it does work in Explorer and it gives some error but it works, but when using opera or mozilla it doesn't work at all, I cannot even click the buttons.

Thanx

yhcmarc

Reply With Quote
  #2  
Old September 10th, 2001, 07:10 AM
JMM JMM is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Feb 2001
Location: USA
Posts: 830 JMM User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 17 m 56 sec
Reputation Power: 13
Well, a) you're using a non-existent tag, and b) you're using a function that's not really applicable to what you're trying to do. Try this:

Code:
<input type="button" value="goto" onclick="window.location.href=http://somewhere" />


The last time I checked, Opera did not support the button element (pure genius, definitely worth paying for). Alternatively you could do this with an image, a text link, or probably with a submit button. I think the button will not even show up in Netscape if it's not enclosed by form tags.

Reply With Quote
  #3  
Old September 11th, 2001, 01:37 AM
evildj evildj is offline
Beelzebub
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2001
Location: The nether regions...ok, San Diego
Posts: 164 evildj User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 12
JMM...just so you know...the <button> tag can be used in the newer browsers (IE5 & NS6)

So...
<button onclick="window.location.href='http://somewhere'">goto</button> is valid.

You can put anything you want between the button tags, including images, or the whole damn page, try it...its fun.

Last edited by evildj : September 11th, 2001 at 01:58 AM.

Reply With Quote
  #4  
Old September 11th, 2001, 06:44 AM
JMM JMM is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Feb 2001
Location: USA
Posts: 830 JMM User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 17 m 56 sec
Reputation Power: 13
Ah my bad, my bad. Thanks evil. Sorry marc.

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignJavaScript Development > navigation with buttons and javascript

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap