|
If you've been trying to run ASP pages that use the FileSystemObject and IIS keeps hanging then it may be Norton Anti-virus that's causing the problem (that is - only if you have it installed )
To allow your scripts to run:
1. Start Norton Anti-Virus
2. Click Options / Click Script Blocking.
3. Uncheck "Enable Script Blocking (recommended)".
4. Click OK.
Be sure to re-enable script blocking after the script has run.
cheers,
Chris Maunder
|
|
|
|
|
I'm working on a new layout for my site(a VERY basic version of it can be found here. As you can see, its far from completed. I have a popup menu (using a simple script and the display property) that I would like to either scroll down, or maybe fade in. Does anybody know of an example, or tutorial of some kind that I can look at? I don't want anybody to do it for me or anything(that's cheating, and ruins the fun!!). Thanks in advance.
|
|
|
|
|
this is just a folowup from my question:
I tried making a for loop that would increment the height and width of the div, maybe with a setTimeout() and then with(menu.style)height = heightvar++;
It didn't work
|
|
|
|
|
I have a problem with a frameset where I need to call a function scripted in one frame from the sibling frame. I have tried what I think the JavaScript Bible outlined but keep getting errors saying the object is NULL. Accessing variable seems to work.
I'm at a loss.
Happy programming!!
|
|
|
|
|
I tried to use the w3socket component in asp.I have written the program down which i have tried to do using this component.But i have got the output as shown below the program.The program is supposed to retrieve the page and display the HTML source.I would like to get a reply as soon as possible.
<%@ Language=VBScript %>
<%
Set mySock=Server.CreateObject("Socket.TCP")
mySock.Host="10.2.1.20:80"
theRequest="GET/Default.html HTTP/1.1" & vbCRLF
theRequest=theRequest & "Accept:text/html" & vbCRLF
theRequest=theRequest & vbCRLF
mySock.Open()
mySock.SendLine theRequest
mySock.WaitForDisconnect()
Response.Write "
" & Server.HTMLEncode(mySock.Buffer) & " "
mySock.Close()
%>
OUTPUT IN THE BROWSER:
HTTP/1.1 400 Bad Request
Server: Microsoft-IIS/5.0
Date: Fri, 04 Jan 2002 05:54:11 GMT
Content-Type: text/html
Content-Length: 87
<title>ErrorThe parameter is incorrect.
|
|
|
|
|
Hi folks,
Lately I have been spending some time attempting to get my head around ASP.NET. One on the exercises I have set myself is to build a modest little website. But I have run into a few design problems that I hope some one can help me with.
I have decided to have a standard header to each page. (Just like code project has the standard header at the top of this page.) In pure ASP I would have had these as a SSI (eg .
In ASP.NET this still works but when I attempt to add make the header a bit smarter by making it a WebForm things get all confused. This happens because they are each seperate pages with seperate C# code behind them. Which means there is two <@ Page ...> directives. Which means it doesn't work!
What is the proper design pattern/model to acheive this type of behaviour?
I hope this makes sense to you all...
Matt
------
Accept that some days you are the pigeon and some days the statue.
|
|
|
|
|
Hi,
I am trying to re write a site using smarty php templates which are based on perl's fast templates.
This question would stand no matter what the language.
Say, i totally encapsulated the html from code. Well suppose there is one part on the page that is different depending on whatever.
Now, does that mean I have to make a file for this one little snippet of html??? And if so, Whats a good way to organize this?
Am I missing somethin? It sucks to work alone!
harry
|
|
|
|
|
Hmm... I actually have no idea about PHP , but if I understand the question...
No, you don't have to have a different file. Remember that PHP is a server-side scripting language, that means you are writing the final HTML code (which the user will see) right from your .php file. Like this (as I said I dunno PHP, so writing the example like in JavaScript)
if(someVariableYouHave){
write("<H1>Hello mister</H1>");
}else{
write("<H3>Good bye, sir</H3>");
}
So if the variable "someVariableYouHave" is true, the end-user will see "Hello mister", otherwise "Good bye"
Philip Patrick
"Two beer or not two beer?" <shakesbeer>
Web-site: www.saintopatrick.com
|
|
|
|
|
|
I've just written a JavaScript collapsible table of contents for my website. It works on the basis of using the display style for the child rows.
I use Macromedia DreamWeaver to manage my site, so the table of contents is a library item that is then added to a template. The template is applied to all pages (except the home page), so the code is exactly the same on all pages and looks like this:
<table width="125" border="0" cellspacing="0" cellpadding="0" bgcolor="#FF0000">
<tr>
<td><a href="..\index.htm" class="ParentMenuItem">Home</a></td>
</tr>
<tr>
<td><a href="..\about.htm" class="ParentMenuItem">About</a></td>
</tr>
<tr>
<td><a href="..\contact.htm" class="ParentMenuItem">Contact</a></td>
</tr>
<tr>
<td id="News" class="ParentMenuItem" onClick="
var rowIDs = new Array ();
rowIDs[0] = Salamander;
rowIDs[1] = Headlines;
showHideRows (News, rowIDs, 2);">+News</td>
</tr>
<tr id="Salamander" style="display: none;">
<td><a href="..\news.htm" class="SubMenuItem">Salamander</a></td>
</tr>
<tr id="Headlines" style="display: none;">
<td><a href="..\headline.htm" class="SubMenuItem">Headlines</a></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td id="Products" class="ParentMenuItem" onClick="
var rowIDs = new Array ();
rowIDs[0] = CButtonSSL;
rowIDs[1] = CListCtrlSSL;
rowIDs[2] = CTabCtrlSSL;
rowIDs[3] = WinDiff;
showHideRows (Products, rowIDs, 4);">+Products</td>
</tr>
<tr id="CButtonSSL" style="display: none;">
<td><a href="..\products\cbuttonssl.htm" class="SubMenuItem">CButtonSSL</a></td>
</tr>
<tr id="CListCtrlSSL" style="display: none;">
<td><a href="..\products\clistctrlssl.htm" class="SubMenuItem">CListCtrlSSL</a></td>
</tr>
<tr id="CTabCtrlSSL" style="display: none;">
<td><a href="..\products\ctabctrlssl.htm" class="SubMenuItem">CTabCtrlSSL</a></td>
</tr>
<tr id="WinDiff" style="display: none;">
<td><a href="..\products\windiff.htm" class="SubMenuItem">WinDiff Add-in</a></td>
</tr>
<tr>
<td colspan="2" id="Services" class="ParentMenuItem" onClick="
var rowIDs = new Array ();
rowIDs[0] = Software;
rowIDs[1] = WebDesign;
rowIDs[2] = Graphics;
showHideRows (Services, rowIDs, 3);">+Services</td>
</tr>
<tr id="Software" style="display: none;">
<td><a href="..\services\software.htm" class="SubMenuItem">Software</a></td>
</tr>
<tr id="WebDesign" style="display: none;">
<td><a href="..\services\webdes.htm" class="SubMenuItem">Web Design</a></td>
</tr>
<tr id="Graphics" style="display: none;">
<td><a href="..\services\graphics.htm" class="SubMenuItem">Graphics</a></td>
</tr>
<tr>
<td><a href="..\support.htm" class="ParentMenuItem">Support</a></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td><a href="..\clients.htm" class="ParentMenuItem">Clients</a></td>
</tr>
<tr>
<td><a href="..\projects.htm" class="ParentMenuItem">Projects</a></td>
</tr>
</table>
The showHideRows is in a separate file, contents.js which is referenced in the page body in the template using the following:
<SCRIPT Language="JavaScript" src="..\_private\contents.js"></SCRIPT>
The content of the javascript is as follows:
function showHideRows (parentRow, rowIDs, rowCount) {
var strInnerText = parentRow.innerText;
for (i = 0; i < rowCount; i++) {
if (strInnerText.charAt (0) == '+') {
rowIDs[i].style.display = "";
}
else {
rowIDs[i].style.display = "none";
}
}
var strLabel = strInnerText.slice (1);
if (strInnerText.charAt (0) == '+') {
parentRow.innerText = '-' + strLabel;
}
else {
parentRow.innerText = '+' + strLabel;
}
}
The problem is that for two of the pages, the 'Products' part of the menu does not work, because one of the IDs is not the actual row it is supposed to be and so trying to change it's style fails in the function. Rather than being a element with it's multitude of properties, it has two properties, length and _enum . The pages in question are Products\CButtonSSL and Products\CTabCtrlSSL.
If it works for all the other pages using exactly the same code, why doesn't it work for these two?
Derek Lakin.
I wish I was what I thought I was when I wished I was what I am.
Salamander Software Ltd.
|
|
|
|
|
Well, dunno what the problem, but the solution is:
Use document.getElementById() to get a reference to HTML element, it is working fine, just tried. Plus you will get it cross-browser, otherwise your code won't work on Netscape.
Example:
rowIDs[0] = document.getElementById('Software');
Happy programming
Philip Patrick
|
|
|
|
|
Thanks very much, Philip. I'll give it a go
Derek Lakin.
I wish I was what I thought I was when I wished I was what I am.
Salamander Software Ltd.
|
|
|
|
|
im very new to html. I have two .wav files and i want to have one played, then when that one finishes, it plays the next one. I tried using the bgsound tag but that played them both at the same time. How can I accomplish this without having to combine the two .wav files into one?
-Raffi
|
|
|
|
|
I have an idea, but it is not perfect at all.. Just to make things work before you'll find a better solution.
You know the length of your .wav file, right? So make a timer in your Javascript and just change the src attribute of BGSOUND when the time is off.
A little suggestion. You can preload your second file while the first is playing, to make things smoother
Philip Patrick
"Two beer or not two beer?" <shakesbeer>
Web-site: www.saintopatrick.com
|
|
|
|
|
Raffi wrote:
im very new to html. I have two .wav files and i want to have one played, then when that one finishes, it plays the next one. I tried using the bgsound tag but that played them both at the same time. How can I accomplish this without having to combine the two .wav files into one?
This is an indirect solution to your problem and may not suit you.
Use Flash. If you are willing to put WAV files into your page (which IMHO is not such a good idea for most websites) then it should be no problem putting a Flash file in.
Simply create a SWF file with the two WAV files imported in. You can control quite a bit of the timing and looping with Flash. Then insert the SWF file into your HTML (Flash gives you the code to do this.)
You do not even need the Flash file to have a visual UI, just make the width and height 0 or put it in the HEAD.
* Do note: I do not advise putting either Flash or sound files into web pages. Both are annoying, make for large web pages, are not a standard and do not actually add much to your site. If you want people to hear something you have created then let them download or stream it from a link that they click.
regards,
Paul Watson
Bluegrass
Cape Town, South Africa
"The greatest thing you will ever learn is to love, and be loved in return" - Moulin Rouge
Martin Marvinski wrote:
Unfortunatly Deep Throat isn't my cup of tea
Do you Sonork? I do! 100.9903 Stormfront
|
|
|
|
|
I have one vc++ application.In that i have taken exe and i made a cab file.One .ocx control is present this ocx calls the exe file.I placed the cab file in net,so whenever a user clicks one link then the cab file is calling.So that my exe file is executing.Actually my ocx component is having the virisign registration.So,my component is providing some security to the user sytem.For security purpose it is showing one dialog box that is showing this message.
"Warning:The authority of this content can't be verified,therefore it can't be trusted.
Problem Listed below
The test root has not been enabled as a trusted root.Do you want to install and run the "abc" signed on 2001-12-11,....etc."
My Doubt:Even though i have registered ocx component,but it is showing this type of dialog box like the authority of this content can't be verified.
So,is it problem of creation of cab file.So,how can i solve my problem.So that i can supply trusted software to all endusers.
Can anybody help me in this case.
it is a company which deals with AI and different
types of web based applications
|
|
|
|
|
Help Help Help
I read and used the article "Adding a search facility to your website" from this site. Very useful but I'm having a problem instantiating it on a Win NT server. It works well on my Win 2k web server/laptop.
I coded the asp to use a specific catalog because the one for this site is not the default catalog. When I put it (the html pages and catalog) on the NT server and used the search facility despite my specifying a catalog to use, it is still searching everything on the server that has the search term(s). I have the catalog only using the site's specified file folders.
What am I missing or doing wrong??? I'm going to pull my hair out over this real soon.
Thanks,
Dia
|
|
|
|
|
Hello everyone,
I have a couple of questions that I hope someone can help me with
Computer OS: Win2k Web Server: IIS 5.0
1. I am working on an ASP page that will access my Access Database so visitors will be able to search my site. It is going to search through a field with a Memo data type(thanks John!). I thought it would work if I used the following SQL statement:
"SELECT * FROM Content WHERE Contents LIKE '%search'" . I decided to use the "LIKE" statement for the following reason: I designed my database was to have a table called "Content" with two fields "Contents" and "Page". I entered the webpages content into "Contents" and put the name of the html document in the “Page” field. If the “LIKE” statement found the keyword it would do a Request.Write(search) in an HTML tag that the visitor could then click. My problem is it doesn’t work so I’m submiting what I have and maybe an undeniable great Guru and Programming expert such as John can help me.
<%
var search = Request.Form("Search_Form");
var oConn;
var oRs;
var filePath;
var Index;
var strsearch = "SELECT * FROM Content WHERE Contents LIKE " + " \' %" + search + " \' ";
var filePath = Server.MapPath("Search.mdb");
oConn = Server.CreateObject("ADODB.Connection");
oConn.Open("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" +filePath);
oRs = oConn.Execute(strsearch);
%>
<%
while (!oRs.eof) { %>
<% for(Index=0; Index < (oRs.fields.count); Index++) { %>
<% } %>
<% oRs.MoveNext();
}
%>
My last question is on JavaScript. I have an html page that has a form. I want to get the data the user entered into the form in anouther part of the page. The problem is that I don’t know how to do that without having to do . I just want it to retrieve the value so I can use it in a calculation in another part of the page without reloading.. What I decided to to was to create a function with the onblur= ”get_form_data()”. I don’t know what the attributte for the data of the form is. Here is a sample:
function get_form_data(){
?????
}
Anyone who can point me in the right direction with either question will have my highest respect and admiration.
|
|
|
|
|
Geoffory Simmons wrote:
"SELECT * FROM Content WHERE Contents LIKE '%search'"
Try changing the LIKE clause to
LIKE '%search%'
(I've never done this, so I don't know if it will work for you)
Geoffory Simmons wrote:
I don’t know how to do that without having to do
Why wouldn't you do that? That seems like the simplest solution to me.
Jon Sagara
"There are lies, damned lies and statistics."
-- Mark Twain.
|
|
|
|
|
var other_var = Request.Form("othervar");
if ("" == other_var || IsNULL(other_var) || [validate other form variables])
{
}
else
{
... validate data
if (!valid)
{
}
else
{
}
}
I don't use JScript, so my syntax may be a little off, but I think this gives the general idea. Anyway, this allows you to use the <form method="post">-type form for your search field.
Jon Sagara
"There are lies, damned lies and statistics."
-- Mark Twain.
|
|
|
|
|
Geoffory Simmons wrote:
.
I can't believe I didn't catch this the first time...
"action" should be set to your search page. IOW, it should look something like this:
<form name="your_form" method="post" action="searchpage.asp">
Jon Sagara
"There are lies, damned lies and statistics."
-- Mark Twain.
|
|
|
|
|
For the JavaScript issue, I assume that you have some field(s) that the user is going to enter data into and you want to take the value(s) they enter and do some work with the data and display the results in another form field on the page.
You can fetch the data from another form field on the same page by accessing the value attribute of the form field via the DOM. Like so: document.{FormName}.{FieldName}.value where FormName is the name/id of the form and FieldName is the name/id of the field you wish to access.
I would recomend doing the work you wish to do with the data in a JavaScript function and calling it when you want to update the field(s) where you want to display the results.
The function can be called using the onChange event of the form field that the user changes. This works well if you have one field that you are using to update your calculated field. For example, if you had a tip calculator you would base the value in the tip field on the tip percentage and the total cost of the bill. in this case you would use the onChange event in both the tip percentage field and the total cost field to call the function that recalculates the tip amount. Then if the user changes either field the total will be recalculated.
If the data you want to display is calculated based on several fields and you want to update the other portion of the page only when the user fills out the fields and then clicks the submit button, but you do not want to actually submit the form, you can intercept the submit button using your function and update the other part of your page instead. You can still submit the form(s) later using JavaScript as well. I have to run and so I can not give a good example of this right now, but I can detail this later if you need me to.
I can provide actual code examples of whichever method you want to use, just let me know. I have to go fix some problems at a client site right now, but I will check in later so just post in answer to this and let me know which way you want to go. Then I will post actual code examples for you.
Jason Jystad
Cito Technologies
www.citotech.net
Sonork ID 100.9918
>-------------------------------------------------<
Every program has at least one bug and can be shortened by at least one instruction -- from which, by induction, one can deduce that every program can be reduced to one instruction that doesn't work.
>-------------------------------------------------<
|
|
|
|
|
On my web page i use activex date and time picker from microsoft. To display the picker i use the code that looks like this:
<object id="DTPicker" type="application/x-oleobject"
="" classid="clsid:20DD1B9E-87C4-11D1-8BE3-0000F8754DA1" codebase="mscomct2.cab#Version=6,0,88,4" align="center" border="0" width="100" height="25">
In the body of the page i have the following function, that sets the date to desired value like this:
The problem is, that on some pc's the data picker would be displayed, and on the others pc's it wouldn't. All the pc's have the same software: NT 4.0 SP6a, IE6, the same Vesion of Date and Time Picker ocx, and the security settings of IE6 are the same an all pc's.
Any ideas how to fix the problem?
Many Thanks for any responses!
|
|
|
|
|
I have an scriplet object defined in 'createservice.aspx' using the following code
<object data="editor.aspx" type="text/x-scriplet">
Where createservice have registered and inherits from src='createservice.cs' (code Behind), this file includes funtions to insert DB written in C#.
in editor.aspx, <IFRAME> is defined where user types in texts.
and editor.aspx is linked to compose.js using<script src="compose.js?169" language="javascript"></script>
1) My question is simple but took me hours, how to retrieve mytext.value from editor.aspx and to be use in createservice.cs(code behind), say like store in a string defined in createservice.cs,
2) should I declare the object in createservice.cs, but how to declare an OBJECT, i only know how to declare htmlTeatArea, htmlLabel and etc from the UI.webcontrols class from .NET framework
Thank you very much
regards, karsin
|
|
|
|
|
Dear Friends,
I have a doubt in using split function in ASP. My prb is:
I have a string str="Technology Business Finance Music"
Now i want each word in one variable, like
a1="technology" b="Business" c="Finance" like this. I know that I have to use Split function. but i don't know how to use it. Can any1 help how to write the code for this in ASP with the same function or with any different function.
Thanx in advance
Gopi
|
|
|
|