Re: Image as Submit button WITH rollovers

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: Image as Submit button WITH rollovers

Rick-6

On Sep 9, 2004, at 2:53 PM, m i l e s wrote:

Here's an example....

I had a bitch of a time trying to get this to work right
because I dont use javascript anymore.  CSS is much more
effective.

Here's the JAVASCRIPT:

<script type="text/javascript"><!--
var preloadFlag = false;
function preloadImages() {
     if (document.images) {
         pre_arrow_off = newImage('site/images/button_off.gif');
         pre_arrow = newImage('site/images/button.gif');
         preloadFlag = true;
     }
}

// --></script>

Here's the ROLLOVER:

<td><a onmouseover="changeImages('button_off','site/images/
button.gif');return true" onmouseout="changeImages('button_off','site/
images/button_off.gif');return true" a href="/index.lasso"  
id="button_off" name="button_off">some value</a></td>

<td valign="top"><a href="index.lasso"><img src="/site/images/
button_off.gif" id="button_off" name="button_off width="45"  
height="18"></a></td>




Miles,

I was searching the archives about this topic.

This code is not for a lasso formal submit button.
If there are First_Name and Last_Name parameters being input by a user
this will not pass those parameters.

This code works as a rollover only, not as a submit button.

Any other ideas?

Rick


--
------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage
Reply | Threaded
Open this post in threaded view
|

Re: Image as Submit button WITH rollovers

Wade Maxfield
>On Sep 9, 2004, at 2:53 PM, m i l e s wrote:
>
>Here's an example....
>
>I had a bitch of a time trying to get this to work right
>because I dont use javascript anymore.  CSS is much more
>effective.
>
>Here's the JAVASCRIPT:
>
><script type="text/javascript"><!--
>var preloadFlag = false;
>function preloadImages() {
>     if (document.images) {
>         pre_arrow_off = newImage('site/images/button_off.gif');
>         pre_arrow = newImage('site/images/button.gif');
>         preloadFlag = true;
>     }
>}
>
>// --></script>
>
>Here's the ROLLOVER:
>
><td><a
>onmouseover="changeImages('button_off','site/images/button.gif');return
>true"
>onmouseout="changeImages('button_off','site/images/button_off.gif');return
>true" a href="/index.lasso" id="button_off" name="button_off">some
>value</a></td>
>
><td valign="top"><a href="index.lasso"><img
>src="/site/images/button_off.gif" id="button_off" name="button_off
>width="45" height="18"></a></td>
>
>
>
>Miles,
>
>I was searching the archives about this topic.
>
>This code is not for a lasso formal submit button.
>If there are First_Name and Last_Name parameters being input by a user
>this will not pass those parameters.
>
>This code works as a rollover only, not as a submit button.
>
>Any other ideas?
>
>Rick

Hi Rick,

Keep the rest of Miles javascript, but use the onClick and href from below.


<form method="POST" action="something.lasso" name="formname" id="formname">
...
</form>

<a href="javascript:document.formname.submit()"
onClick="document.formname.submit()"
onmouseover="changeImages('button_off','site/images/button.gif');return
true"
onmouseout="changeImages('button_off','site/images/button_off.gif');return
true" id="button_off" name="button_off">some value</a>

The button doesn't need to be inside the form if you don't want it.
Or you could investigate a purely CSS version, depends on what
browsers you are supporting.

  - Wade

--
------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage
Reply | Threaded
Open this post in threaded view
|

Re: Image as Submit button WITH rollovers

Rick-6
In reply to this post by Rick-6

On Jul 20, 2005, at 5:33 PM, Wade Maxfield wrote:

>
> Keep the rest of Miles javascript, but use the onClick and href  
> from below.
>
>
> <form method="POST" action="something.lasso" name="formname"  
> id="formname">
> ...
> </form>
>
> <a href="javascript:document.formname.submit()"  
> onClick="document.formname.submit()" onmouseover="changeImages
> ('button_off','site/images/button.gif');return true"  
> onmouseout="changeImages('button_off','site/images/
> button_off.gif');return true" id="button_off"  
> name="button_off">some value</a>
>
> The button doesn't need to be inside the form if you don't want it.  
> Or you could investigate a purely CSS version, depends on what  
> browsers you are supporting.
>
>  - Wade
>

Wade,

Thanks, I'll give it a try!

Rick


--
------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage