|
Sorry for confusion!!
I am just talking about the VBScript compiler that Hide code (like changing into binary to protect the source code to be pirated by others)
I heard about Microsoft Script Encoder includes command line program called screnc but didn't find in my PWS awa IIS 3.x later too.
I will be very thankfu to you if you provide me any URL.
Thanks
|
|
|
|
|
I don't understand how in ASP empty strings are handled. I check if if a field in a resultset has indeed a value. If not, I'll add "" to the dictionary. Afterwards, I want to use the items in the dictonary but there's not "" in some fields, but the Object-type null! So I have to test on it and set the string to "" myself
// oRs is a ADODB.ResultSet
// d is a Scripting.Dictionary
e = new Enumerator(oRs.Fields);
for (;!e.atEnd();e.moveNext()) {
i= e.item();
if (typeof(i.value) != "unknown")
else d.add(i.name, "");
}
arr = (new VBArray(d.Keys())).toArray
for (i in arr) {
q1= d(arr[i]);
if (q1 == null) q1= "";
q= Server.HTMLEncode(q1);
}
Can anyone help me?
|
|
|
|
|
This is a database-issue, not an ASP-one. NULL-values in a database (even in text-fields) are not the same as empty strings!
In MS Access, I think there is an option of allowing a text-field to contain empty values (e.g. ""). But its always a good idea to check for NULL.
In VBScript: if IsNull(q1) then, in JScript as you did, I think (never used JScript in ASP myself).
|
|
|
|
|
I have an html-'template' with a form in it.
When it is submitted, the entries will add to an ADODB.COMMAND to update a record in a database.
I am having difficulties with empty form-entries: ADODB.COMMAND.Execute() is complaining about 'cannot use 0-length strings'. A simple workaround like if (s == "") s= " "; does the trick, but that's ugly: I don't want random spaces to appear in my database!
Anyone?
|
|
|
|
|
I'm not positive what your trying to do here but it seems that if you have a chance of a data being an empty string. And this is valid for your application then you should allow zero length fields in your database.
Good Luck!!
|
|
|
|
|
|
hi,
I need to authenticate users to a web site but the problem is I dont want to use session variables, because the site is to be hosted on a web farm running multiple servers and pages can be served from any server. I am trying to figure out how we can authenticate users and how users can be identified after login, in this setup.
any ideas will be appreciated
thanks for your time
karthik
|
|
|
|
|
Hi Karthik,
I have recently read this article at ASPtoday. It should be the solution you are looking for
http://www.asptoday.com/articles/20000704.htm
Regards, Tom.
|
|
|
|
|
If I have a database that has a whole lot of files in it that are incoded in BASE64. Is there some way I can return them straight to HTML so the browser knows to it is downloading a file....e.g.
I want to return the BLOB so that I am really returning an HTML page to the person will see www.xyz.com/download.asp and download.asp contains something like
Content-Type: application/octet-stream;
name="test.exe"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="test.exe"
qANQR1DBwA4DXCexCm8KkTsQAv9wDCPX+7o05gnUq0hH5nEPofQ5a8bpnx82OqvmgKCd65fBIbz9
8GjkmslBrB9N+LU7G0RMbhIZFYHcoqOMW1Jje64UR/6TLQ/61Fw+v/j0bsPXU8/ACdb0tX9kNjR8
C/0C/0k7nBcylnZmMHrYXeuGfjAnLjyXMu08+wCCCf0IYn6COEZObwCXlESgOXfIITMq44QJno91
w4enDZ5t0X9KewUrcVh8hUq4WKsXGPRI0DV5YlJEuNAImlf+DvL4DrtI9cHCTgPZ0XOtEPSlchAM
AKIJh+R2vswfQheAla7fkLp1hqShCra1DkXTdU41EHfwf9EVmOs2d9ovLuFWnH8ukqh8BYNjXuxK
Rfo13mMXqRQBW5b0pKcVPONOcokD2mDaKiuYIbmwm6A+I9LUfAoxg9tj6IrF1LxL53Ysq3FMxqh0
OJKg5iYpBqnhCVgUon6p/Fn41onF9HVhbxZsdRTpIum9YjctoMGNb3DTclp9tX/cEFIGvhuOTZUR
6401S=
and then the browser will know to pop-up a download dialog.
|
|
|
|
|
Personally, I haven't come across such an issue as yours, but I found the following ASP/Vbscript sample code in MSDN..
Response.ContentType = “image/gif”
Set cnnPubs = Server.CreateObject(“ADODB.Connection”)
cnnPubs.Open “pubs”, “sa”
Set rstPub_Info = cnnPubs.Execute(“SELECT logo FROM pub_info WHERE _ pub_id=’1389'”)
Response.BinaryWrite rstPub_Info(“logo”)
Response.End
The idea is to stream out the blob contents to the browser. The example above is probably just a trivial one. Please follow up to
“Delivering Web Images from SQL Server,” by Scott Stanfield (MIND, July 1998) for more info.
MIND is at www.microsoft.com/mind.
Check out "Top Ten Tips Accessing SQL Through ADO and ASP" By J.D. Meier in MSDN.
Hope that helps..
regards
Arup
|
|
|
|
|
I'm sorry about those emoticons.. they were not intentional.
|
|
|
|
|
I am using the MSXML DOM to transform my XML document into HTML using an XSL style sheet.
The XML has tags like this:
<mytag txt=" indented text" />
in the XSL, I reference the txt attribute and output it like this:
<xsl:value-of select="@txt" />
This works fine except the spaces at the front of the string are stripped. I want my spaces back.
I've tried various combinations of xml:space="preserve", <xsl:preserve-space contents="*" /> and anything else in the sparse documentation that looked promising. No luck yet.
Thanks for any help in advance.
(note: it's funny/ironic that the script that processes _this_ question was parsing out my < and > characters, AND it is reducing the three spaces in front of my "indented text" line above to one space.)
|
|
|
|
|
I faced the exact problem and I'm still seeking for an answer. I haven't used IE 5.5's MSXML DOM object yet on this.. I don't know if that fixes the problem. What I have done is to use the following temporary solution.. I embedded some characters in the XSL to represent the spaces and newlines ( eg.. i used "|" for a newline, a "_" for space and "~" for a tab ). Then I processed the XML using the XSL, and replaced all the characters with their actual counterparts ( i.e. replaced the "|: with a newline, the "_" with a space and so on ).
I know that the solution is crude, but it works ( albeit temporarily ).
Please let me know if you come across a more elegant answer.
Hope that helps
regards
Arup
|
|
|
|
|
I have used ActiveX Control in my Web Page. Suppose a client machine does not have this control registerred in the machine. So what script - .inf file or cabinet file i should write in order that the control is downloaded & registerred in the client machine. The dowload should also depend on the type of the browser IE4/5 or netscape. So depending on this IE4.0 a simple control is downloaded & if the it is IE5 then an improved or enhanced version of the control is loaded & registerred. In case of Netscape what to be done.
Pl. let me know.
|
|
|
|
|
Here is a piece of code I use for that:
<br />
<object classid="clsid:fbbaa605-56d2-11d2-a7f8-00a0cc2001a3" codeBase="client.cab#version=0,4,0,25" id="mase" width="1" height="1"><br />
</object><br />
The version-part is the version-resource of an active-x, contained in the cab file.
This only works with IE (no IE-version-checking here). I think Netscape does not/just partly (through 3rd party plugins) support ActiveX.
So you should use ActiveX only when you know the target platform (e.g. Intranet).
|
|
|
|
|
Hi,
There is an article in MSDN "Internet First Steps: Upgrading an Existing ActiveX Control", which explains how to package controls for the downloading.
Regards,
Alex Gorev,
Dundas Software.
|
|
|
|
|
I am a beginning level programmer.
I am doing expanding tree and collaspe tree in Netscape but it doesn't work well.
Here is my code
[pre>
[blockquote>
[div id="root" class=root>
[a href="#" onClick="expand(node1)">Root
[/div>
[div id="node1" class=node>
[a href="#" onClick="expand()">Node1
[div id="subnode1" class=node>
[a href="#" onClick="expand(leaf1)">SubNode1
[div id="leaf1" class=leaf>
leaf1
leaf2
leaf3
[/div>
[a href="#" onClick="expand(leaf2)">SubNode2
[div id="leaf2" class=leaf>
something1
something2
something3
[/div>
[/div>
[a href="#" onClick="expand()">Node2
....
[a href="#" onClick="expand()">Node3
....
[a href="#" onClick="expand()">Node4
...
[/div>
[/blockquote>
[/pre>
The problem is I can't expand the second level.
I just can do only expand for the first level
that is expand(node1) is perfectly done
But if I use to separate each block (each level)=> use it the same as ... It will cause some messy pages in IE.
Need help from generous people or professional or expert.
|
|
|
|
|
|
I am sure that everyone knows how to make a browser window scroll down to the specific place on the page:
all you need to do is add #MyTag at the end of your link. That works great when user clicks on the link. However, if you try to do the same thing with Response.Redirect "mypage.asp?Param1=1#MyTag" it doesn't work. Does anyone know of any way I can Response.Redirect and scroll the page at the same time?
TIA.
Kostya.
|
|
|
|
|
Tried this myself in IE, too. Seems that this does not work.
You could try:
- the Refresh meta-tag in the tag, instead of Response.Redirect or
- do some JavaScript in the OnLoad -event of the target page, to go to the anchor.
|
|
|
|
|
Thank you Uwe.
I did get it to work with JavaScript. My biggest problem was that I had no control over the body tag - I am trying to write an ASP script that would attach to any page. So I it took me a while to figure this one out.
What I had to do is define a script as <script for=window event=onload language=JavaScript>. That worked for IE. For Netscrape I had to define an empty layer with OnLoad event handling like <layer OnLoad="ScrollPage()"></layer>.
Thank you.
|
|
|
|
|
Let me guess - Nutscape will only allow 6 layers in one document, right?
I officially no longer support Nutscape, it is so *&^%$! crap.
I have spent days mucking around doing something so simple in concept and trying to get it to work in IE and Nutscape, and 99% of the problems have been with NS. This is the last straw, it is not capable of displaying anything but ridiculously simple DHTML. No wonder IE is more popular.
Comments?
|
|
|
|
|
I do not like Netscape myself, but I think that there is no 6 layers limitation there. Check this page out for example (it has about 20 layers): Sycamore Software.
Kostya.
|
|
|
|
|
I also dislike netscrap. But I also agree that there is not a 6 layer limit. For example this site http://legendweb.nmt.com has over 30 layers. Many third party .js libraries have requirements for how layers are initialized. You want to look out for this.
Good Luck!!
|
|
|
|
|
Thanks for the nice name NutScape, that is what such products are.
Aaah I hate netscape, oops Nutscape, Nutscape really sick
|
|
|
|