bonAveo.net said:
OK; heres my "whole" code:
function goTo() {
var adress = document.getElementById("seee");
var link = document.getElement("addUrl");
var url = link + adress;
alert(url);
if (window.widget) widget.;
site.value="";
}
...and...
<form class="felt" method="get" action="javascript:goTo()">
<!-- Searchfield -->
<input id="seee" type="text" size="16" maxlength="255" value="" />
<!-- Searchfield end -->
<br />
<input type="image" src="search.png"
value="http://jigsaw.w3.org/css-validator/validator?usermedium=all&uri="
onclick="addUrl(this.value)">
<input type="image" src="search.png"
value="http://validator.w3.org/check?uri="
onclick="addUrl(this.value)">
<input type="image" src="search.png"
value="http://validator.w3.org/checklink?hide_redirects=on&hide_type=all&recursiv e=on&depth=1&check=Check&uri="
onclick="addUrl(this.value)">
</form>
I don't understand why the value from the pressed button don't aply in
the JavaScript.
You seem to be making wildly incorrect guesses about what should work.
You still haven't shown any code for your addUrl() function.
Are you expecting getElement("addUrl") to return the argument passed to that
(undefined) function? It doesn't work that way.
You should very rarely use an input of type image unless you want clicking on it
to submit a form.
You shouldn't have a javascript function as the action of your form.
You seem to be trying to generate an URL by concatinating a reference to an
input element with a reference to a function.
The last two lines of your function goTo() don't make any sense at all.