|
Preload images like this:
if (document.images)
{
image1 = new Image();
image1.src = "images/image1.gif";
image2 = new Image();
image2.src = "images/image2.gif";
}
Add function to swap images:
function SwapImage(TargetImageName, SourceImageName)
{
if (document.images)
document[TargetImageName].src = eval(SourceImageName+".src");
}
Call it like this:
<img src="something.gif" OnMouseOver="SwapImage('targetImg1','image2');" OnMouseOut="SwapImage('targetImg1','image1');">
I hope this helps.
|
|
|
|
|
Thanks for the help!
- Matt Newman / Anti-Linux Activist
-Sonork ID: 100.11179:BestSnowman
†
|
|
|
|
|
I have an ASP page which contains a couple of ASP blocks. I want to know if there is any way in which I can tell the IIS ASP processor not to process certain blocks? e.g. Block A, process, Block B, process, Block C, don't process, Block D, process.
Ta.
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
Sonork ID: 100.9903 Stormfront
|
|
|
|
|
I've always thought that this is what IF statements are for...
If I need to temporary comment a block of code in ASP I usually do this:
If False Then
.....
' Code I don't want anymore
.....
End If
|
|
|
|
|
Konstantin Vasserman wrote:
I've always thought that this is what IF statements are for
True.
Ok let me explain this again.
I don't want the ASP processor to process the blocks, but I do want the actual ASP code to be sent through to the browser as is. So an If statement unfortunatley does not work, as it simply excludes the ASP from the HTML stream bit.
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
Sonork ID: 100.9903 Stormfront
|
|
|
|
|
Here you go again with your strange questions...
If this is not going to dynamically change (you never process block D, but always process blocks A, B and C) all you need to do is remove or HTMLEncode <% and %> brackets around the block D.
If it will dynamically change you can save blocks in separate files and programmatically ether execute them via Server.Execute or read them from files as text and Response.Write them to client.
I hope this helps.
|
|
|
|
|
Konstantin Vasserman wrote:
If this is not going to dynamically change (you never process block D, but always process blocks A, B and C) all you need to do is remove or HTMLEncode <% and %> brackets around the block D.
Nearly there
The problem is that HTMLEncode changes <% to &<pa>lt;, which I don't want as the un-processed ASP is going into an editable DIV element which is then, on form submit, sent back to the server to be saved in a database. Then later on that "content" is turned into an actual ASP file and run as per usual.
Maybe some background will help: I am letting people enter in content and some of that content will be ASP. When they are editing a page naturally the ASP content they put in must not be processed (otherwise they will see the output, not the actual ASP when they edit) but when the page is published then the ASP is run.
Yup, more strange questions, I am building a flying-time machine...
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
Sonork ID: 100.9903 Stormfront
|
|
|
|
|
I think you will have to use TEXTAREA instead of DIV - then you should not need to HTMLEncode anything. It should work without encoding of brackets, I think.
I can't think of anything better at the moment.
Paul Watson wrote:
Yup, more strange questions, I am building a flying-time machine...
Hmm... Maybe this is that great project I've always wanted to be a part of...
|
|
|
|
|
I am (hopefully!) writing an application, using an ISAPI Extension dll, to allow users to view images held on a Web Server.
I would like to have a Form on my HTML page with a pre-initialised list box for the User to select an Image name from. The User can then select from the list and Submit, which will call a funtion in my dll to display the Image on a new page. My dll already works OK - it does database queries (thru ODBC) and retrieves all the possible Image names, locations etc.
However, I don't know how to pre initialise the ListBox for the user. (My knowledge of HTML is almost zero!). I assume that rather than using the normal <VALUE = aValue> there may be some way of calling a function in my Extension dll.
I know it's possible with Images, as follows:
<IMG SRC="http://myServer/scripts2/counter.dll?clock" width="116" height="23" alt="Time">
Any help here would be really appreciated, as would suggestions on a good book to learn HTML.
Many thanks.
code dope.
|
|
|
|
|
I just uploaded my new site to Brinkster.com and found a problem. When I ran it on my IIS 5 it worked fine and suddenly everything just doesn't work.
I believe the source of all the problems is that the server doesn't keep the Session Object for a long time if at all. It kinda logs you out automatically thus not keeping your details.
Is there any way around it? someway of making sure the Session is being saved (without using the database or a separate file).
Also, it seems that the file Global.asa is not being recognized for some reason.
It's the first time I'm running it on an outside server so the problem must be there.
Isaac Sasson,
Small time programmer - complainer at large.
Sonork ID 100.13704
|
|
|
|
|
They might have Session state turned off. I don't think there is a way around it except of storing data to a file/database.
|
|
|
|
|
Isaac Sasson wrote:
I just uploaded my new site to Brinkster.com
As far as I know... the free membership at brinkster doesn´t allow session state management
Mauricio Ritter - Brazil
Sonorking now: 100.13560 Trank
My latest article:
Pentominos - A C# implementation of the famous Puzzle Game
|
|
|
|
|
How to get a primary key of some table, using ASP against Access database?
I tried to use OpenSchema, but it didn't work for primary keys
Philip Patrick
"Two beer or not two beer?" (Shakesbeer)
Web-site: www.saintopatrick.com
|
|
|
|
|
You have to use the right provider.
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=mydatabase.mdb"
- Morten
|
|
|
|
|
Actually I used DSN connection, but with the way you showed it worked fine
Argh... need to read more about several providers, lol
Thanx again
Philip Patrick
"Two beer or not two beer?" (Shakesbeer)
Web-site: www.saintopatrick.com
|
|
|
|
|
Hay, Any One Got A Code For Short Messaging System(SMS)?
I Need A Code To deal With Webpages?
Thanks For Help. ( Hay Please I'm New In This Field )
__________________
..:: GooGle ::..
|
|
|
|
|
I had a strong belief that when a property of an Object is defined as ReadOnly then it means that you can only read its value at runtime and cannot modify the value. If this is wrong just donot read further, but just correct me.
This is what I found confusing...
In MSDN's documentation for Style property of a Web Control it says,...
[Visual Basic]
Public ReadOnly Property Style As CssStyleCollection
[C#]
public CssStyleCollection Style {get;}
...
But then they have shown an example of how to use the "visibility" key of the CssStyleCollection to hide and unhide a label control programmatically, like this....
void Button1_Click(Object sender, EventArgs e)
{
Label1.Style["visibility"]= ((Label1.Style["visibility"]=="hidden")?"show":"hidden");
}
If one is able to change a property's value then why the hell do they declare it as *ReadOnly*. And if you are a C# programmer, check out their declaration above that they dont have the set() method.
Then how does it work???
omkamal
|
|
|
|
|
In this example they do not change the Style property - they change the value of one of the items in collection that is pointed to by Style property.
|
|
|
|
|
Hey Guys,
I created this function that doesn't always link. If you query to the end of my data...I get the links, but if I start from the beginning of the files, I can't link to the links that I'm calling. It only works when I fast forward to the end, then work backward. What is wrong with this stuff?
-------
Function CreateFolderLink (field)
dim str, str_link
str = objRS(field)
str_link="<A HREF = """ & str & """ TARGET = ""_blank"" >Web Folder Link</A>"
CreateFolderLink = str_link
End Function
Function CreateLink (field)
dim str, str_link
str = objRS(field)
str_link="<A HREF = """ & str & """ Target = ""_blank"" >" & str & "</A>"
CreateLink = str_link
End Function
------
|
|
|
|
|
I have DataAdapter and DataSet,my dataadapter string is something like this:
"SELECT * FROM TABLE",and I fill dataset with this dataadapter,and I bound Datgrid to it and it's ok.
Now after this I want to set a filter for the recorsets that datagrid show.Can I use those dataadapter and dataset and set the filter in the way that I don't know it,
or I HAVE TO fill dataadapter and dataset from the beginning with new SQL statement?
Mazy
"So,so you think you can tell,
Heaven from Hell,
Blue skies from pain,...
How I wish,how I wish you were here." Wish You Were Here-Pink Floyd-1975
|
|
|
|
|
Mazdak wrote:
or I HAVE TO fill dataadapter and dataset from the beginning with new SQL statement?
The standard thinking is that the sqlDataAdapter should be the one controlling what goes into the DataSet. So you should put the filtering on the sqlDataAdapter command text.
This is good because lets say you have 10000 records and you only need 10 of them based on a specific filter. If you did the filtering on the DataSet then the sqlDataAdapter still has to download 10000 records, rather than just 10.
I do know you can filter on the DataSet or DataGrid itself, if you want to. But I don't know how offhand. If you want to know how, just holler.
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
Sonork ID: 100.9903 Stormfront
|
|
|
|
|
Paul Watson wrote:
I do know you can filter on the DataSet or DataGrid itself, if you want to. But I don't know how offhand. If you want to know how, just holler.
I don't know about it,Could u tell me about it?
Mazy
"So,so you think you can tell,
Heaven from Hell,
Blue skies from pain,...
How I wish,how I wish you were here." Wish You Were Here-Pink Floyd-1975
|
|
|
|
|
I'm trying to page a recordset, but in one case I have a problem. The code looks like:
<br />
sSQL = "SELECT Table1.*, Table2.* " &_<br />
"FROM Table1 LEFT JOIN Table2 ON Table1.Name = Table2.Name"<br />
rec.CursorLocation = adUseClient<br />
rec.CacheSize = 25<br />
rec.PageSize = 25<br />
rec.Open sSQL, con, adOpenForwardOnly, adLockReadOnly<br />
In case that the Table1.Name exists in Table2.Name, all is working correct. But if not... I'm getting E_FAIL from Microsoft Cursor Engine when I'm trying to do anything with returned Recordset. Though without paging and having a client cursor, it works fine.
Any ideas what is going on and how to fix it?
Philip Patrick
"Two beer or not two beer?" (Shakesbeer)
Web-site: www.saintopatrick.com
|
|
|
|
|
This may not be, but are you validating after you open your connection:
<small>Philip Patrick wrote:
</small>sSQL = "SELECT Table1.*, Table2.* " &_
"FROM Table1 LEFT JOIN Table2 ON Table1.Name = Table2.Name"
rec.CursorLocation = adUseClient
rec.CacheSize = 25
rec.PageSize = 25
rec.Open sSQL, con, adOpenForwardOnly, adLockReadOnly
Are you checking the EOF and BOF flag?
dim iCount
iCount = 0
if not rec.EOF or rec.BOF
do until rec.EOF or iCount = 24
response.write rec("SomeValue") & vbcrlf
rec.MoveNext
iCount = iCount + 1
loop
else
response.write "You have no results" & vbcrlf
end if
Hope this helps some?
Nick Parker
|
|
|
|
|
Hmm, well, actually I'm using rec.PageSize and rec.RecordCount to determine it. Of course, PageSize I don't have to. But seems like the recordset is broken or I dunno what wrong with it. I'm running the same query in Access and it works fine and returns records. Same if I won't use Client cursor (adUseClient) but server-side.
But for client, it just don't want to work
Philip Patrick
"Two beer or not two beer?" (Shakesbeer)
Web-site: www.saintopatrick.com
|
|
|
|