Calling html link from a button?

S

Sean M. Loftus

I have a need to call an html page into the pane I'm viewing using a button
on an ASP page. The page itself is an ASP page called from a website. I know
a link would work but the rest of the page has buttons and it would look
cleaner to use a button.

I've tried the below in a few variations, including using a href tags inside
the onclick. Anyone have a suggestion on what I'm doing wrong here?

<input type="button" value="<%=L_MBS_Text%>"
onclick="get(https://domain.com/size/")>

--
Sean M. Loftus
Enterprise Architect
Loftus Consulting, Inc.
www.LoftusConsulting.com
sean(removeme)@loftus.org
 
M

McKirahan

Sean M. Loftus said:
I have a need to call an html page into the pane I'm viewing using a button
on an ASP page. The page itself is an ASP page called from a website. I know
a link would work but the rest of the page has buttons and it would look
cleaner to use a button.

I've tried the below in a few variations, including using a href tags inside
the onclick. Anyone have a suggestion on what I'm doing wrong here?

<input type="button" value="<%=L_MBS_Text%>"
onclick="get(https://domain.com/size/")>

--
Sean M. Loftus
Enterprise Architect
Loftus Consulting, Inc.
www.LoftusConsulting.com
sean(removeme)@loftus.org

You did not show us your get() function.

Perhaps all you want is this:

<input type="button" value="<%=L_MBS_Text%>"
onclick="location.href='https://domain.com/size/'">
 
B

Bob Barrows [MVP]

Sean said:
I have a need to call an html page into the pane I'm viewing using a
button on an ASP page.

This is not an ASP problem (you could be trying to do the same with a button
on an htm page, couldn't you? This makes it a client-side scriting problem,
not ASP). ASP knows nothing about buttons or any other UI elements.

But, read on.
The page itself is an ASP page called from a
website. I know a link would work but the rest of the page has
buttons and it would look cleaner to use a button.

I've tried the below in a few variations, including using a href tags
inside the onclick. Anyone have a suggestion on what I'm doing wrong
here?

<input type="button" value="<%=L_MBS_Text%>"
onclick="get(https://domain.com/size/")>

Is get() a function that you wrote? I think you want to set the current
window's location to that url, correct? Like this:

onclick="window.location = 'https://domain.com/size/';">

Please follow up in a client-side scripting group such as
..scripting.jscript.

Bob Barrows
 
E

Evertjan.

Sean M. Loftus wrote on 17 nov 2005 in
microsoft.public.inetserver.asp.general:
I have a need to call an html page into the pane I'm viewing using a
button on an ASP page. The page itself is an ASP page called from a
website. I know a link would work but the rest of the page has buttons
and it would look cleaner to use a button.

I've tried the below in a few variations, including using a href tags
inside the onclick. Anyone have a suggestion on what I'm doing wrong
here?

<input type="button" value="<%=L_MBS_Text %>"
onclick="get(https://domain.com/size/")>

This is a clientside JS problem, so OT on this NG
please follow up elswhere

<input type="button" value="<%=L_MBS_Text %>"
onclick="location.href='https://domain.com/size/'">

or

<button
onclick="location.href='https://domain.com/size/'">
<%=L_MBS_Text%>
</button>

perhaps you want:

<button
onclick="location.href='<%=L_MBS_Link %>'">
<%=L_MBS_Text %>
</button>
 

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,763
Messages
2,569,562
Members
45,038
Latest member
OrderProperKetocapsules

Latest Threads

Top