Link to home
Start Free TrialLog in
Avatar of Luey
LueyFlag for United States of America

asked on

javascript open link with variables

Hello what is wrong with my javascript.  It opens the url correctly except for it adding [objectHTMLInputElement] in the url.  This is the url the code is opening.
http://www.accesswestga.com/[objectHTMLInputElement]dealer_real_estate_my_account.php?agent=24&show=HOME
<script type="text/javascript">
function openLink(){
	location = document.getElementById('site_url') + "dealer_real_estate_my_account.php?agent=" + document.getElementById('link_agent').value + "&show=" + document.getElementById('link_property').value;
}
</script>

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Beverley Portlock
Beverley Portlock
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Luey

ASKER

Uh Duh! Thanks for the good set of eyes.  I guess mine are getting to old for this.
These things are easily missed.

I once spent an hour trying to figure out why changes to a script had no apparent effect. The script I was editing was on my test server. The script I was testing was on the LIVE server.

Duh!!!

Avatar of Luey

ASKER

I hear ya! Thanks again