Find jobs - Sport Betting Bonuses - Debt Consolidation - Gavin Newsom - Kamala Harris

PDA

View Full Version : Need help with onClick onmouseup etc... and a submit button


Daniel591992
Aug 9th 2007, 9:08 am
Hey, take a look at this:

http://dodesign.us/live/quickproxy/index.php

Click on popular links, and chose one of the sites. The site URL is written to the textbox and the advanced options come up. The code is something like this:

<td><a onClick="document.a.q.value='http://myspace.com'" onmouseup="toggle('toggle1');" onkeyup="change();" >Myspace</a></td>

That works...for the most part. I also want the textbox to change its border color when the link is clicked, to make the visitor more aware that a link was written in the textbox. That's what the change(); is supposed to do. This is the code for the change();

<script language="JavaScript">
function change(){
document.getElementById("url").style.borderColor = "#111111";
document.getElementById("url").style.backgroundColor = "#000000";
document.getElementById("url").style.color = "#ffffff";
}
</script>


How can I make that work?



Problem 2:

I have the search google button on the page, but I don't know how to make it work. As you can imagine, I want it to search google, but proxied.

When you do a google search, it's basicly http://www.google.com/search?q=SEARCH+TERM+HERE. How could I do that so it takes the search term from the url box and transforms it into the above url and works with the proxy?

I'll give anyone who can help me solve this a link on dodesign.us for as long as the current design stays.

If you can help via IM:

aim:daniel591992
msn:cadagobr1[at]gmail.com
gtalk: ^same

Thanks

Daniel591992
Aug 9th 2007, 11:28 am
I got the first thing working now. Can someone help with the second?

Drag Racer
Aug 10th 2007, 9:43 pm
<form action="http://www.google.com/search">
<input name="q">
<input type="submit" value="Search Google">
</form>