|
yeah, i know it is a very broad queation, but I thought it might open up a broad discussion about the major points. Im tending to steer away from the java platform given that a windows/desktop version is so much more powerful - but then how realsitic is than everyone can 1. load software onto their machine and 2. assume everyone uses windows
|
|
|
|
|
Instead of using onclick , you can use a real <a> tag with javascript: in the href , e.g.:
<a href="javascript:load_musique();">Musique</a>
- Mike
|
|
|
|
|
hooo!! nice, thanks!
Maximilien Lincourt
"Never underestimate the bandwidth of a station wagon filled with backup tapes." ("Computer Networks" by Andrew S Tannenbaum )
|
|
|
|
|
Hello, I've got the following code
test.asp
<%@ language="Javascript" %>
<%
var Connection,Recordset;
Connection = Server.CreateObject("ADODB.Connection");
Connection.Open("thesourcename");
var strSQLQuery = "SELECT * FROM clients WHERE .... "
Recordset = Connection.Execute(strSQLQuery);
Session("test") = Recordset.Fields("user_name");
Response.Redirect("test1.asp");
%>
and I've got another code ...
test1.asp
<%@ language="Javascript" %>
<%
Response.Write(Session("test"));
%>
Someone PLEASE tell me what am I doing WROOOOOOOOONG bacause ASP is driving me crazy. The book sais that the Session object should store the values from page to page.
I get an ADODB.Field no longer available error message. Could someone please tell me why ?????????????????
I've got almost the same code in VBScript and it works ....
WHAT'S WRONG ??
Thank you !
|
|
|
|
|
Apologies for not answering your actual question but don't do what you are doing. You are leaving connection objects to the database open, redirecting to other pages without closing them. That is not good.
Maybe explain what you want to do and we can recommend some better ways of doing it.
regards,
Paul Watson
Bluegrass
South Africa
Brian Welsch wrote:
"blah blah blah, maybe a potato?" while translating my Afrikaans.
Crikey! ain't life grand?
|
|
|
|
|
Don't mind the fact that I'm not closing the recordset and the connection. In real life I do that ...
The problem is that I want the test1.asp script to display the content of the Session("UserName") but I am not succesful because I get an error saying that :
Error Type:
ADODB.Field (0x80020009)
Object is no longer valid.
/meteo/test1.asp, line 3
Here is the code:
test.asp
<%@ language="Javascript" %>
<%
var Connection,Recordset;
Connection = Server.CreateObject("ADODB.Connection");
Recordset = Server.CreateObject("ADODB.Recordset");
Connection.Open("Clienti");
var strSQLQuery = "SELECT * FROM clienti WHERE nume_utilizator = \'" + "radio" +"\'";
Recordset=Connection.Execute(strSQLQuery);
Session("UserName") = Recordset.Fields("nume_utilizator");
Recordset.Close();
Connection.Close();
Response.Redirect("test1.asp");
%>
and test1.asp
<%@ language="Javascript" %>
<%
Response.Write(Session("UserName"));
%>
|
|
|
|
|
Ok, my ASP is a bit rusty but I think the problem is because you are storing the object itself, not the value. Because you close the connection, the object becomes invalid.
Damn, JScript needs a ToString() method
David Wulff, a JScript genius, says you should use Session("UserName") = String(Recordset.Fields("nume_utilizator")); .
regards,
Paul Watson
Bluegrass
South Africa
Brian Welsch wrote:
"blah blah blah, maybe a potato?" while translating my Afrikaans.
Crikey! ain't life grand?
|
|
|
|
|
Seems to be working (for now) ... thank you !
|
|
|
|
|
Use the below
<% @LANGUAGE = VBScript%>
This will also help you to get rid from unimportant error.
And be COOL.
Himadrish Laha
|
|
|
|
|
Hi, I'm a bit confused trying to distinguish between RegionInfo and CultureInfo, after reading a few articles. So, please let me know if my understanding is correct:
1. "CultureInfo":
1.1 CurrentCulture, of type CultureInfo, is for "functions" or "Methods" that formats according to Thread.CurrentThread.CurrrentCulture". Example:
MyDate.ToString(); //This will format according to "CurrentCulture"
Reference: http://docs.aspng.com/quickstart/aspplus/doc/internationalization.aspx
"CurrentUICulture", like CurrentCulture, is of Type "CultureInfo". The difference is that CurrentUICulture is used in locating the appropriate satellite assembly. Say, if CurrentCulture="US-En" and CurrentUICulture="de-DE", then, the framework will still look under "de-DE" folder for the satellite assembly when ResourceManager is instructed to do so. But, still, why distinguish between the two. CurrentCulture and CurrentUICulture? Has anyone find themselves in situation in which CurrentCulture needs to be different form CurrentUICulture??
2. RegionInfo: I have no idea what we need this for... Although reference can be found here:
http://docs.aspng.com/quickstart/aspplus/doc/cultureencoding.aspx
Why region? Is all that it do is to tell what Currency Symbol and metric or not? Why not embed this information in CultureInfo??
Thanks!
|
|
|
|
|
Hello,
Currently I have an ASP based login system where once the user's credentials are checked, it cookies them with their username and password. On every protected page an include file revalidates that information and redirects the user if it doesn't match the information in the database. Instead, after verifying the user's credentials, could I set a session variable and then just check for that session variable being set in the include file? Are there any possible security issues that could arise from this setup (I'm aware of some of the ones in my current setup)?
Thanks,
Aaron Stubbendieck
modified 12-Jul-20 21:01pm.
|
|
|
|
|
You can set session variables as such:
<br />
Session("userName") = strUserName<br />
and then access the variable as such:
<br />
strUserName = Session("userName")<br />
and you can check it within your include as such:
<br />
If Len(Session("userName"))=0 Then<br />
Response.Redirect "login.asp"<br />
End If<br />
Or have a boolean variable:
<br />
If Not Session("isLogged") Then<br />
Response.Redirect "login.asp"<br />
End If<br />
You can acces Session variable from anywhere in your ASP app.
theJazzyBrain
Wise is he who asks good questions, not he who gives good answers
|
|
|
|
|
Thanks, I'll try that out.
Aaron Stubbendieck
modified 12-Jul-20 21:01pm.
|
|
|
|
|
Under normal circumstances the Session is stored using cookies anyway. But using the Session object is easier. Certainly we have used Session for login validation on each page, it works fine.
I would recommend not storing the password and username pair in a cookie unless you are using some devious encryption. Even then, rather don't.
regards,
Paul Watson
Bluegrass
South Africa
Brian Welsch wrote:
"blah blah blah, maybe a potato?" while translating my Afrikaans.
Crikey! ain't life grand?
|
|
|
|
|
Thanks, I was aware that cookies would be used anyway but I'm glad to hear its a practical approach. Storing the password in the cookie was my may concern since it is transmitted plain text.
Thanks,
Aaron Stubbendieck
modified 12-Jul-20 21:01pm.
|
|
|
|
|
How would I go about serializing a method call in a SOAP format without calling a web service? I want to queue these calls before transporting them, so I want to call a method on a proxy, and have the proxy give me the SOAP document that it would normally POST to the web service.
|
|
|
|
|
I don't know a direct answer to your question, but you could look into building your own webservice proxy and reading the SOAP standard so that you can encode it yourself. Might be a bit of overkill though.
Why are you wanting to do this?
regards,
Paul Watson
Bluegrass
South Africa
Brian Welsch wrote:
"blah blah blah, maybe a potato?" while translating my Afrikaans.
Crikey! ain't life grand?
|
|
|
|
|
I can't use the web services directly as the user is normally only online once or twice a day. I plan on using a queue of method calls that are executed against the server side object when the user does connect, and are then committed on the client side if the server operation was successful.
I think that for convenience, if I can get it right, it would be best to call a method on a SOAPSerializer and have that read the WSDL and generate the XML string which I can then queue.
Hallelucination - when you think you see God
|
|
|
|
|
since I'm not sure exactly how to "word" the question properly for the subject I put some keywords ...
I'm using an iframe as a placeholder for some html, selected from a menu; a very basic configuration.
I'm trying to remove the frames from my pages and I think that the replacement is the iframe, which is working fine.
I can use some basic javascript to load a page into my iframe, when the user click on some text.
<p id="load_load_musique" onclick="load_musique()" >Musique</p>
and
...
function load_musique()
{
parent.document.getElementById("content_id").src="musique.html"
}
...
The question I'm really asking, is that I want to make the clickable text look like a normal link, with the cursor, I know that I can do this by adding onmouseover, onmouseout, which is working ok, but seems wrong. and Can I change the cursor ?
Thanks for anything...
Max.
Maximilien Lincourt
"Never underestimate the bandwidth of a station wagon filled with backup tapes." ("Computer Networks" by Andrew S Tannenbaum )
|
|
|
|
|
You have to use styles.
I think that there is a style that can be configured as such:
<br />
<span style="cursor:hand;">Clickable text</span><br />
Check the MSDN documentation for further information but I think that this works...
theJazzyBrain
Wise is he who asks good questions, not he who gives good answers
|
|
|
|
|
Would you recommend any tutorial/reference on how to install and enable HTTPS with IIS? I know how to use "makecert.exe" to generate a test certificate for testing. I know how to use "Network Monitor" to sniff for passwords and stuff. I know how to bring up "Certificates" snap-in from "MMC" (Microsoft Management Console). But then how do I proceed from tehre..? There're many folders under "Certificate" snap-in. For example: Personal, Trusted Root CA, Intermediate CA... etc. None of which appears to be appropriate for the purpose of assigning a certificate to my web server. How do I proceed from here to enable SSL for my site?
Thankyou!
|
|
|
|
|
Hello Friends,
Output of my ASP page can be properly printed using Landscape format.
So, I would like to provide a Print button on my ASP page, which on clicking should open a Print dialog box with its 'Orientation of Page' property set to 'Landscape', OR if this is not possible then directly starts printing the page with default property except orintation which should get set to
'Landscape'.
Can anybody tell me is this possible in ASP?
Thanks in advance.
Pranoti
|
|
|
|
|
You can't currently. For one, any browser that lets a page print without prompting the user is a bad browser. There is also no way (without using ActiveX, Java, etc.) to change the initial values in the Print dialog when using the print method.
Even with CSS there is no way.
Your best bet is to have a blurb at the top of the page to tell the user what to do. You can use CSS to hide this blurb when printing, too. Lets say your stylesheet to which your linking is defined like so:
body { font-family: arial; }
.blurb { border: 1px solid black; background-color: gray; color: red; }
@media print
{
.blurb { display: none; }
} In your printable page, have something like this at the top, right after body:
<div class="blurb">To optimize your print-out,
click the File->Print menu in your browser, click on Properties,
then select Landscape. Click OK twice.</div>
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
Land record in format using in India specially in Uttar Pradesh.
|
|
|
|
|
Nice and...
A student knows little about a lot.
A professor knows a lot about little.
I know everything about nothing.
|
|
|
|