Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 05-05-2006, 11:16 PM   PM User | #1
James Peet
New Coder

 
Join Date: May 2006
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
James Peet is an unknown quantity at this point
CSS code for input

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>
James Peet is offline   Reply With Quote
Old 05-05-2006, 11:26 PM   PM User | #2
_Aerospace_Eng_
Supreme Master coder!


 
_Aerospace_Eng_'s Avatar
 
Join Date: Dec 2004
Location: In a place far, far away...
Posts: 19,292
Thanks: 2
Thanked 1,044 Times in 1,020 Posts
_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light
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.
Code:
onclick="parent.frame2.location = 'http://www.example.com'"
__________________
||||If you are getting paid to do a job, don't ask for help on it!||||
_Aerospace_Eng_ is offline   Reply With Quote
Old 05-06-2006, 03:22 AM   PM User | #3
James Peet
New Coder

 
Join Date: May 2006
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
James Peet is an unknown quantity at this point
CSS code for input

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>
James Peet is offline   Reply With Quote
Old 05-06-2006, 03:32 AM   PM User | #4
Arbitrator
Senior Coder

 
Arbitrator's Avatar
 
Join Date: Mar 2006
Location: Splendora, Texas, United States of America
Posts: 2,933
Thanks: 6
Thanked 194 Times in 191 Posts
Arbitrator is on a distinguished road
Quote:
Originally Posted by James Peet
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.
__________________
Please for the love of god stop making IE. You current "browser"s cause me to cry every day. —Phil *
Arbitrator is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 11:06 AM.


Advertisement
Log in to turn off these ads.