Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New Coder
    Join Date
    May 2006
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    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>

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    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!||||

  • #3
    New Coder
    Join Date
    May 2006
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    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>

  • #4
    Senior Coder Arbitrator's Avatar
    Join Date
    Mar 2006
    Location
    Splendora, Texas, United States of America
    Posts
    3,372
    Thanks
    32
    Thanked 286 Times in 280 Posts
    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.
    For every complex problem, there is an answer that is clear, simple, and wrong.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •