|
You're missing the bit where you need a text input with an Id of txtAddress. It doesn't exist, and so the code won't work.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Thanks for reply...
i checked the textbox, its 'id' & 'name' properties exists but im not sure whether it has initialized/loaded when this code executes. how can i ensure this?
Regards,
Affan Ahmad Toor
..................
QUAIDIAN FOR ONCE, QUAIDIAN FOR EVER!
|
|
|
|
|
View the source of the page itself. For example, if this is an ASP.NET server control, the Id is autogenerated for the client side and is not what you see in your code.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
It's about parentesis more than likely - try the following:
<br />
var txt=(document.getElementById("txtAddress")).value;<br />
<br /> "Knock me down, I'll get straight back up again, I'll come back stronger than a powered up pacman"
(Lilly Allen / Kaiser Chiefs)
|
|
|
|
|
RichardGrimmer wrote: It's about parentesis more than likely - try the following:
var txt=(document.getElementById("txtAddress")).value;
Actually very much less than likely. The extra parentheses are completely superflous.
---
single minded; short sighted; long gone;
|
|
|
|
|
Ah well - you live and learn
"Knock me down, I'll get straight back up again, I'll come back stronger than a powered up pacman"
(Lilly Allen / Kaiser Chiefs)
|
|
|
|
|
I think this is the right syntax
var txt=(document.getElementById("txtAddress").value);
|
|
|
|
|
It is possible to close the browse on IE7?
|
|
|
|
|
Do you mean write script that closes the browser ?
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
thanks for the reply, any sample code that i can use in asp.net code behind vb.net, just to close the browser because my problem is that IE7 has the capability of multi tab on one browser when if i login on one page and logoff that page then use the URL to navigate that page again, im already login to that page again without passing thru the login page
|
|
|
|
|
There is no level on which VB.NET can close the browser. The code you want, if it exists, will be javascript, all VB.NET can do, is to emit the code into your page.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
thanks for the reply, is there any javascript that can close the browser of IE7?
|
|
|
|
|
vanhawk wrote: is there any javascript that can close the browser of IE7?
IE7 prevents all scripts from closing the browser. Once the window is opened by the script, then it can be closed. But I don't think that you can close a window that is not opened by the script. This was a security hole in IE6 and it's fixed in IE7.
|
|
|
|
|
N a v a n e e t h wrote: IE7 prevents all scripts from closing the browser.
Even window.close(); after user prompt, closes only the particular tab.
|
|
|
|
|
The bug then is in your authentication code - logging off should actually log you off, not just navigate away from the page.
You can use cache control headers to suggest to the browser that it should send a request to the server for pages that require authentication, thus placing your app back in control of whether or not to comply with the user's request. And obviously, you need to ask the browser to clear out any cookies or other client-side authentication information when the user logs off.
every night, i kneel at the foot of my bed and thank the Great Overseeing Politicians for protecting my freedoms by reducing their number, as if they were deer in a state park. -- C hris L osinger, Online Poker Players?
|
|
|
|
|
Sorry if this thread does not belong here. Excuse my noobness.
Anyways, I recently set up a web server on my home network. using IIS 6.0, and a linksys router(i opened port 80, and 23)
the ftp server works fine from outside the network, so does my CS:S server. The web server on the other hand does not work.
There is no actual domain name pointing to the ip addr. I think this may be the problem.
If so does anyone know a work around or can anyone confirm this problem?
|
|
|
|
|
If you're set up with IIS, and you don't have a domain, you should be connecting to it via the IP address. If your IP is not static, places like DynDNS can set you up with a URL which they then map to your IP as it changes.
The other possible issue is a firewall blocking IIS.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
hi everybody
i want to make a print button to a part of my page
how can i make it
thanks in advance.
haitham
|
|
|
|
|
If you want to use window.print(), that does only print the entire page. So you would have to copy the html code for whatever part you want, create code for a new page from it, put the code in a new window, and print that window.
---
single minded; short sighted; long gone;
|
|
|
|
|
Hello,
Can I ask javascript related questions in this forum of web development?
I have just started with javascript.
Regards
Prithaa
|
|
|
|
|
Yes.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hello,
I would like to send the user the file that he would like to download and redirect the to the thank you page.
I have the following in page default.aspx
<br />
a href="/download.aspx?file=test.zip" here /a<br />
the download page does some code processing in the load and I do the following:
string filename = Request.QueryString["file"];
HttpContext.Current.Response.Redirect(filename);
and than i would like to redirect the user to thankyou.aspx, but i can't seem it to work.
Can anyone help me?
Thanks
|
|
|
|
|
Do a response.binarywrite to send the file, then you can redirect and the file will pop up as a download ( if you set the mime type correctly )
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
I can't get it to work, i have the following in the download.aspx load section
string filename = Request.QueryString["file"];
string output = classDBAccess.GetDownload(filename);
if (output == "false")
{
HttpContext.Current.Response.Redirect("Problem.aspx");
}
else
{
string path = Server.MapPath(output);
FileInfo file = new FileInfo(path);
FileStream MyFileStream = new FileStream(path, FileMode.Open);
long FileSize;
FileSize = MyFileStream.Length;
byte[] buffer = new byte[(int)FileSize];
MyFileStream.Read(buffer, 0, (int)MyFileStream.Length);
MyFileStream.Close();
Response.AddHeader("Content-Length", file.Length.ToString());
Response.ContentType = "application/octet-stream";
Response.AddHeader("content-disposition", "attachment; filename=" + file.Name);
Response.BinaryWrite(buffer);
Response.Redirect("Thankyou.aspx");
}
Now it only goes to the thankyou page and doesn't download the file. Any clue what i do wrong?
Thanks
|
|
|
|
|
Oh, the redirect might kill the write.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|