Forum Moderators: open

Message Too Old, No Replies

Hyperlink trouble on input elements

         

Credo

4:53 am on Nov 25, 2004 (gmt 0)

10+ Year Member



I am using Frontpage 2002, I have IE 6.0 with XP sp2 and for the life of me I cannot figure out why the hyperlinks that I have attached to the hover buttons will not work in an IE browser, but everything is as clock work when I use Firefox, Netscape and Opera. Also when I place the curser over the link it points to the correct url, but click it and nothing happens? I can also manually type the path in the address bar and it goes to the specified location. This is only taking place in an IE browser of any version. Could someone please advise.

BjarneDM

8:38 am on Nov 25, 2004 (gmt 0)

10+ Year Member



we need to see the actually generated code
please post it here for a link

Credo

4:47 am on Nov 26, 2004 (gmt 0)

10+ Year Member



</p>
<p align="center">&nbsp;</p>
<p align="center"><img border="0" src="6225_logo_final.jpg" width="503" height="185"></p>
<p align="center"><a href="News.htm">
<input type="button" value="News" name="B1" style="color: #4E3A01; font-family: QuickType II Mono; font-size: 14pt"></a>&nbsp;&nbsp;&nbsp;&nbsp;
<a href="Photos.htm">
<input type="button" value="Pictures" name="B3" style="color: #4E3A01; font-family: QuickType II Mono; font-size: 14pt"></a>&nbsp;&nbsp;&nbsp;&nbsp;
<a href="SampleTunes.htm">
<input type="button" value="Daily Tune" name="B2" style="color: #4E3A01; font-family: QuickType II Mono; font-size: 14pt"></a></p>

mrnoisy

7:54 am on Nov 26, 2004 (gmt 0)

10+ Year Member



This seems to work:

<p align="center">&nbsp;</p>
<p align="center"><img border="0" src="6225_logo_final.jpg" width="503" height="185"></p>
<div style="text-align:center">
<form action="news.html" style="display:inline">
<input type="submit" value="News" name="B1" style="color: #4E3A01; font-family: QuickType II Mono; font-size: 14pt">
</form>&nbsp;&nbsp;&nbsp;&nbsp;
<form action="Photos.htm" style="display:inline">
<input type="submit" value="Pictures" name="B3" style="color: #4E3A01; font-family: QuickType II Mono; font-size: 14pt">
</form>&nbsp;&nbsp;&nbsp;&nbsp;
<form action="SampleTunes.htm" style="display:inline">
<input type="submit" value="Daily Tune" name="B2" style="color: #4E3A01; font-family: QuickType II Mono; font-size: 14pt">
</form>
</div>

Credo

8:12 pm on Dec 2, 2004 (gmt 0)

10+ Year Member



Thanks for the input, it works, but now every button goes to the same page?

I'm sure it's obvious that I'm extremely new to all this, but why is it that it will work in all other browsers except for IE?

mrnoisy

1:14 am on Dec 3, 2004 (gmt 0)

10+ Year Member



Just change the form action for each link to the page you want to link to eg "news.html"

<form action="news.html" style="display:inline">

why is it that it will work in all other browsers except for IE?

Ask Bill Gate$

rocknbil

3:16 am on Dec 3, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I think (maybe?) part of your problem is using the links in a way they aren't intended, around the input buttons, and it's reacting to events on the button and not the link.

The links will work around text or images, but for a button

<form><input type="button" value="News" onClick="document.location='News.htm';"></form>

is all that's needed. Since there are no onClick actions associated with your buttons - it doesn't know what to do. So it does nothing. :-)

Hyperlinks will work around static objects, such as

<a href=news.htm">text</a>
<a href="news.htm"><img src="images.gif"></a>
<a href="news.htm"><img src="animaged_images.gif"></a>

but I've never even thought of using them on form objects.

mrnoisy

9:19 pm on Dec 3, 2004 (gmt 0)

10+ Year Member



onclick requires javascript, whereas <form action="news.htm"> doesn't.

I've tidied up the code and used more css to separate presentation from content.


<html>
<head>
<style type="text/css">
#box {
text-align:center;
margin-top:50px;
}
form {
display:inline;
}
input {
color:#4E3A01;
font:14pt QuickType II Mono;
margin:0 10px;
}
</style>
</head>
<body>
<div id="box">
<img src="6225_logo_final.jpg" width="503" height="185">
<br><br>
<form action="News.htm"><input type="submit" value="News" name="B1"></form>
<form action="Photos.htm"><input type="submit" value="Pictures" name="B3"></form>
<form action="SampleTunes.htm"><input type="submit" value="Daily Tune" name="B2"></form>
</div>
</body>
</html>

Credo

4:39 pm on Dec 10, 2004 (gmt 0)

10+ Year Member



Cool...I think I got it now. Thanks for all your help.