|
I'm working in a CHTMLView and trying to pass information to a print template.
I have found one method that works. Since I dynamically build the document I can place a non-display tag with an ID:
<div id="IEFooter">
My footer
</div>
That I can access in the print template with:
dialogArguments.__IE_BrowseDocument.getElementById(id)
that works, but I'd like more flexibility. When the document is loaded but before print/print preview I'd like to set the value. I can get the value but put_innerText always sets it to a NULL string:
IDispatch *pHtml = GetHtmlDocument();
IHTMLDocument3 *pHtmlDoc = NULL;
IHTMLElement *pDiv = NULL;
pHtml->QueryInterface(IID_IHTMLDocument3, (void **)&pHtmlDoc);
pHtmlDoc->getElementById(L"IEFooter", &pDiv);
if ( pDiv )
{
BSTR text;
pDiv->get_innerText(&text);
text = L"this is my dynamic footer text";
HRESULT hr = pDiv->put_innerText(text);
hr = pDiv->get_innerText(&text);
}
I've moved IEFooter around in the document but that doesn't seem to matter.
I tried a separate approach, using CHTMLView::PutProperty. That appears to work in that I can retrieve the string with GetProperty in my app but have no idea how to get to that property in JScript.
Any suggestions will be appreciated.
|
|
|
|
|
using the thousand monkeys at the keyboard approach I happened upon a solution. put_innerHTML happens to work, in this case, for me...
Many thanks to MS for their detailed documentation and extensive supply of sample code.
|
|
|
|
|
Hi,
I have developed small web application using ASP.Net and MySQL. I need to access this application using IP address from my friend system(In Office). Is it possible? I am having Windows XP.
Note:
From Windows 2003 Server I am hosting that web application and changed localhost to IP Address and its possible to access from others system. (ie) Server IP address (http://192.145.1.20/VDR/Login.aspx)
How to acheive by Windows XP with IIS?
Thanks,
Subbu
|
|
|
|
|
I have been trying to embed a flash coverflow.
The coverflow requires flash player version 10, I have this installed and when i tested using HTML the coverflow displayed with no problems. I then tried adding the same code to an aspx page and the file is not being displayed.
Can anyone shed some light on my problem? Ant help is greatly appreciated.ASP all the way
|
|
|
|
|
hi,
We have one web application. When we run this application first we will get login page there we given our credentials(Windows Authentication). It is working fine.
Now we deployed this application, now it is not redirecting next page even if we given proper username and password.
Can anybody help me how to resolve this one.
|
|
|
|
|
Hi guys, i am building a program to export some data to excel, i've used this code:
Set ExcelApp = CreateObject("Excel.Application")
ExcelApp.Workbooks.Add
Set ExcelBook = ExcelApp.ActiveWorkbook.Sheets(1)
ExcelBook.Cells(1,1).Value = "name"
ExcelBook.Cells(1,2).Value = "code"
ExcelBook.SaveAs "E:\inetpub\wwwroot\dominios\file.xls"
ExcelApp.Quit()
Set ExcelApp = Nothing
Set ExcelBook = Nothing
but, im having problems with the "code" cell, i need to transform this cell into a string or text type, and i dont know how to do this, i already tried
ExcelBook.Cells(1,2).Type = String, and didnt work... can some one help me please???? thank u very much... and sorry for the bad english.
|
|
|
|
|
|
it doesnt work for me, i need it in ASP, not in .NET... and it cant be on <table>, cuz the outher program that will read the file, cant read this <table>(html) excel.... thank u anyway
modified on Wednesday, February 10, 2010 10:49 AM
-- Modified Wednesday, February 10, 2010 10:50 AM
|
|
|
|
|
Hi,
IIS 6.0 was wokring on my Laptop but right now it is not working at the moment.
Ihave tried so many times to start IIS (Default Web Site) but I am not able to do so
I think it is happning due Apache Server which I have installed recently.
Could you please help me out- How can I start IIS again?
Thanks in advance.... Thanks,
Ankur Bakliwal
|
|
|
|
|
Switch off Apache and try (from a command line) iisreset /reset.
If that doesn't do it try unsinstalling Apache and reinstalling IIS.
|
|
|
|
|
how to refresh (not redirect) a HTTPS page with simple html code?
what I want to do is to refresh a secured page every few minutes so that it won't time out. the pc is blocking activeX or even javascript. so need to use simple html code. meta http-equiv="refresh" work with HTTP pages but not HTTPS pages.
any help are greatly apprecaited.
|
|
|
|
|
Mate, i think, using HTML you can't perform that, but javascript will help.
below coding is refreshes the page every 5 seconds. but i can't able to check in HTTPS page because i don't have any of that.
<body onload="window.setTimeout('window.location.reload()',5000);"> Please let me know if this works
thatraja
|
|
|
|
|
Hi everyone,
I'm learning CSS and am stuck already.here is my brief coding and the CSS part can't work:
<html>
<head>
<title>
This page is not yet ready for prime time
</title>
<style type=”text/css”>
body { color: gray; font-weight: bold; font-family: Arial; font-stlye: italic }
</style>
</head>
<style type=”text/css”>
.special { color: green; font-size: 125%; }
b i { background-color: yellow; }
b,i { font-weight: bold; color: blue; }
</style>
<div class=”special”>
This is a special block and <b>bold</b> words should appear
differently than they do in regular text.</div>
<p>
And this, by contrast, is regular <b>bold</b> text,
with a little <i>italics</i> tossed in for luck
and an example of <b><i>italics within bold</i></b>.
</p>
<body>
Morgan’s Desk <br />
Somewhere in Cyberspace
<p>
Dear Reader,
</p>
<p>
Thank you for connecting to my Web server, but I
regret to tell you
that things aren’t up and running yet!
They will be _soon_, but they aren’t today.
</p>
<pre>
Sincerely,
Morgan Freeman
</pre>
<hr width = "60%"/>
<blockquote>
Page Design by Morgan Freeman (mfreeman@gmail.com)
</blockquote>
</body>
</html>
Is there any body who can figure out why my CSS code can't work??? please please help <pre></pre>
|
|
|
|
|
MorgSim wrote: Page Design by Morgan Freeman (mfreeman@gmail.com)
Oh my good, Morgan Freeman's here to ask for help with his CSS!! sorry, couldn't resist.
|
|
|
|
|
If this was a joke it is very funny !
Try it this way for better results.
<html>
<head>
<title>
This page is not yet ready for prime time
</title>
<style type="text/css">
body { color: gray; font-weight: bold; font-family: Arial; font-stlye: italic }
</style>
</head>
<style type"text/css">
.special { color: green; font-size: 125%; }
b i { background-color: yellow; }
b,i { font-weight: bold; color: blue; }
</style>
<div class="special">
This is a special block and <b>bold</b> words should appear
differently than they do in regular text.</div>
<p>
And this, by contrast, is regular <b>bold</b> text,
with a little <i>italics</i> tossed in for luck
and an example of <b><i>italics within bold</i></b>.
</p>
<body>
Morgan’s Desk <br />
Somewhere in Cyberspace
<p>
Dear Reader,
</p>
<p>
Thank you for connecting to my Web server, but I
regret to tell you
that things aren’t up and running yet!
They will be _soon_, but they aren’t today.
</p>
<pre>
Sincerely,
Morgan Freeman
</pre>
<hr width = "60%"/>
<blockquote>
Page Design by Morgan Freeman (mfreeman@gmail.com)
</blockquote>
</body>
</html>
|
|
|
|
|
Hi Daveyerwin, thanks very much that helped.....just looking forward to be the master web developer....
|
|
|
|
|
Maybe that your post was not meant as a joke ?
I dunno, but I'm still ROFL .
Good luck with your mastery of web development.
|
|
|
|
|
I'm amazed it still works with the "body" tag where it is. I guess it's the usual laxity of browsers in dealing with badly-formed html... Days spent at sea are not deducted from one's alloted span - Phoenician proverb
|
|
|
|
|
Hi All,
I have used below iframe code,
<iframe frameborder="0" scrolling="no" overflow="auto" width="570" height="585" src="http://www.accentureforum.dk"></iframe>
but its problem with IE8, its saying below error.
"Navigation to the webpage was cancelled"
Please help on this issue.
Thanks in advance.Raaj
|
|
|
|
|
Mate, it's working for me in IE8 with compatibility mode. Just apply the compatibility mode in IE8, Or you can include the below code in your webpage for compatibility issues.
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
thatraja
|
|
|
|
|
or... how to get around the idiotic security nonsense iis7 seems to want to use
*breathes*
given that i'm never going to get those 2 hours of my life back i will try to salvage something from them by asking here
i have a website (asp.net c# iis7) and i have changed the log file path to be a folder called "logs" in the webroot ... so my logs end up in something like "blah.com/logs/wsvc4/ex12345.log" and so on as they roll over
i want to be able to process them but am not allowed to access the folder from my cms code ... access denied exception keeps getting thrown and i cannot find anyway to get around it ... googling has found me nothing that makes any sense so i turn to (hopefully) far better minds than mine for this stuff
thnx
"mostly watching the human race is like watching dogs watch tv ... they see the pictures move but the meaning escapes them"
|
|
|
|
|
This is usually a permission problem. And it is your code that needs access, not the IIS so the user: IUSR_MachineName (or "Internet Guest Account"), won't do.
If it's a server it's probably the NETWORK SERVICE user that need to be given the proper permissions.
If you're not anal about security it's easier to give access to IIS_WPG (Worker Process Group).
If it's none of these then you can find out what the worker identity is by querying System.Security.Principal.WindowsIdentity.GetCurrent.Name
|
|
|
|
|
I am a .NET programmer I have only written windows forms apps against of mySQL. I am needing to move into doing some web dev for several reasons. What I would like to know is what technology/technologies should I learn? I am thinking ASP.NET, JavaScript and XML but I don't really know enough about web dev to make a educated decision about it. The first application I will be writing will be a small intranet for submitting problems, phone list etc the next app will be a web interface written using the business logic from a .NET windows app.
So...
Why use ASP.NET why not?
Is there a better alternative to Javascript?
Any reason to learn VBScript?
What about HTML 5 will that eliminate the need for any of these?
PHP?
JSON vs XML?
Now WHAT ABOUT WPF!!!! AND SILVERLIGHT!!!!
This is the reason that I have actually avoided web development. There are way to many choices and you can't make just one it has to be some combination of these.
Any help is appreciated.
Thank you all for reading thisHumble Programmer
|
|
|
|
|
Why use ASP.NET why not?
A broad topic with many branches, too broad for a simple answer. It depends on skills, environment, requirements, etc., etc.
Is there a better alternative to Javascript?
No
Any reason to learn VBScript?
None
What about HTML 5 will that eliminate the need for any of these?
HTML 5 isn't supported on most browsers so don't even consider it yet
PHP?
What about it?
JSON vs XML?
Two different technologies. You can't compare them
Now WHAT ABOUT WPF!!!! AND SILVERLIGHT!!!!
WPF is WINDOWS Presentation Foundation and obviously doesn't apply to web development
programmer_vb.net_c++ wrote: This is the reason that I have actually avoided web development.
Then you have been doing yourself and your career a huge disservice
programmer_vb.net_c++ wrote: There are way to many choices and you can't make just one it has to be some combination of these.
And Windows development is straight forward with one choice?? I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Hi,
It all depends on what your goal is. If you are wanting to use windows as your operating system, then you should definitely use ASP.NET. Have you ever heard of ASP.NET web services? If yes, then those will do the trick for you. That means, you can make your architecture to be service oriented. Since your application is a commercial application, I presume that it has been systematically categorized in to a Database, Data Access Layer or ORM, Business Logic Layer, Service Layer (if any) and presentation or the UI layer. All the projects accept UI layer are .NET assemblies and UI is Windows Forms project. You can make the service layer as a .NET assembly or a service. If you have this classification, then you can simply add a web UI layer and use the the same database / business objects from the browser. Ofcourse that is if you decide to use ASP.NET...which is the easiest approach. But if you want to make the task more challenging then...Good luck.
If, however, there is any change in the OS or the environment, then you might consider other alternatives like HTML (supported versions) along with Java script, AJAX, XML and all. There is a lot of help provided by google to use javascript and other languages and technologies for web development. However, their main languages for business development remain Java and C++.
In my opinion, if you want your performance to be gr8, stay away from php and other dynamic languages for server side programming. php however provides a good help for development with 100s of starter kits available and can be used if there is not going to be a great deal of traffic (requests) for your web application.
There is more to tell...yet it will come to you by the way of research. So put your head down and get used to terms in web technology. Some of them are Server side and client side programming, Caching, Sessions, Cookies, post backs, http handlers, hits, requests, responses, url mappings and more...they are not technology specific. Since you have developed n/w oriented apps on windows it will be easier for u to sight the differences...
Thanks and Regards,
Bhushan
|
|
|
|