...

View Full Version : CSS code for input



James Peet
05-05-2006, 11:16 PM
The input I want to be able to add would take me to a web address the way the HTML code <a href="http://www.example..com target="frame2">Absolute Background Textures Archive</a> would do. What code should I add?


<form name="groovyform">
<input
type="button"
name="groovybtn1"
class="groovybutton"
value="Page One"
title=""
onMouseOver="goLite(this.form.name,this.name)"
onMouseOut="goDim(this.form.name,this.name)">
</form>

_Aerospace_Eng_
05-05-2006, 11:26 PM
So you just want the button to take you some place. Why aren't you doing this with a normal link? The button would require javascript and JS can be disabled.

onclick="parent.frame2.location = 'http://www.example.com'"

James Peet
05-06-2006, 03:22 AM
I am trying to use CSS to allow me some control creating and using my own buttons. I have the buttons but I can't use them because I can't figure out how/where to put any code to get this button to send me to a site. I have used the <A http:\\ etc></A> code on other HTML but CSS has more options. I am trying to figure out how to make this work.

<form name="groovyform">
<input
type="button"
name="groovybtn1"
class="groovybutton"
value="Page One"
title=""
onMouseOver="goLite(this.form.name,this.name)"
onMouseOut="goDim(this.form.name,this.name)">

</form>

Arbitrator
05-06-2006, 03:32 AM
I am trying to use CSS to allow me some control creating and using my own buttons. I have the buttons but I can't use them because I can't figure out how/where to put any code to get this button to send me to a site. I have used the &lt;A http:\\ etc&gt;&lt;/A&gt; code on other HTML but CSS has more options. I am trying to figure out how to make this work.<br />
<br />
&lt;form name=&quot;groovyform&quot;&gt;<br />
&lt;input<br />
type=&quot;button&quot;<br />
name=&quot;groovybtn1&quot;<br />
class=&quot;groovybutton&quot;<br />
value=&quot;Page One&quot;<br />
title=&quot;&quot;<br />
onMouseOver=&quot;goLite(this.form.name,this.name)&quot;<br />
onMouseOut=&quot;goDim(this.form.name,this.name)&quot;&gt;<br />
<br />
&lt;/form&gt;Just because you have access to CSS doesn't mean you should abandon structural code like the anchor tag (a).

As for your code, Aerospace provided the solution. If you want to know what that specific snippet does, I can't tell you without you showing what the goLite and goDim functions are. For that button, onmouseover the function goLite is sent two parameters: the form name (groovyform) and the element name (groovybtn1). The same thing happens for the function goDim onmouseout. It can be assumed that the functions will act on the form and button name information in some way.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum