|
fakefur wrote:
You should also point out that the three digit version (ie, #fff) is only useful if the digits are the same. You cannot specify #f36523 in three digit notation which makes it a very small convenience mostly.
The 4096 colors that you can specify with the three digit code is sufficient for most cases. The colors #f36523 and #e62 is not possible to distinguish unless you display them right next to each other, and even then you will hardly see the difference. I seldom use colors outside what can be specified with the three digit code. So, in real life the convenience is not that small.
fakefur wrote:
And Christian is correct in assuming that 0xfff = 0x000fff as it does mathematically speaking. The short usage in web colors is a very weird way to use three hex digits.
Again, that would be true if the color code would be a single value. Any mathematical rule only applies in the environment where it is defined. Although the hexadecimal value ead is the same as 000ead, the word "head" is not the same as the word "h000ead".
fakefur wrote:
And yes you do sound as if you are lecturing him.
Yes, maybe it does, and maybe I am. I corrected him as he was offering guidance in a field where he obviously did not have the sufficient knowledge. His answer to this is that the way things work is ridiculous. Maybe he needs a lecture...
---
b { font-weight: normal; }
|
|
|
|
|
I'm looking for an automated way of creating web directories on a per-user basis in IIS 6.0. I know Apache can do it, for instance:
http://www.example.com/~jdoe/
would load the public_html directory of jdoe. This is described more in the Apache Documentation[^].
Is there any way that IIS emulates this behavior?
Thanks,
Adam
-- Adam
"If you can't beat your computer in chess, try kickboxing"
|
|
|
|
|
I'm building a page that displays a potentially very large table. It consists of 'nodes' that can be expanded and collapsed (a tree structure). I'm using an Http request that fetches the appropriate Xml and slots it into the correct position into the Xml Dom on the client. And then I have to render the page again using XSL to display the new structure. There could be up to 5000 lines or more in some cases and re-rendering this every time will be too big a load on the client's CPU. So I’ve written some code that only transforms the fragment of xml that I returned and now I want to slot it into the correct place in the table. I'm having trouble with this though, because it does not seem to recognize the 'processor.output' as Html (or an Html node when I try to do this using the Html Dom). There must be a way of doing this and I think it’s just a matter of syntax. Any suggestions would be greatly appreciated.
A snippet of the code:
<br />
function TransformFragment(node)<br />
{<br />
var objNodeDOM = new ActiveXObject("MSXML2.DomDocument");<br />
objNodeDOM.async = false;<br />
var fragment = "<Fragment> </Fragment>";<br />
objNodeDOM.loadXML(fragment);<br />
<br />
objNodeDOM.firstChild.appendChild(node);<br />
<br />
var xsl = new ActiveXObject("MSXML2.FreeThreadedDomDocument");<br />
xsl.async = false;<br />
xsl.load("StructureFragment.xslt");<br />
<br />
var template = new ActiveXObject("MSXML2.XSLTemplate")<br />
template.stylesheet = xsl<br />
processor = template.createProcessor()<br />
<br />
processor.input = objNodeDOM<br />
processor.transform()<br />
<br />
var objHtmlDOM = new ActiveXObject("MSXML2.DomDocument");<br />
objHtmlDOM.load(processor.output);<br />
<br />
var id = node.getAttribute("ID");<br />
var oTr = document.getElementById(id);<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
}
|
|
|
|
|
Hi all,
In the header i want to display the system date.
What i want now is, i want the date to be displayed in german language.This should be done in javascript.
How can i do this.
can anyone help me in this regard....
Thanks in advance...
|
|
|
|
|
You can check out the toLocaleString method of the Date object.
Otherwise you have to use the methods of the Date object to get the portions of the date and assemble the format by hand.
---
b { font-weight: normal; }
|
|
|
|
|
Hi,
In my Web application, I use Word 2003 automation to convert .doc files to .html files.
The problem is, this conversion only runs once. It appears to run correctly: Word starts, converts and closes. The second time it runs, an error occurs (0x800a1066), and the WINWORD.EXE process does not quit. Actually, each failed conversion starts a new WINWORD.EXE process. Only a reboot can clean up this mess, just killing the processes is not enough.
I tried changing the visibility to true, then to false, to no effect. I tried providing the calls with explicit parameters (in stead of 'missing'), that also did not work. I also tried explicitly releasing the COM objects (as suggested in a Microsoft KB article), but you can guess what happened..
When I copy the exact piece of code to a stand-alone console application (that quits when it's done), then start this application in a separate process from my web application, all runs well!! I would never see this as a permanent solution, though, the automation should just work from the web application.
Maybe someone has an idea?
Here's the code:
<br />
private static void save_word_as_html(string word_file, string html_file)<br />
{<br />
object objMissing = System.Reflection.Missing.Value;<br />
object FileOpen = (object)word_file;<br />
object FileSave = (object)html_file;<br />
object objSaveFormat = (object)WdSaveFormat.wdFormatFilteredHTML;<br />
object objOpenFormat = (object)WdOpenFormat.wdOpenFormatAuto;<br />
object objNoSave = (object)WdSaveOptions.wdDoNotSaveChanges;<br />
object objTrue = (object)true;<br />
object objFalse = (object)false;<br />
<br />
Exception retEx = null;<br />
<br />
Word.Application wordApp = null;<br />
_Document doc = null;<br />
<br />
if (m_app == null)<br />
m_app = new Word.ApplicationClass();<br />
wordApp = m_app;<br />
<br />
Word.Documents docs = wordApp.Documents;<br />
<br />
try <br />
{<br />
wordApp.DisplayAlerts = WdAlertLevel.wdAlertsNone;<br />
wordApp.Visible = false;<br />
<br />
doc = wordApp.Documents.Open(ref FileOpen,ref objFalse,ref<br />
objTrue,ref objFalse,ref objMissing,ref objMissing,ref objFalse,ref<br />
objMissing,ref objMissing,ref objOpenFormat,ref objMissing,ref objFalse,ref <br />
objFalse,ref objMissing,ref objTrue,ref objMissing); <br />
<br />
doc.SaveAs(ref FileSave, ref objSaveFormat,ref objFalse,ref<br />
objMissing,ref objFalse,ref objMissing,ref objFalse,ref objMissing,ref<br />
objMissing,ref objMissing,ref objMissing,ref objMissing,ref objMissing,ref<br />
objMissing, ref objMissing, ref objMissing);<br />
<br />
} <br />
catch (Exception E) <br />
{<br />
retEx = E;<br />
}<br />
<br />
try <br />
{<br />
doc.Close(ref objNoSave,ref objMissing,ref objMissing);<br />
NAR(doc);<br />
docs.Close(ref objNoSave,ref objMissing,ref objMissing);<br />
NAR(docs);<br />
wordApp.Quit(ref objNoSave,ref objMissing,ref objMissing);<br />
NAR(wordApp);<br />
} <br />
catch (Exception) {}<br />
<br />
GC.Collect();<br />
GC.WaitForPendingFinalizers();<br />
<br />
if (retEx != null)<br />
throw retEx;<br />
}<br />
<br />
private static void NAR(object o)<br />
{<br />
try<br />
{<br />
System.Runtime.InteropServices.Marshal.ReleaseComObject(o);<br />
}<br />
catch {}<br />
finally<br />
{<br />
o = null;<br />
}<br />
}<br />
|
|
|
|
|
I want to display the web page in a IE browser control.
How to resize the web page with the control?
Thanks!
|
|
|
|
|
can somebody tell me what is wrong with this javascript i am new to using javascript
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
<HEAD>
<meta name="GENERATOR" Content="Microsoft Visual Studio 7.0">
<meta name="CODE_LANGUAGE" Content="C#">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
</HEAD>
<body MS_POSITIONING="GridLayout">
<form id="esignature" method="post" runat="server">
<div align="left">
<table border="0" cellpadding="0" cellspacing="0" width="100%" height="91" background="images/design_elements/back.jpg" ID="Table1">
<tr>
<td nowrap width="295" height="91" valign="top">
<OBJECT id="Shockwaveflash1" codeBase="https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" height="91" width="295" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000">
<PARAM NAME="_cx" VALUE="7805">
<PARAM NAME="_cy" VALUE="2408">
<PARAM NAME="FlashVars" VALUE="">
<PARAM NAME="Movie" VALUE="221inside.swf">
<PARAM NAME="Src" VALUE="221inside.swf">
<PARAM NAME="WMode" VALUE="Window">
<PARAM NAME="Play" VALUE="-1">
<PARAM NAME="Loop" VALUE="-1">
<PARAM NAME="Quality" VALUE="High">
<PARAM NAME="SAlign" VALUE="">
<PARAM NAME="Menu" VALUE="-1">
<PARAM NAME="Base" VALUE="">
<PARAM NAME="AllowScriptAccess" VALUE="always">
<PARAM NAME="Scale" VALUE="ShowAll">
<PARAM NAME="DeviceFont" VALUE="0">
<PARAM NAME="EmbedMovie" VALUE="0">
<PARAM NAME="BGColor" VALUE="FFFFFF">
<PARAM NAME="SWRemote" VALUE="">
<PARAM NAME="MovieData" VALUE="">
<PARAM NAME="SeamlessTabbing" VALUE="1">
<embed src="221inside.swf" quality="high" bgcolor="#FFFFFF" WIDTH="295" HEIGHT="91" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">
</embed>
</OBJECT>
</td>
<td nowrap background="images/design_elements/topr.gif" width="100%" height="91" valign="top">
<img src="images/MNEClaimsmain.gif" align="right" width="300" height="91"></td>
</tr>
</table>
</div>
<div align="left">
<table border="0" cellpadding="0" cellspacing="0" width="100%" ID="Table2">
<tr>
<td width="100%" height="30" bgcolor="#666666">
<font size="2" color="#ffffff"> Logged In: <%=session("company_name")+ " " + "|" + " " + session("name") + " " + "-" + " " + session("Area")%></font></td>
<% if (session("company_name") = "Mayflower National Life Ins") or (session("Area") = "Management Area") Or (session("Area") = "Administrator Area") Or (session("Area") = "Mayflower National User Area") then%>
<td width="100%" height="30" bgcolor="#666666"><A href="defaultadmin.asp"><font color="#ffffff" size="2">Home</font> </A></td>
<%End If%>
<td width="100%" height="30" bgcolor="#666666"><A href="logout.asp"><font color="#ffffff" size="2">LogOut</font></A> </td>
</tr>
</table>
</div>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<input type="submit" name="esignature" size="10" value="E-Signature" onclick='signature()' ID="esignature">
<br>
<INPUT id="prt" style="Z-INDEX: 102; LEFT: 179px; POSITION: absolute; TOP: 475px" value="test1.asp" type="hidden" name="sig">
<br>
<br>
<INPUT id="sig" style="Z-INDEX: 101; LEFT: 179px; POSITION: absolute; TOP: 523px" value="test2.asp" type="hidden" name="prt">
<br>
<input type="submit" name="print" size="10" value="Print" onclick='printpdf()' ID="Submit1">
</form>
<script language="jscript">
function printpdf()
{
//**********************************************************************
//here is my problem "document.esignature.prt" is says not an object
// can somebody tell me how i need to do this
//**********************************************************************
var link=document.esignature.prt;
Window.location=link;
return;
}
function signature()
{
//debugger
alert(document.esignature.sig.value);
//var link = document.esignature.sig.value;
//window.length=link;
return;
}
</script>
</body>
</HTML>
thanks
chad
|
|
|
|
|
You have the form and the button named the same thing, try naming the submit button to something like sigSubmit
|
|
|
|
|
ok changed it to submitsig and it still does not work anyother ideas
chad
|
|
|
|
|
You have one field with the id "prt" and the name "sig", and one field with the id "sig" and the name "prt". I think that the reason for the element not being recognised is that they collide in some way.
---
b { font-weight: normal; }
|
|
|
|
|
ok thanks that was my problem did not even see it
i have one more question
how to i make javascript goto another page
i tryed
window.location="webpage.aspx";
but this does not work what do i need to do to make this work
chad
|
|
|
|
|
Please use periods to end your sentences.
Try again. That is exactly how you do it.
---
b { font-weight: normal; }
|
|
|
|
|
Hi All,
I am using a Calendar control in C#. I want to get the Selected Date and set it in the parent web-page text box.
Heres my code. Its to be done at client side.
function fn_Select()
{
xElem=window.opener.document.CreateTasks.txtDate;
cElem = document.test.Calendar1;
txtDate.text=cElem.SelectedDate();
}
*CreateTask is the parent web-page formname
*txtdate is the parent web-page textbox in which I want to set the Selected Date
*test is the Current Page form name
*Calendar1 is the Calendar name
--cElem is undefined when I am putting an alert...
Can anyone help me?
Thanks
|
|
|
|
|
Calendar1 is a javascript object, or the Calendar control that exists in the .NET framework ?
The names that you give things on the server don't flow direct to the client. The calendar control certainly won't be a single object in your html, if it's the Calendar class in your html. Are you sure it even has a SelectedDate method available to jscript ?
View the source of your HTML, and then you'll see what objects are there, and what they are called.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Hi,
The Calendar1 is the .Net framework Control i.e. Calendar Control.
I viewed the source of the HTML, its name is Calendar1.
I am not sure whether SelectedDate method is available to javascript or not. How can I know whether the method is available to the client side?
Whats the other option of scripting it at client side?
Can it be done with the .net Calendar control at Javascript side?
Thanks
|
|
|
|
|
just4ulove7 wrote:
I viewed the source of the HTML, its name is Calendar1.
I've just created a project to make sure. You have a TABLE named Calendar1.
just4ulove7 wrote:
I am not sure whether SelectedDate method is available to javascript or not. How can I know whether the method is available to the client side?
It's not. The ASP.NET framework uses viewstate to maintain class objects between round trips on the server. The client just gets HTML.
just4ulove7 wrote:
Whats the other option of scripting it at client side?
None, as far as I can see. If you want to grab the selected date in jscript, you need to inject it into your code as a variable that jscript can see. I think any jscript is a messy option, personally. The calendar control creates a table with link buttons that post back to report to the server what the new selected date is.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
That means I need to script at serverside and make the value available to the parent form through some hidden textbox?
I am quite new to Web Development,
Thanks for the help.
|
|
|
|
|
just4ulove7 wrote:
That means I need to script at serverside and make the value available to the parent form through some hidden textbox?
No, you can actually use RegisterClientScriptBlock to add jscript directly to your page, like this
Page.RegisterClientScriptBlock("CreateVariable", "client script goes here);
The first string is a key, which is used to make sure the same script is not added twice. The second is your script.
However, I reiterate that I don't see it as ever being a good idea to use this stuff if you can avoid it. Different browsers have different javascript implimentations, it can cause grief very quickly.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Oops.. I think things are getting more complicated for a simple task!!!
Can u suggest me what shud I use?
I have a textbox and a button, When I click on the button a page with a calendar pops up, and on selecting the date, it shud set in the parent text box.
Thanks...
|
|
|
|
|
If you can force the parent page to refresh itself, and then get that date from somewhere on the server ( stored in the session, probably ), I reckon that's the best way to go.
This[^] MSDN page has more to say about using modal forms in ASP.NET than I know, I recommend looking there.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Thanks a lot,
Will read the article, and work out something
|
|
|
|
|
Hi,
Had any body worked with Mapguide ActiveX control.Iam using this component in my webpage using C#.when the control is displayed in the aspx page I'll draw a rectangle on the map and that selected rectangle has to displayed in a new window.
Anybody Anybody.....
regards
|
|
|
|
|
Hello everybody.
These days I was looking at Ajax.NET[^]. This is a library that is used to call .NET methods from JavaScript. What impressed me so muck was how .NET types are mapped to JavaScript objects. Take a look at the following code:
[Serializable]
public class Person
{
public string FirstName;
public string FamilyName;
public int Age = 0;
public Person NewChild()
{
Person p = new Person();
p.FamilyName = FamilyName;
return p;
}
public Person[] Children = null;
} And the JavaScript part of the code:
function test12_callback(res)
{
var s = res.value.FirstName + " " + res.value.FamilyName + ":\r\n";
for(var i=0; i<res.value.Children.length; i++)
s += "\t" + res.value.Children[i].FirstName + "\r\n";
alert(s);
} How is this achieved? Is it also possible to map a PHP type to a JavaScript object? Can I create a JavaScript object using a simple XML document?
Thank you,
Stanimir.
|
|
|
|
|
when using iis i have a virtual directory with my project file it work but when i rename the virtual directory to what i wnat it called it wont work, ive tried iisreset and rebooting, it works for every other name but the name i want to be called is there anyone that ever had similar problems????
|
|
|
|
|