Click to See Complete Forum and Search --> : How to get rid of the buttons in the 'accept terms script'2


dutchie
10-22-2003, 01:17 PM
Dear other forum members,


The 8 of October last, i’ve posted a thread about “of how to get rid of those ‘grey’ buttons in a script called “Accept Terms” from (webmaster@insighteye.com). Untill now I haven’t got a reaction on it, but that’s maybe I was not clear anough with my explanation. (Why? It was my very first message that ever posted to a forum ‘I just wasn’t and still are not fully familiar with it.)

Anyhow, I will try it again and be more clear with it.
It’s about of how to get rid of those ‘grey’ buttons, in that script.
Where I’ve already succeeded in, that is, to get rid of the ‘exit’ button.

original
<input type="button" value="Exit" onclick="document.location.href='/index.html';">

replaced with

<div style="margin-left:65.0pt;color:#990000"><B>If you don't, please click here.<a href="home.htm" onMouseover="lightup('pic1')" onMouseout="turnoff('pic1')">
<img src="diverse-images/home3.gif" name="pic1" width="130" height="50" border="0"></A></div>


And that is working fine, but now that other button ‘Continue Order’, that i like to change in a ‘hooverbutton’ aswell, but without loosing the ‘submit’function of it.
And after trying and trying, i still don’t get that done. I’ve succeeded in it, to replace that button with a ‘rollover’ button, but then it had lost its function , so how?

This is of how it looks in the original script.

<form action="/yourscript.cgi-or-your-page.html" method="POST" onsubmit="return checkCheckBox(this)">
I accept: <input type="checkbox" value="0" name="agree">
<input type="submit" value="Continue Order">




And below is the full script of it, with some additions on it.


<script language="JavaScript">
<!--hide
function checkCheckBox(f){
if (f.agree.checked == false )
{
alert('Please check the box to continue.');
return false;
}else
return true;
}

if (document.images)
{
pic1on= new Image(130,50);
pic1on.src="diverse-images/home4.gif";
pic2on= new Image(130,50);
pic2on.src="diverse-images/terms4.gif";

pic1off= new Image(130,50);
pic1off.src="diverse-images/home3.gif";
pic2off= new Image(130,50);
pic2off.src="diverse-images/terms3.gif";
}

function lightup(imgName)
{
if (document.images)
{
imgOn=eval(imgName + "on.src");
document[imgName].src= imgOn;
}
}

function turnoff(imgName)
{
if (document.images)
{
imgOff=eval(imgName + "off.src");
document[imgName].src= imgOff;
}
}
//-->
</script>


<center><form style="color:#990000" action="gallery.htm" method="POST" onsubmit="return checkCheckBox(this)"><B>
If you accept: <input type="checkbox" value="0" name="agree">

<input type="submit" value="Please, have a FREE look at our Gallery"></center>


<p>
<div style="margin-left:65.0pt;color:#990000"><B>If you don't, please click here.<a href="home.htm" onMouseover="lightup('pic1')" onMouseout="turnoff('pic1')">
<img src="diverse-images/home3.gif" name="pic1" width="130" height="50" border="0"></A></div>
</form>


Thanks for any help beforehands
With greetings,

Dutchie

Jona
10-22-2003, 01:48 PM
You can use pure CSS to edit the button:


<button type="submit" style="color:maroon; background-color:white; font-family:verdana, sans-serif;" onmouseover="this.style.color='white'; this.style.backgroundColor='maroon';" onmouseout="this.style.color='maroon'; this.style.backgroundColor='white';">Submit</button>


Or you can use this:


<input type="image" src="submit_img.gif" alt="Submit" onmouseover="lightup(this.name);" onmouseout="turnoff(this.name);" name="submitf" id="submitf">


[J]ona

dutchie
10-25-2003, 12:49 AM
Hi,

First i like to say thanks to Jona for the given help so far.

Where I have choosen for, that is the second option you gave me, but I still have some problems with it.
Where i’ve succeeded in is, to replace that button for my own image, but what in not get done, that’s the ‘rollover’ effect. I’ve tried many ways but still don’t get that done.

So my question is, what is it, that I’m doing wrong?

Here is what I have;

This is the part of the script, that I have in the ‘head’ section. ( it are images 'pic1', that i will use in the script you gave me)

if (document.images)
{
pic1on= new Image(130,50);
pic1on.src="diverse-images/submit_img4.gif";
pic2on= new Image(130,50);
pic2on.src="diverse-images/home4.gif";

pic1off= new Image(130,50);
pic1off.src="diverse-images/submit_img3.gif";
pic2off= new Image(130,50);
pic2off.src="diverse-images/home3.gif";
}

And this, is what I have from you, and have tried to customize to my situation.

<input type="image" src="diverse-images/submit_img3.gif" width="130" height="50" border="0" alt="Submit" onMouseover="lightup('pic1');" onMouseout="turnoff('pic1');" name="submitf" id="submitf">


Anyhow, thanks again,

Dutchie

Jona
10-25-2003, 03:22 PM
function lightup(imgName) {
&nbsp; if (document.images) {
&nbsp; &nbsp;document[imgName].src=eval(imgName+"on.src");
&nbsp;}
}

function turnoff(imgName) {
&nbsp; if (document.images) {
&nbsp; &nbsp;document[imgName].src=eval(imgName+"off.src");
&nbsp;}
}


[J]ona