|
While your at it, have your app uninstall NS and force the user to use IE. It will sure make my job (and many, many others) easier.
Nick Parker
|
|
|
|
|
How can I change browser window title dynamically using javascript in Netscape.
window.document.title = "abc"
does not seem to work with Netscape.
Is there any other way I can change window title dynamically in netscape ?
|
|
|
|
|
Unfortuantely the document.title property is read only in netscape (maybe different in 6+) hence why document.title = 'blah' will not work (pretty not annoying ).
Anyway I came up with this solution (although it's not ideal as it will nead a page reload).
Add this between the head tags:
<script language="Javascript">
var url = document.location.toString();
var posQry = url.indexOf('?') + 1;
var posTitle = url.indexOf('title=') + 6;
var posEnd;
var strTmp;
var arrSplits = new Array();
var idx = 0;
var strTitle = '';
if(url.indexOf('&') == -1)
{
posEnd = url.length;
strTitle = url.substr(posTitle, posEnd);
}
else
{
strTmp = url.substr(posQry, url.length);
arrSplits = strTmp.split('&');
for(idx = 0; idx < arrSplits.length; idx++)
{
if(arrSplits[idx].indexOf('title=') != -1)
{
strTitle = arrSplits[idx].split('=')[1].toString();
}
}
}
document.write('<title>'+ strTitle + '</title>');
</script>
When you want to change the title of the page you will need to reload it with a querystring key/value pair with a key of 'title'.
e.g.: <a href="myPage.html?title=A%20New%20Title">Change</a>
Your other alternative would be to do the same but server side.
e.g.(asp): <head><title><%=Request.QueryString("title")%></title></head>
hope this helps you.
|
|
|
|
|
I have a web form,when it loads,in Page_Load I open a connection to a database,and I use this connection in some functions,I don't know where should I clode this connection?In which functions? Should I open/close it in another place?
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
|
|
|
|
|
That really depends on the purpose of the connection on your web form. If this is the only place that you use your connection, you may consider leaving it where it is. Otherwise, if your application can use the same connection other places you may consider a function to be more adequate.
Nick Parker
|
|
|
|
|
Nick Parker wrote:
you may consider leaving it where it is
You mean it doesn't need to close 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
|
|
|
|
|
Mazdak wrote:
You mean it doesn't need to close
Yes, of course you will still need to close the connection, I was under the assumption that you were still controlling the connection, knowing when to close the connection.
Nick Parker
|
|
|
|
|
Nick Parker wrote:
If this is the only place that you use your connection
No that's not the only place.
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 have to develop something for a programming competition. I'm considering doing an online shopping site, but I'm unsure about how to keep track of the items in the shopping cart. The user could be on the site for a while, so Session variables are not a good option. I could pass the Item IDs via the Request object, but that seems a bit unsecure - what if someone hacks the source code and changes the item IDs (or should I not worry as long as prices are not involved at that stage)? Any suggestions?
|
|
|
|
|
Why not to use a database to store all item IDs for example, that user want to buy?
Philip Patrick
"Two beer or not two beer?" (Shakesbeer)
Web-site: www.saintopatrick.com
|
|
|
|
|
I have a resizable window that I would like to place text in it. I'd like the text to always stay 90% of the window windth. So whenevery the window size is changed I'd like to change the text size.
Anyone know how please?
Thanks
Jeremy Davis
http://www.astad.org
|
|
|
|
|
Ok here's a quick script I've knocked up. It's not exactly accurate but it's close to 90% i think.
<title>
Here is a lot more text to see what happens
Hope this helps you out if not then let me know and I'll try and get it to be more accurate.
|
|
|
|
|
Thanks a lot! The only problem is I get a JavaScript error saying "resizeText" is not defined. Is this a style variable I need to declare?
Jeremy Davis
http://www.astad.org
|
|
|
|
|
sorry that was my fault... it was late when i pasted the code in
what you need to do is enclose the text in the body in a div with an id of "resizeText"
e.g. <div id="resizeText">
let me know how you get on.
|
|
|
|
|
|
How to exposes multiple classes from a web service
|
|
|
|
|
If somebody replies a article, then this "reply article" must added next to
a original article. I want to give a depth. I don't know exactly what I call this,
threaded board? anyway...
In ASP, it is very easy. But in DataGrid.. I can't find a way.
In following Code, If It's Replied article, It must be added by " "
<itemtemplate>
<%# Container.DataItem("subject") %>
But I tried to like..
<% for (int i=0; i<int32.parse(container.dataitem("depth").tostring()); i++)
="" response.write="" " ";
="" (container.dataitem("subject").tostring());
="" %="">
But, in occured in Container.DataItem("") .. I can't extract and assign to another
value.
How can I solve this problem?
Please Help me~
Have a nice day~~
|
|
|
|
|
Hi all,
Please introduce to me wesites about learning about making webservice by ASP ...
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
I Want My List View to Automatically Set the Column Widths According to the Data I Fill in.
Please Help..
Thanks...
|
|
|
|
|
Hey there -- I am using all asp's for my site and want to add the same background to every page. I have a feeling that this is best handled in CSS. I tried adding the background by redefining the CSS tag , but this doesn't seem to work.
I was thinking of an SSI that sets up the header for each page, but it seems like my problem is much simpler . . .
thanks,
tim
---------------------------------------
Tim Booher
|
|
|
|
|
What problem are you running into exactly? Even with ASP you should be able to doing something like this:
Response.Write "<body background="/pics/somepicture.gif>" & vbcrlf
Hope this helps, maybe I wasn't understanding your problem.
Nick Parker
|
|
|
|
|
tbbooher wrote:
I have a feeling that this is best handled in CSS. I tried adding the background by redefining the CSS tag , but this doesn't seem to work.
Here is the code to do it:
<body style="background: url(images/imagename.gif)">
Though it is probably best to put it into an external stylesheet like this:
body{
background: url(images/imagename.gif);
}
HOWEVER, just FYI the external style sheet method only seems to currently work on Netscape 6. IE 6 does not support it.
If you need more help, or what I just said you all already know, then ask
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
|
|
|
|
|
Is there any way by which i can prevent files from opening in the browser itself. I need to force the user to save the file on the local HDD. (IIS web server). Thanks
Bipin
|
|
|
|
|
Add the http-header Content-Disposition, with at value of "attachment; filename=xxx".
You can do this using asp (example using jscript):
Response.AddHeader("content-disposition","attachment; filename="+TheFileName);
Or you can change the content-type of the file to something the browser isn't going to recognize.
This can be done in IIS Manager or asp.
- Morten
|
|
|
|
|
I'm designing a web site ASP.NET and C#,and I have a access database.
Now I add a DataList to my page,then I put a Label in the DataList,the quetion is this:
How can I bound this label on the datalist,to one of the column of database?
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
|
|
|
|