Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

put TBX vale in url 1

Status
Not open for further replies.

Dashley

Programmer
Dec 5, 2002
925
US
I'm trying to pass the value of textbox1 to the onclick
line of code as part of the url string

Code:
<script type="text/javascript">
function doAlert() {
 var targetElement = document.getElementById("TextBox1");
     }
</script>


Code:
<a href="#" onclick="window.open('randys2.aspx?sid=**NEED Textbox1 value here**','g','width=800,height=600');return false;">&nbsp;(view)</a>

I can't seem to get it to work. Can an help. Thank You.
 
[tt]<a href="#" onclick="window.open('randys2.aspx?sid='+encodeURI(document.getElementById('TextBox1').value)),'g','width=800,height=600');return false;">&nbsp;(view)</a>[/tt]
 
Hi Tsuji,

Hi Tsuji, Thought you were the XML Guru HA. I'm glad your here. There was an extra paren after the world value but once i removed it everything worked fine. You made that to easy. I was tring to pull it from a function.

Thanks !!!

-dan
 
Thanks! I used to getting more or less parentheses and others. (You work till this hour?!)
 
I work out of the house doing sites and was up late trying to finish off a pice of code for a friend. Thnaks again
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top