473,774 Members | 2,129 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Calling html link from a button?

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(ht tps://domain.com/size/")>

--
Sean M. Loftus
Enterprise Architect
Loftus Consulting, Inc.
www.LoftusConsulting.com
sean(removeme)@ loftus.org
Nov 22 '05 #1
5 15814
"Sean M. Loftus" <sean(remove me)@loftus.org> wrote in message
news:eI******** ******@TK2MSFTN GP11.phx.gbl...
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(ht tps://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="locati on.href='https://domain.com/size/'">
Nov 22 '05 #2
Sean M. Loftus wrote on 17 nov 2005 in
microsoft.publi c.inetserver.as p.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(ht tps://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="locati on.href='https://domain.com/size/'">

or

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

perhaps you want:

<button
onclick="locati on.href='<%=L_M BS_Link %>'">
<%=L_MBS_Text %>
</button>
--
Evertjan.
The Netherlands.
(Replace all crosses with dots in my emailaddress)

Nov 22 '05 #3
Sean M. Loftus wrote:
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(ht tps://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.jsc ript.

Bob Barrows
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Nov 22 '05 #4
Bob Barrows [MVP] wrote:
onclick="window .location = 'https://domain.com/size/';">

Oh shoot - I left out the href ... :-(
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Nov 22 '05 #5
Thank you,

That worked fine, I was calling the link wrong...

Sean
"McKirahan" <Ne**@McKirahan .com> wrote in message
news:Wr******** ************@co mcast.com...
"Sean M. Loftus" <sean(remove me)@loftus.org> wrote in message
news:eI******** ******@TK2MSFTN GP11.phx.gbl...
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(ht tps://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="locati on.href='https://domain.com/size/'">

Nov 22 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
9711
by: bhennon | last post by:
Hey all, I have a small php script that calls a random image at the following page. http://www.2006ymcanationals.com/random.php IT WORKS IF I go directly to the above link. I am trying to call that in another page so that i get a random image the page is http://2006ymcanationals.com/index.php using <img
1
2168
by: Jim Mitchell | last post by:
Why is there no link tag on the Visual Studio HTML tool bar? What is the best way to add it other than as the text property of a label control? Thanks in advance.
3
4317
by: Twinkletoes | last post by:
Hello people, my first post here... *wave* I need to know how to call a function in a different document. At the moment I've tried onFocus but I'm kinda in over my depth. Perhaps if I tell you what I want to do you can give me the process and I'll go figure out the code? My site is divided into two frames, top frame for navigation, bottom frame for displaying content (called "top" and "main" respectively).
4
6862
by: evan.cooch | last post by:
Greetings. Suppose I have some function called "CheckIt" - some function to validate form data before submitting it to e CGI script. Pretend the name of the form is "TheForm". If I use the following code, everything work perfctly: <Input type=button VALUE="Submit your form" onClick="javascript:return CheckIt(TheForm)">
18
12699
by: Simula | last post by:
I am developing an HTML javascript application and I want to preserve state in a way that can be book-marked. I chose HTML anchors as a means of preserving state. When the application changes state, the HTML page URL would change from default.html to default.html#stateA. example: http://pearstudios.com/javascript/locationHashAndFlash.html This has worked perfectly within HTML and javascript alone, however, when connecting Flash and...
2
1684
by: Andrew Banks | last post by:
I've got the following code as part of a C# web form but am having problems calling a command. I create a dataset and put some data on the screen. This works fine. (relevant sample below) foreach (DataRow row in ds.Tables.Rows) { detailsbtn = new LinkButton(); //Assign a unique ID to the details control detailsbtn.ID = "details" + row.ToString().Replace("-", String.Empty);
1
1670
by: polix | last post by:
Hi dear users I'm completly new in XML I'm trying to do the table with hyperlinks. Let me show you xml code (linki.xml) <?xml version="1.0" ?> <?xml-stylesheet type="text/xsl" href="someXSLfile.xsl"?> <LINKI> <LINK> <NAZWA>PUT</NAZWA>
5
2453
by: smittie31 | last post by:
I am having a problem with a border around me html page. The border does not flow thru the whole html page, it cuts off halfway. --> See http://keithborom.com/marlon-sanders CSS STYLESHEET /* CSS for Marlon Sanders site */ html, body {
4
3588
by: raghuvendra | last post by:
Hi I have a jsp page with 4 columns: namely Category name , Category order, Input field and a submit button. All these are aligned in a row. And Each Category Name has its corresponding Category order, Input field and a submit button. The Category name is being fetched from the oracle db along with the corresponding Category order. In the corresponding input field (text box) the user enters a new category order which gets stored in the...
0
9621
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9454
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10267
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10040
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9914
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7463
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
1
4012
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3611
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2852
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.