473,668 Members | 2,290 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

embedding a webpage

I need to change images with the click of a button but I don't want the
entire page to refresh so I thought I should just use an embedded page.
I'm trying to use the <object> tag for this but can't figure out how to
change the page in the code behind.

I tried a javascript like this:
System.Text.Str ingBuilder sb = new System.Text.Str ingBuilder();
sb.Append("<scr ipt ");
sb.Append("lang uage='javascrip t'>");
sb.Append("docu ment.Form1.Embe dPic.data=\"MyP age.aspx?image= Image.jpg\";");
sb.Append("</script>");
RegisterStartup Script("PicPrev iew", sb.ToString());

but the page never changes. Is there something I'm doing wrong or is there a
better way to do this?
Nov 18 '05 #1
5 1391
Have you considered using client-side JavaScript to change the .SRC property
of an Image tag?

--
Thanks,

Eric Lawrence
Program Manager
Assistance and Worldwide Services

This posting is provided "AS IS" with no warranties, and confers no rights.

"Joe Bonavita" <JBonavita_@_ca minus.com> wrote in message
news:u3******** ******@TK2MSFTN GP12.phx.gbl...
I need to change images with the click of a button but I don't want the
entire page to refresh so I thought I should just use an embedded page.
I'm trying to use the <object> tag for this but can't figure out how to
change the page in the code behind.

I tried a javascript like this:
System.Text.Str ingBuilder sb = new System.Text.Str ingBuilder();
sb.Append("<scr ipt ");
sb.Append("lang uage='javascrip t'>");
sb.Append("docu ment.Form1.Embe dPic.data=\"MyP age.aspx?image= Image.jpg\";"); sb.Append("</script>");
RegisterStartup Script("PicPrev iew", sb.ToString());

but the page never changes. Is there something I'm doing wrong or is there a better way to do this?

Nov 18 '05 #2
yes, I tried changing the .SRC property also but the image doesn't change.
Is RegisterStartup Script not the right way to do this?

"Eric Lawrence [MSFT]" <e_********@hot mail.com> wrote in message
news:eY******** ******@TK2MSFTN GP09.phx.gbl...
Have you considered using client-side JavaScript to change the .SRC property of an Image tag?

--
Thanks,

Eric Lawrence
Program Manager
Assistance and Worldwide Services

This posting is provided "AS IS" with no warranties, and confers no rights.
"Joe Bonavita" <JBonavita_@_ca minus.com> wrote in message
news:u3******** ******@TK2MSFTN GP12.phx.gbl...
I need to change images with the click of a button but I don't want the
entire page to refresh so I thought I should just use an embedded page.
I'm trying to use the <object> tag for this but can't figure out how to
change the page in the code behind.

I tried a javascript like this:
System.Text.Str ingBuilder sb = new System.Text.Str ingBuilder();
sb.Append("<scr ipt ");
sb.Append("lang uage='javascrip t'>");

sb.Append("docu ment.Form1.Embe dPic.data=\"MyP age.aspx?image= Image.jpg\";");
sb.Append("</script>");
RegisterStartup Script("PicPrev iew", sb.ToString());

but the page never changes. Is there something I'm doing wrong or is

there a
better way to do this?


Nov 18 '05 #3
Can you show me what your code looks like?

--
Thanks,

Eric Lawrence
Program Manager
Assistance and Worldwide Services

This posting is provided "AS IS" with no warranties, and confers no rights.

"Joe Bonavita" <JBonavita_@_ca minus.com> wrote in message
news:#S******** ******@TK2MSFTN GP09.phx.gbl...
yes, I tried changing the .SRC property also but the image doesn't change.
Is RegisterStartup Script not the right way to do this?

"Eric Lawrence [MSFT]" <e_********@hot mail.com> wrote in message
news:eY******** ******@TK2MSFTN GP09.phx.gbl...
Have you considered using client-side JavaScript to change the .SRC

property
of an Image tag?

--
Thanks,

Eric Lawrence
Program Manager
Assistance and Worldwide Services

This posting is provided "AS IS" with no warranties, and confers no

rights.

"Joe Bonavita" <JBonavita_@_ca minus.com> wrote in message
news:u3******** ******@TK2MSFTN GP12.phx.gbl...
I need to change images with the click of a button but I don't want the entire page to refresh so I thought I should just use an embedded page. I'm trying to use the <object> tag for this but can't figure out how to change the page in the code behind.

I tried a javascript like this:
System.Text.Str ingBuilder sb = new System.Text.Str ingBuilder();
sb.Append("<scr ipt ");
sb.Append("lang uage='javascrip t'>");

sb.Append("docu ment.Form1.Embe dPic.data=\"MyP age.aspx?image= Image.jpg\";");
sb.Append("</script>");
RegisterStartup Script("PicPrev iew", sb.ToString());

but the page never changes. Is there something I'm doing wrong or is

there
a
better way to do this?



Nov 18 '05 #4
System.Text.Str ingBuilder sb = new System.Text.Str ingBuilder();
sb.Append("<scr ipt ");
sb.Append("lang uage='javascrip t'>");
sb.Append("docu ment.frmHouse.I mage1.SRC=\"blu ehouse.jpg\";") ;
sb.Append("</script>");
RegisterStartup Script("PicPrev iew", sb.ToString());

This is being called from an ImageButton click event.

NOTE: the image is going to be differnent each time the button is clicked.

"Eric Lawrence [MSFT]" <e_********@hot mail.com> wrote in message
news:Ol******** ********@TK2MSF TNGP09.phx.gbl. ..
Can you show me what your code looks like?

--
Thanks,

Eric Lawrence
Program Manager
Assistance and Worldwide Services

This posting is provided "AS IS" with no warranties, and confers no rights.
"Joe Bonavita" <JBonavita_@_ca minus.com> wrote in message
news:#S******** ******@TK2MSFTN GP09.phx.gbl...
yes, I tried changing the .SRC property also but the image doesn't change.
Is RegisterStartup Script not the right way to do this?

"Eric Lawrence [MSFT]" <e_********@hot mail.com> wrote in message
news:eY******** ******@TK2MSFTN GP09.phx.gbl...
Have you considered using client-side JavaScript to change the .SRC

property
of an Image tag?

--
Thanks,

Eric Lawrence
Program Manager
Assistance and Worldwide Services

This posting is provided "AS IS" with no warranties, and confers no

rights.

"Joe Bonavita" <JBonavita_@_ca minus.com> wrote in message
news:u3******** ******@TK2MSFTN GP12.phx.gbl...
> I need to change images with the click of a button but I don't want

the > entire page to refresh so I thought I should just use an embedded page. > I'm trying to use the <object> tag for this but can't figure out how to > change the page in the code behind.
>
> I tried a javascript like this:
> System.Text.Str ingBuilder sb = new System.Text.Str ingBuilder();
> sb.Append("<scr ipt ");
> sb.Append("lang uage='javascrip t'>");
>

sb.Append("docu ment.Form1.Embe dPic.data=\"MyP age.aspx?image= Image.jpg\";");
> sb.Append("</script>");
> RegisterStartup Script("PicPrev iew", sb.ToString());
>
> but the page never changes. Is there something I'm doing wrong or is

there
a
> better way to do this?
>
>



Nov 18 '05 #5
Can you send me the content of resultant the HTML page? I'd expect the
RegisterStartup Script call to put something in the Body OnLoad, so I'm not
sure how the button click fits into things. In classic HTML, you'd simply
add an OnClick event to the button tag that performed the .SRC change. In
ASP.NET, you'd want to have RUNAT=client, I'd expect...
"Joe Bonavita" <JBonavita_@_ca minus.com> wrote in message
news:uo******** ******@TK2MSFTN GP09.phx.gbl...
System.Text.Str ingBuilder sb = new System.Text.Str ingBuilder();
sb.Append("<scr ipt ");
sb.Append("lang uage='javascrip t'>");
sb.Append("docu ment.frmHouse.I mage1.SRC=\"blu ehouse.jpg\";") ;
sb.Append("</script>");
RegisterStartup Script("PicPrev iew", sb.ToString());

This is being called from an ImageButton click event.

NOTE: the image is going to be differnent each time the button is clicked.

"Eric Lawrence [MSFT]" <e_********@hot mail.com> wrote in message
news:Ol******** ********@TK2MSF TNGP09.phx.gbl. ..
Can you show me what your code looks like?

--
Thanks,

Eric Lawrence
Program Manager
Assistance and Worldwide Services

This posting is provided "AS IS" with no warranties, and confers no

rights.

"Joe Bonavita" <JBonavita_@_ca minus.com> wrote in message
news:#S******** ******@TK2MSFTN GP09.phx.gbl...
yes, I tried changing the .SRC property also but the image doesn't change. Is RegisterStartup Script not the right way to do this?

"Eric Lawrence [MSFT]" <e_********@hot mail.com> wrote in message
news:eY******** ******@TK2MSFTN GP09.phx.gbl...
> Have you considered using client-side JavaScript to change the .SRC
property
> of an Image tag?
>
> --
> Thanks,
>
> Eric Lawrence
> Program Manager
> Assistance and Worldwide Services
>
> This posting is provided "AS IS" with no warranties, and confers no
rights.
>
> "Joe Bonavita" <JBonavita_@_ca minus.com> wrote in message
> news:u3******** ******@TK2MSFTN GP12.phx.gbl...
> > I need to change images with the click of a button but I don't want
the
> > entire page to refresh so I thought I should just use an embedded

page.
> > I'm trying to use the <object> tag for this but can't figure out
how to
> > change the page in the code behind.
> >
> > I tried a javascript like this:
> > System.Text.Str ingBuilder sb = new System.Text.Str ingBuilder();
> > sb.Append("<scr ipt ");
> > sb.Append("lang uage='javascrip t'>");
> >
>

sb.Append("docu ment.Form1.Embe dPic.data=\"MyP age.aspx?image= Image.jpg\";"); > > sb.Append("</script>");
> > RegisterStartup Script("PicPrev iew", sb.ToString());
> >
> > but the page never changes. Is there something I'm doing wrong or is there
> a
> > better way to do this?
> >
> >
>
>



Nov 18 '05 #6

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

Similar topics

3
3812
by: Phil Frost | last post by:
Greetings all. I'm attempting to embed a python interpreter at a very low level in an OS I am writing. Currently I'm stuck with build issues. Firstly, as there is no working C compiler in our OS, I must cross compile Python. I encountered errors when building Parser/pgen; I got around this by building it nativly and copying it. Hopefully this won't get me later... My current problem (and there are sure to be more ;) ) is when building...
4
2776
by: Alicia Haumann | last post by:
I accidentally sent this to webmaster@python.org, so this could be a duplicate if "webmaster" forwards it to this list. :{ Hi, there. Thanks for any help that can be offered. I've been working with Python for a year or more now, but only doing simple extending in C/C++. I'm now attempting some embedding and several questions have come to mind. BTW - I'm running Windows 2000 with Python23 and VisualC++ developers
11
4489
by: Anna | last post by:
Hi all. I want to embed the EMBED tag in the object tag. I understood that I need to provide a PARAM tag inside the OBJECT whose value will hold the content of EMBED src attribute, but after that I've got confused. For example, what should be put into classid and codebase attributes of the OBJECT now embedding the EMBED tag?
56
6925
by: alan b | last post by:
I copied it and tried to edit the movie.htm below in the <PARAM NAME=*** location of the file where the videoclip is on my hard drive. It is already recorded by Windows Media Player. My version is 9.0 although it is coded 5.0 in this htm file. Let me know if it is able to be fixed. *** denotes where it is edited to locate the path where the videoclip is.
8
1788
by: Alan Lue | last post by:
Hi, I'm trying to set up a webpage so that I can view multiple HTML files from the same page. For example, you might go to http://example.com/lab_tests.html and be able to view lab1.html, lab2.html, and lab3.html right on that page. If you're viewing this message w/a monospace font, the page layout might look like this: +-------------------+ | Header | * Code for Header and
3
2495
by: Gérard Talbot | last post by:
Hello all, When webfonts are used for purely cosmetic/ornemental reasons and on a large scale, I don't agree. When webfonts are used because Unicode support among browsers for a particular language (like a Canadian Aboriginal language) is inexistent (see http://www.alanwood.net/unicode/unified_canadian_aboriginal_syllabics.html ),
4
3169
by: markoueis | last post by:
Is there any way to embed a ClickOnce Application into the browser? I love the way ClickOnce works, but the problem is I would like it to display the windows form in the browser. I could use a simple embedded dll, but then i lose the trust prompt that ClickOnce offers. Any ideas? Mark
0
1422
by: hq4000 | last post by:
Given AStyleSheet.xsl : <AStyleSheet> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.mytest.mytest2.mytest3.com" version="1.0"> <xsl:output method="xml" indent="yes"/> <xsl:template match="/"> <xsl:element name="Test">it works</xsl:element> </xsl:template>
7
3675
by: atlkhan | last post by:
I have a flash movie I want to include it in the webpage. How this can be done.
14
11030
by: ginugopinath | last post by:
I am doing a project on social n/w website,one of the features being webcasting.Now for webcasting there is a need for an encoder s/w(say Real Producer Basic),I have this .exe downloaded. Now I need to embedd this in a webpage using PHP. Please do help me. Note: From <ULR removed>,I have got this Real Producer SDK and it consist of: 1.bin 2.convert 3.docs 4.include
0
8459
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
8791
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
6206
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...
0
5677
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4202
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4376
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2786
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
2018
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1783
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.