|
Bah! I think you're just showing off! Here's a script that will work on ANY page, even your homepage:
alert('Nyah! Nyah!');
...have you tried your script in Firefox with Firebug installed? Maybe that will give you some clue as to where the problem may lie....
This line:
document.cookie = "sdmenu_" + encodeURIComponent(this.menu.id) + "=" + states.join("") + "; expires=" + d.toGMTString() + "; path=/";
right at the end, is the only thing I can see that may be affected by the page location, with it's "path=/" at the end....
I have no idea..!
Fred
|
|
|
|
|
Ok, ran Firefox w/Firebug and got
My_menu as "undefined"
I tried your suggestion about removing the "Path=/" and that did not help or hurt the problem.
Any other suggestions?
Thanks
|
|
|
|
|
well I suspect it's not your JS code as you've posted it then, but a link/referecne to My_menu elsewhere on your homepage that isn't correct, or is missing. Check your references and links to external files.
|
|
|
|
|
Hi,
Can someone please explain to me what is the following:
<link rel="icon" href="http://www.mysite.com/images/favicon.ico" type="image/x-icon">
And also what is the difference between the following two tags:
<link rel="shortcut icon" href="http://www.mysite.com/favicon.ico">
<link rel="shortcut icon" href="http://www.mysite.com/images/favicon.ico" type="image/x-icon">
Thanks
|
|
|
|
|
This top line is a link to the image to use as an icon to display in the browser address bar - this site has one too, if you look, and you will see a similar line if you a do a "view source" on this page. The icon should always have this name. Do a Google search, or wikipedia, for "favicon" for more....
As to the oher two: not a lot, is the answer; the second is just specifying the type of file being linked to. Saves the browser from having to work it out itself.
Fred
|
|
|
|
|
just a follow-up on my previous post, I use the javascript command, window.close to close the window of the site, and also i need to dispose the session using the session.abandon. the problem is that there is a confirmation windows upon closing the site, how can i use the client side render confirmation to trigger the command to dispose the session on the server side
|
|
|
|
|
That confirmation you are getting is because of the window.close. You can fix this by setting the opener = this. Then you would no longer get the confirmation to close the window. As far as how to do the session abandon you should probably implement some ajax, since you can call that from your javascript and that can run some code back on the server side.
Hope that helps.
Ben
|
|
|
|
|
I have a class Category, that derives from the ServiceResource class.
public class ServiceResource
{
public string endpoint_url;
public ServiceResponse Save()
{
string post_params = BuildParameters();
ServiceRequest request = new ServiceRequest();
ServiceResponse resp = request.Send("POST", this.endpoint_url, post_params);
return resp;
}
public string BuildParameters()
{
throw new Exception("You must set this in the derived class");
}
}
And the Category class:
public class Category : ServiceResource
{
private int id;
private string name;
public string BuildParameters()
{
return "I am overriding base.BuildParameters()";
}
public string endpoint_url = "/categories";
public int Id
{
get { return id; }
set { id = value; }
}
public string Name
{
get { return name; }
set { name = value; }
}
}
Now I would like to be able to use the Category class like this:
Category c = new Category();
c.Name="new category";
c.Save();
Now when Save is called, it will call the method BuildParameters. However, I want it to call BuildParameters in the derived class and not the base class, same with endpoint_url. At this point, base.BuildParameters is called instead.
How can I do this.
/\ |_ E X E GG
|
|
|
|
|
Try overriding the base class save in the child class and perhaps marking the base class save as abstract. That will force the child classes to override it.
Hope that helps.
Ben
|
|
|
|
|
You also haven't marked your inherited method as overrides (although i've spent all day coding in VB.net and may not have that quite right...)
|
|
|
|
|
Hello all,
I have created a SharePoint website with several pages and installed features (xml files for the context menu). I would like to know how I can deploy it to antoher SharePoint server? What is the best way to do it? I am new to SharePoint web application. I am using SharePoint Services 2007 and visual studio 2008.
Any suggestion would be greatly appreciated.
Best regards,
Bin
|
|
|
|
|
Hi,
I'm using an AJAX PopupControlExtender and I'm using its DynamicServiceMethod and DynamicControlID attributes without any problems.
What I want to do is that the Dynamic Control, which is a label, takes a few seconds till it loads. During that time I want to display an update progress or even a label that says "updating...".
Thanks for your support,
A7mad
|
|
|
|
|
Progress bars are a bit inacurate when measuring web progress and takes a bit of tweaking.
You'll have to experiment with the setTimeout([function],splitSecond); method
it gets used like
setTimeout("alert('Hello')",5000);
This will execute a hello alert 5 seconds after the script gets executed. Now what you need to do is at every block of code display a diferent progress image.
Le Roux Viljoen
Web Developer
PCW New Media
South African Branch
www.pcwnewmedia.com
|
|
|
|
|
we are using thin-client in asp.net development envirement with windows 2003, and .net 2005.
we have log-in with administrator, when we tryto run the project we are getting this error.
The sameproject is running ok from server.
regards
Mansi
|
|
|
|
|
Hi,
Firstly some info on the project i'm working on:
A company wants me to retreive the querystring (for example: ?userid=1&userLang=eng&ccnr=000112457&...). Also in this string included is a hashcode, what i need to do now is capture that querystring, en compute the hash and compare it with the hash in that string.
This project would have been easy in .NET2.0, HOWEVER, it needs to work on classical ASP pages also (.NET 1.1) and there is my problem: My ASP.NET project is not compatible with ASP projects, and there is no HTTPMODULE in ASP (the thing i used to capture the querystrings).
The next idea would have been to write an ISAPI filter that has all that logic (get the querystring and compute/compare the hash). But is it possible to write an isapi filter in c# instead of C or C++? And how to solve this?
|
|
|
|
|
Well if you can't simply retrieve the hashcode from the querystring via the normal Request method, can't you use the
Request.ServerVariables("QUERY_STRING")
to retrieve the entire string, then manipulate that as required?
Maybe I've missed your point....
Fred
|
|
|
|
|
Does the javascript:window.close() closed the session. I'm using IE 6.3 when I used this command it redirect to the home page and I'm already log on to that page
|
|
|
|
|
vanhawk wrote: Does the javascript:window.close() closed the session
If it's the only window open at the time, then yes, it will. Otherwise, no.
vanhawk wrote: when I used this command it redirect to the home page
huh.. are you closing or redirecting?
My install of IE has somehow got itself into a state whereby if I only have one window/instance/tab (IE7) of it open, and from that open either a popup (window.open(....)) or a new window (target="_bkank") via a link on that page, then close that second window, I find that my Session has been lost on the first app. I can work around it by always opening a second tab and just leaving it on About:blank or something, but it's a weird bug of some sort in my installation - maybe worth looking out for...
Fred
|
|
|
|
|
Thanks for the reply but, I have to rephrase or change my question.
In IE 7 it has a new feature to have a multi-tab on the browser, is there in any command when the user log off on the page it will closed the browser not only the particular tab.
|
|
|
|
|
No - and why should there be? If they have other windows open (on other sites) they don't want you to come along and close them! I'd be most annoyed if you did that to me!
If you want to end the session yourself, then use the Session.Abandon and/or Session.Clear methods.
Fred
|
|
|
|
|
we use the code javascript:window.close() to close the browser in IE 6
we try to use the same code IE 7 and i have 2 different site opened in one browser one site has a login page and i try to log out that page. there is another tab that was open then i try to go back to the page i already log out, when i click the page on the url it open again without going to login page.
anyway thanks for the advised i will try to use the command session.abandon
|
|
|
|
|
Closing the window doesn't end the session on the server, so you have had the sample problem all along, only you haven't noticed it because it's not as simple to keep several windows open in IE6 as in IE7.
---
single minded; short sighted; long gone;
|
|
|
|
|
how do we take session variables to the next page? The situation is :-
there are 3 pages: 1. UserLogin.aspx
2. UserInfo.aspx
3. Map.aspx
I have created a session variable in UserLogin.aspx (Session["UserID"]). The session variable is being accessed from UserInfo.aspx. But when i access it from Map.aspx, the session is lost and it return null as it takes the value from global.asax where the variable is initialised to null. If i assign it a value in global.asax, the it is accessible in Map.aspx. i need to know if there is a way to assign a value to the session variable on the fly.
Thanks in advance!
|
|
|
|
|
sweet_piky wrote: is a way to assign a value to the session variable on the fly.
Well, yes - the way you have done it in UserLogin, I presume - simply set it to what you want; eg:
Session["UserID"] = 123
If you can't then access this value from another page then something screwy is going on. Hard to say what without seeing all your code... how are you setting/reading them? How and where (in what Sub) are you initialising it in global.asax? What are your Session settings in web.config. Are you opeining new (target="_blank" or popup) windows inbetween? (I ask this because my install of IE will lose session when such are closed if there is no other window open - it's a weird bug as far as I can tell) - but generally speaking you should of course be able to set Session variables in one page and read them on another - that is the point of them!
Fred
|
|
|
|
|
hi .. i'm using http://www.vwdhosting.net to test my site
i have a section in my web.config file that enables sending mails to users .. it works fine when i try it locally .. but after uploading it, it gives me an error!
smtp from="myname@gmail.com" deliveryMethod="Network"
network host="smtp.gmail.com" port="587" userName="myname@gmail.com" password="mypassword"
**********************************************
anybody knows on http://www.vwdhosting.net how to use PasswordRecovery to send mails to users with their new password? is there a specific setting for "SMTP" or something like that?
the mail is sent successfully "locally" with the previous settings i've mentioned
|
|
|
|