|
How much text? You could use a hidden <div> and then make it visible when the user clicks on the link.
Brian Van Beek
<a href=http://spaces.msn.com/members/bvanbeek>My Blog is Awesome, ok maybe not, but is still fun!!</a>
|
|
|
|
|
I’m trying to understand how a regular windows application can be started when the user clicks on a link to a particular filetype in a browser.
Background (in case its important)
I have a normal windows app which has registered its filetype (say “.xyz”) so that double-clicking on a “.xyz” file in Windows Explorer opens the “.xyz” document in my application. This is done by a few registry keys:
HKEY_CLASSES_ROOT/.xyz “MyPrivate.Doc”
HKEY_CLASSES_ROOT/MyPrivate.Doc/shell/open/command “<path to="" app="">”
(I’ve omitted other entries under HKEY_CLASSES_ROOT/MyPrivate.Doc)
The files happen to be XML data.
---What happens when I click on a link to a “.xyz” file in Internet Explorer?
If the “.xyz” file is on my system, then NOTHING happens. If, however, I right click the link and copy shortcut, and paste it into the browser address bar, my application gets run fine. I find EXACTLY the same behaviour if the link is to a “.doc” file – MSWord gets run (or not).
If the “.xyz” file is on a different server, then while a link to a “.doc” file correctly runs MSWord, but “.xyz” files simply get displayed as pretty-printed XML text.
My theory (based on trying to read up on this) …
IE is looking at the file content. Since a “.doc” is binary its falling through a bunch of tests and choosing the system file association of “.doc” to run MSWord.
Since an “.xyz” file contains XML its being identified as text so IE decides it can display it itself.
So my question is: how can I tell Internet Explorer (& hopefully ALL browsers) that my application is the proper handler for files of type “xyz” ?
I believe this has got something to do with mime-types (content-types) but I’m unclear how to define these. I see mention of telling the external server the content type of these files. Is it not possible to perform this association from within my application?
Why is IE’s behaviour for local files different from its handling of remote files?
|
|
|
|
|
Hi all
Well...
I know it is a simple question for guys like you,
But I need an answer.
I have an HTML with 2 FRAMES. Frame A & B.
I need that when function "doit()" runs on 'A',
it will call the function "runme()" on frame 'B'.
and the function runme() will run on the 'B' frame and will change the 'B' parametrs.
is there a way to do it ? ?
Somthing like:
function doit()
{
runme();
B.runme();
}
JavaScript of course.
10x
----------
The Server
|
|
|
|
|
Found it
<SCRIPT language="JavaScript">
function doit(){
parent.frames["frame_B"].runme();
}
</SCRIPT>
|
|
|
|
|
hi all
i want to migrate my iis6 config to my new server
so i do a backup, and try to restore it on the new server
ms says "invalid signature"
apparently a restore is only possible on the same hardware... (uh? how stupid can they be?)
so they make a sepperate tool for migration instead of integrating one in iis...
aaaaand...
guess what...
the ONLY link on the entire internet to that migration tool is..... yeah u guessed right: DOWN
been looking everywhere for a mirror
it seems the iis resource kit contains a migration tool too, but this is an old version with bugs
so my question:
can anyone plzzzzz provide me with a mirror of Internet Information Services 6.0 Migration Tool 1.1?
the filename is IISMT.msi and it is 378KB in size...
http://www.microsoft.com/downloads/details.aspx?FamilyID=2aefc3e4-ce97-4f25-ace6-127f933a6cd2&DisplayLang=en
--> this is the one that is down (messaged ms about it allready)
http://www.microsoft.com/downloads/ThankYou.aspx?familyId=56fc92ee-a71a-4c73-b628-ade629c89499&displayLang=en
--> and this one only contains the old version
|
|
|
|
|
hi
i want to create new folder in my website programmaticaly.
how i can do it?
thanks
|
|
|
|
|
Use
System.IO.Directory.CreateDirectory
But you need to ensure that the parent directory has the right permissions set, for the reduced webserver account.
|
|
|
|
|
how do i make a default button so when my users press enter on my webform it automaticly presses my login button
thanks
chad
|
|
|
|
|
Try the following:
<br />
Page.RegisterHiddenField("__EVENTTARGET", "btnLogin")
|
|
|
|
|
I need to make a javascript keyboard, as I am making a web app for touch screens. Is there a way that I can check which of the textboxes on my form had the focus when the button corresponding to the letter is clicked?
|
|
|
|
|
Set the onfocus event for each textbox to assign a variable to reference the box. When a textbox is focused the varible will then hold a reference for it so you could then alter the textboxe's value through the variable.
For example
Setting the current field:
<input type="text" onfocus="selected_field = this;" />
and a key board button could alter the field like this:
<input type="button" value="A" onclick="selected_field.value+='a';" />
|
|
|
|
|
Hi, thanks so much for this, it works perfectly. Out of interest, do you know of a way to prevent firing the event when a textbox is not selected? I have only just started working with Javascript, so I am not certain.
|
|
|
|
|
How could I install a application which is packed under .msi to client server?
I have read about .cab file too... what is the differences between the two?
I wish to make a silence install so should I go with .msi or is it possible to do it with .cab since it seem much less troublesome.
|
|
|
|
|
Hi guys,
I've used PHP quite a bit before, and I'm now moving over to ASP.
In PHP, I would create a common functions file called functions.php, and use require('functions.php') at the top of every page.
I am having trouble trying to replicate this in ASP.
In a single page scenario, I have this code, which queries a database:
<br />
Dim Conn 'Create the ADOBD connection object<br />
Dim rs 'Create the recordset object<br />
<br />
set conn = server.CreateObject ("ADODB.Connection") <br />
Conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & server.MapPath ("Rental.mdb")<br />
<br />
set rs = server.CreateObject ("ADODB.Recordset")<br />
<br />
<br />
rs.Open "SELECT [BALANCE] FROM [MEMBER] WHERE [MEMBERID] = " & session("memberID") &"", Conn
So, I created a functions.asp page, and placed all code EXCEPT the rs.open line, into it. That page looks like this:
<%<br />
Function SetupConnection()<br />
<br />
Dim Conn 'Create the ADOBD connection object<br />
Dim rs 'Create the recordset object<br />
<br />
set conn = server.CreateObject ("ADODB.Connection") <br />
Conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & server.MapPath ("Rental.mdb")<br />
<br />
<br />
set rs = server.CreateObject ("ADODB.Recordset")<br />
<br />
End Function<br />
%>
I then placed this in the original page, above the rs.open line...
SetupConnection()
When calling the original page, I get:
Object required: ''
/account_main.asp, line 11
Line 11 is the rs.open line.
Am I completely missing the point here? The only thing I can assume is that it's something to do with the scope of variables.
|
|
|
|
|
In one form I save a variable in a view state like so:
ViewState["Color"] = "red";
I then call Response.Redirect(nextPage.aspx)
In the page load function of nextPage.aspx I try and read the variable using this:
string sColor=(string) ViewState["Color"];
but there is nothing there!
What am I doing wrong?
thanks
Brian
|
|
|
|
|
Hi Brian. ViewState is maintained for one page and its postbacks. When you redirect to another page, a new ViewState is generated.
In your context, you may want to set a cookie rather than use ViewState, or use a Session variable: Session["Color"] = "red";
|
|
|
|
|
Thanks Mike.
I did just that and things are working.
Perhaps you can answer this question for me
If I defne an aspx page with html controls, can I use code behined file to handle the code for those controls? This would mean that the controls are handled client side...
Brian
|
|
|
|
|
Hi Brian. The code-behind file (and the .aspx file for that matter) is compiled and executed server-side only. You can declare standard <html> controls with the runat="server" attribute to access them server-side. Here's a simple example:
<%@ Page Language="C#" %>
<script runat="server">
void Page_Load(object o, EventArgs e)
{
myHeading.InnerHtml = "This is the Heading";
myText.Value = "Default Value";
}
</script>
<html>
<head>
<title></title>
</head>
<body>
<form runat="server">
<h3 id="myHeading" runat="server" />
Here is a standard HTML text box:
<input type="text" id="myText" runat="server" />
</form>
</body>
</html> If you want to manipulate html controls client-side, you'll need to look at javascript for that.
|
|
|
|
|
Hi ,
i am facing one problem in decripting the dat in asp...
situation is:
there are 5 fields in webpage .... one among them is to upload them is to browse the file field... i am using
'--- all fields are here---
when i am clicking on submit button .. my image is uploaded to the server ... now i am trying to insert the image path and other field in the database on the next page..i am trying to fetch the variables by using request("variablename").. but the value is not comming on next page...
... can any body help me hoe to decript the value...
please tell me this asap...
i will be highly thakful to you if u can transfer code ...
thank you,
chandan sharma
|
|
|
|
|
Are you using a third party COM component todo the uploading? I'm assuming this is classic ASP (not asp.net). Usually the component doing the uploading has methods to get access to the form variables.
|
|
|
|
|
hi,
i am programming website in which i am uploading image to the server...
my file and the folder( in which image is going to upload ) they are present in the same directory. i am writing this code...
Upload.Save("Upload_Image")
when i am giving absolute path then my programm is uploading the image.. but when i am giving relative path then it is not uploading the file to the server...
how to know the drive name of the server ....in which my file will be present....
can any body help me...
|
|
|
|
|
If I understand you correctly you need to use the Server.MapPath method.
This will turn your relative path into an absoulte path.
|
|
|
|
|
thanks for your kind help....
|
|
|
|
|
Hi All...
I have a problem that I will write you down.
I have a web page that use client side xmlhttp ( "Microsoft.XMLHTTP" with javascript ) object to update a piece of data in the page. It work well, accept the clients which use PROXY server to reach internet. Clients with Proxy always gets the oldest data. What can I do to overcome proxy problem when using xmlhttp in client side to reach the data on my server?
tahnx a lot...
not: I use asp with windows 2000 server on server side and I allow only ie 5.5 up broser to see that page.
karanba
|
|
|
|
|
I think you need to set the expiration (which is a header) on the page. I think something like Response.Expires = 0 is what you are after.
|
|
|
|