a button that doesn't postback and passes a parameter to a java script

E

Eric

I'm building a cool little all-in-one search tool in ASP.Net 2.0 for all my
favorite search engines (Google, IMDb, Wikipedia, etc.) It takes a string
from a text box, and a selected value from a radiolist control, and builds a
URL search string to open a new window with that URL. I'm trying to get a
button to take the string from my vb.net string builder function and pass it
to my open window java script function which I registered on page load, and
also not waste time by posting back to my original page.

I don't know if I'm making any sense. But, I thought this would interest
someone who might have ideas... If I should be posting to another group,
please let me know.

Thanks!
 
O

OHM \( One Handed Man \)

I must say, I am a little confused as to what you are trying to accomplish.
It sounds as if what you want to do is to access a server side function
without postback. If this is what you are trying to do, you need to review
AJAX.

If I misunderstand you, then please update me
 
E

Eric

Okay, I think I've got it:

btnOpen is an HTML input button, OpenNewWindow is a javascript function, and
GetURLString is an ASP.Net function that dynamically builds my URL to
navigate to. Seems to work, correct me if I'm wrong.

<input id="btnOpen" type="button" value="Click Me"
onclick="OpenNewWindow('<%=GetURLString %>')"/>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,022
Latest member
MaybelleMa

Latest Threads

Top