|
If you are new in JavaScript I think that you should be aware that you can have Objects. They are very helpfull and it is a good practice to use them as it produces more tidy code...
For example if you want to hold user info you can go:
<br />
var user = new object;<br />
then you can assign variables to that as such:
<br />
user.name = "name";<br />
user.surname = "surname";<br />
user.isAdmin = true;<br />
and so on...
and then you retreive the values as such :
<br />
var tempVar = user.isAdmin;<br />
try and use this... it makes your code look better and more tidy. Also it easier to handle variables. Sometime you might end up with too many variables in JavaScript, such as flags etc.
You could make a flags object to hold them all there...
Just a suggestion my friend...
theJazzyBrain
Wise is he who asks good questions, not he who gives good answers
|
|
|
|
|
We are planning to develop a web application to print Crystal reports using some tools in Visual Studio .NET. We have a web server Oracle 9i Application Server. Can you tell me what configuration is required to run such application from a web browser?
Eilzabeth
|
|
|
|
|
I have a recordset which contains data from a select query and get an error '800a01b6' Object doesn't support this property or method: 'eof' error. The code looks like this:
r=connect.execute("SELECT * FROM SomeTable WHERE SomethingIsTrue")<br />
<br />
while not r.eof<br />
'Do something with r<br />
r.movenext<br />
wend
If I put Response.Write(r(0)) before the while loop, I get the data I'm expecting. Other methods also don't work, such as CursorType, MoveNext. Any idea how to fix this?
Thanks,
Aaron Stubbendieck
modified 12-Jul-20 21:01pm.
|
|
|
|
|
Oops, deleted the first post.
Tony
|
|
|
|
|
I'm using a loop to go through all the records and display them.
modified 12-Jul-20 21:01pm.
|
|
|
|
|
I just ran the following, and it ran succesfully.
Does this look simular to what you are running?
<%
Dim objConnectionString
Dim objRecordsetString
Set objConnectionString = Server.CreateObject("ADODB.Connection")
Set objRecordsetString = Server.CreateObject("ADODB.Recordset")
objConnectionString.Open "Provider=Microsoft.Jet.OLEDB.4.0;" &_
"Data Source=E:\stuff\grocertogo.mdb"
Set objRecordsetString = objConnectionString.Execute ("SELECT * FROM Products ORDER BY ProductID")
%>
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Interdev 6.0">
</HEAD>
<BODY bgcolor="">
<font face="Tahoma" size="1">
<table cellpadding="0" bgcolor="008080" width="683" height="400" cellspacing="1">
<%
Do While Not objRecordsetString.eof
%>
<tr>
<!--call out our table and corresponding rows-->
<td bgcolor="#e6e6e6"><%=objRecordsetString("ProductID")%></td>
<!--</tr>-->
<td bgcolor="#e6e6e6"><%=objRecordsetString("ProductName")%></td>
<!--</tr>-->
<td bgcolor="#e6e6e6"><%=objRecordsetString("Manufacturer")%></td>
<!--</tr>-->
<td bgcolor="#e6e6e6"><%=objRecordsetString("UnitPrice")%></td>
<!--</tr>-->
<td bgcolor="#e6e6e6"><%=objRecordsetString("Servings")%></td>
</tr>
<%
objRecordsetString.MoveNext
Loop
objRecordsetString.Close
Set objRecordsetString = Nothing
objConnectionString.Close
Set objConnectionString = Nothing
%>
<table>
</BODY>
</HTML>
Tony
|
|
|
|
|
I feel really stupid now. The problem I was reusing a recordset object from before, and it doesn't work to just do: r=Connect.Execute("SQL STRING"), it has to be set r= if I want to use it again. I spent a couple of hours trying to get that to work, and it was something simple as that. Thanks though for your help, I realized the problem when I was looking at your sample code.
-Aaron
modified 12-Jul-20 21:01pm.
|
|
|
|
|
Hi there,
I am developing a website and I am quite new to using CSS. I already have a lot of HTML to change/update that I think someone generated using word or frontpage. I want to apply styles to the standard heading tags h1 etc..
Can I do this but leave all the old etc tags in the html file or do I have to remove them(There are hundreds). I was trying to work out if there is an order of precedence for the tags, but I can't seem to work it out.
sorry if this is a stupid question.
|
|
|
|
|
Andy,
It sounds like you should start by doing a copy and paste of the HTML tags into notepad.
Do this and save it as HTML, and see how your HTML behaves with your CSS Additions. Not knowing what your HTML code looks like I would try this and see how it turns out.
I'm sure you'll get more good suggestions from the other members here, there is a lot of good folks here that have loads of experience with HTML, and programming.
Tony
|
|
|
|
|
I believe that if you have explicit styles coded into the HTML they will override to styles you specify in your css file - I don't know for sure because I try always to use one or the other method, but never both at the same time. If you have multiple css files linked into the page, the last one linked takes precedence over previous styles if there is any overlap in their contents. Probably the easiest way to learn it is to play with it.
Create a simple test page with several elements in it but no styles specified. Give each section or element a class name. Then create a couple of css files with the same classes defined, but different styles associated with each, and link them into your html page HEAD section. View the results before and after changing the order in which they are linked in the page, then add some explicit style attributes in the HTML itself and see what effect that has. An hour or two of playing with it will probably answer a bunch of questions.
"The Lion shall lie down with the Lamb; but the Lamb will not get much sleep..." Lazarus Long
|
|
|
|
|
Hi again,
I had a play around with it, and it looks like the style sheets get overridden by the html tags already present. i.e. if I do something like
<h1><u>this is a title</u></h1>
and the style sheet is set up for h1 without underline I still get underlined text. So I've taken to just commenting out the <font> tags for the moment. One thing I would like to know though, is how is it possible to make pages that use CSS compatible with older browsers, if it isn't possible to have a set of default HTML tags in the document when no CSS support is available or have I completely missed the point?
thanks andy
|
|
|
|
|
andyg.101 wrote:
how is it possible to make pages that use CSS compatible with older browsers
You can't. Older browsers don't support modern CSS. For them you have to encode the styles in your HTML and pray that they will work.
"The Lion shall lie down with the Lamb; but the Lamb will not get much sleep..." Lazarus Long
|
|
|
|
|
andyg.101 wrote:
how is it possible to make pages that use CSS compatible with older browsers
You may not want to bother. Most people use modern browsers, only a hand full in comparison use browsers that do not understand basic CSS. If you wish to support those few, then you have two choices, don't use CSS or keep two versions of your site.
Rocky Moore <><
|
|
|
|
|
I had problems with HTML genereted by WORD or Front Page...
Therefore I have created a class that cleans all the unwanted tags...
I can send it to you if you want
...
theJazzyBrain
Wise is he who asks good questions, not he who gives good answers
|
|
|
|
|
that would be cool, I'd like to see how you did it.
thanks
Andy
|
|
|
|
|
if you give me an email address I can send it to you...
Just to let you know that it a C# class.
theJazzyBrain
Wise is he who asks good questions, not he who gives good answers
|
|
|
|
|
I am programming in VC++/MFC. I have a browser control in my application. How do I load text into a browser control witout using a file(or URL)?
WebBrowser1.Navigate() takes either filelocation or URL.
Thanks in advance.
H.
|
|
|
|
|
|
I need to write a pro-quality database web application, using all MS technologies. I can't emphasize enough that The app must have COM controls that do not use .NET!
Well, I am thinking about ASP.NET. How difficult is that to use with COM objects in a web application? What is the development environment for ASP.NET? I assume VS 7.0? (I am a VC 6.0 guy).
Can Visual Studio 7.0 be used to develop for ASP and COM without using .NET?
|
|
|
|
|
Popeye Doyle Murray wrote:
How difficult is that to use with COM objects in a web application
Easy, just add a reference to the project and whoala.
Popeye Doyle Murray wrote:
What is the development environment for ASP.NET? I assume VS 7.0?
Yes, also you can try a WebMatrix, wich is free (and yet from Microsoft)
Popeye Doyle Murray wrote:
Can Visual Studio 7.0 be used to develop for ASP and COM without using .NET?
Yes
Philip Patrick
Web-site: www.stpworks.com
"Two beer or not two beer?" Shakesbeer
|
|
|
|
|
I'm curious as to the requirement for COM and no .NET?
If this is a web app what does it matter what you use on the backend?
|
|
|
|
|
Mark Nischalke wrote:
I'm curious as to the requirement for COM and no .NET?
We have existing C++ classes that are required for some of the data processing, and these do not use .NET (and we use VC++ 6.0 only, to keep cost down and productivity up). So to leverage the existing code, they will be wrapped in COM objects.
Mark Nischalke wrote:
If this is a web app what does it matter what you use on the backend?
Mainly what I stated above, but it is also because the web app may actually be sold to customers on installed on their servers, so it affects the customers system requirements.
I am curious your perspective on those answers.
|
|
|
|
|
I have one ASP.NET (C#) site that uses COM objects for some functionality. I would say it is a non-issue. You can use COM and .NET effectivly.
You could also simplify your deployment and updating by using ASP.NET.
|
|
|
|
|
Dear All,
I am creating a self service utility for users to reset the password for their colleague’s Win2K id in a domain. But to reset the password, one should have admin privileges. Since we can not give everybody admin privileges, we thought of binding the object using Admin credentials (OpenDSObject) and then using this admin object to reset the password. But since multiple users will be simultaneously accessing the site, please advice whether same credential used to bind the same object will create the problem or not.
Looking for an update eagerly
Thanks a lot In advance
|
|
|
|
|
I have error message "Apache.exe: module "mod_jrun20.c" is not compatible with this version of Apache (found 20020329, need 20020903). Please contact the vendor for the correct version".
/* I download the last version */
|
|
|
|