Webmaster Forum

Go Back   Webmaster Forum > Web Development > Coding Forum

Coding Forum Problems with your code? Discuss coding issues, including JavaScript, PHP & MySQL, HTML & CSS, Flash & ActionScript, and more.


Reply
 
Thread Tools Display Modes
Share |
  #1  
Old 05-28-2008, 03:05 PM
I like pie's Avatar
I like pie I like pie is offline
Contributing Member
 
Join Date: 10-12-03
Location: California
Posts: 209
iTrader: 0 / 0%
<button> issues in ie

I have the following code, which works fine in firefox and safari, but no luck in ie (6 or 7):

Code:
<a href="http://www.foohonpie.net/"> <button type="submit">button text here</button> </a>
It's nothing too weird, but ie just does absolutely nothing with it. I'm doing buttons this way to avoid using images. Is the issue here that I shouldn't be using buttons in a non-form context? Or is there some other weirdness that I can hack around to get this working?
 
Reply With Quote

Advertisement

Advertisement

  #2  
Old 05-28-2008, 03:28 PM
HTMLBasicTutor's Avatar
HTMLBasicTutor HTMLBasicTutor is offline
Administrator
 
Join Date: 10-29-07
Location: Canada
Posts: 26,656
iTrader: 5 / 100%
http://www.w3.org/TR/html4/interact/...ml#edef-BUTTON

http://www.w3schools.com/tags/tag_button.asp

http://www.w3.org/TR/html401/interact/forms.html#h-17.5
There's an example on this page how it can be used.
 
Reply With Quote
  #3  
Old 05-29-2008, 06:52 AM
Izzmo's Avatar
Izzmo Izzmo is offline
v7n Mentor
 
Join Date: 11-01-03
Location: Kansas
Posts: 1,356
iTrader: 1 / 100%
Hmm, <button> seems a little outdated. Why not just use <input .. /> ??
 
Reply With Quote
  #4  
Old 05-29-2008, 10:53 AM
I like pie's Avatar
I like pie I like pie is offline
Contributing Member
 
Join Date: 10-12-03
Location: California
Posts: 209
iTrader: 0 / 0%
Because it feels wrong to use an input outside of a form context. I'm not really using the button to "submit" anything, but rather as a plain ol' link. But that's moot, an input wrapped in an anchor has the same problem; works everywhere but IE.

The thing here is, I have some CSS that styles all my real form-buttons beautifully, so I'm trying to take advantage of work that's already been done.

Basically, I want this link to look and feel like my buttons without actually being a form element. I guess I shouldn't do that, but it's a shame. If not for IE, it could be so easy. But what's new there, right?
 
Reply With Quote
  #5  
Old 05-29-2008, 11:07 AM
Izzmo's Avatar
Izzmo Izzmo is offline
v7n Mentor
 
Join Date: 11-01-03
Location: Kansas
Posts: 1,356
iTrader: 1 / 100%
WHy not just use an input, or button, and use javascript? I've never heard of putting a button inside anchor tags.
 
Reply With Quote
  #6  
Old 05-29-2008, 11:55 AM
I like pie's Avatar
I like pie I like pie is offline
Contributing Member
 
Join Date: 10-12-03
Location: California
Posts: 209
iTrader: 0 / 0%
accessibility mainly. i try to design around javascript where i can.

but i suppose this is worse if all of ie users can't click something. gonna have to bite the bullet i guess
 
Reply With Quote
  #7  
Old 05-29-2008, 01:58 PM
Izzmo's Avatar
Izzmo Izzmo is offline
v7n Mentor
 
Join Date: 11-01-03
Location: Kansas
Posts: 1,356
iTrader: 1 / 100%
That's good, but for this, I would really recommend JavaScript. It's perfect for this.
 
Reply With Quote
Go Back   Webmaster Forum > Web Development > Coding Forum

Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with msn button Maa Blog Promotion 9 05-10-2007 11:12 PM
how do i link the button not the box?? CircleOfLinks Web Design Lobby 2 02-21-2007 05:44 AM
refresh button http Web Design Lobby 4 12-06-2006 12:42 AM
geo map button prepsportshq.com Marketing Forum 0 09-13-2006 06:41 PM
Button links.. realestate SEO Forum 6 11-04-2004 09:42 PM


V7N Network
Get exposure! V7N I Love Photography V7N SEO Blog V7N Directory


All times are GMT -7. The time now is 08:01 PM.
Powered by vBulletin
Copyright 2000-2014 Jelsoft Enterprises Limited.
Copyright © 2003 - 2018 VIX-WomensForum LLC