|
Please dont start your posts with
Kissy16 wrote: solution plz
There are plently of articles on the web relating to your post
http://www.google.co.uk/search?hl=en&q=migrate+from+vs2003+web+project+to+vs2005.&btnG=Google+Search&meta=
|
|
|
|
|
Hi Guys,
I have a linkbutton which calls a .net function which when clicked either displays or hides a DIV and changes an image. I also need this linkbutton to change the property of a javascript boolean variable.
The javascript in place currently produces a popup notifying users that they have not completed their registration if they try to navigate away from the page without having submitted the form. All I need the linkbutton to do is to submit the following "needToConfirm = false;". By doing so, when the user clicks the linkbutton and the DIV is displayed/hidden (this refreshes the page) the javascript knows not to display the popup box as the user is staying on the page. This works fine in Firefox but not IE.
I have added this to buttons, which work fine across both browsers, so it only the Linkbutton in IE that I am struggling.
Below is my code:
Client Side
<asp:linkbutton id="lbViewAllProfessions" runat="server" onclick="lbViewAllProfessions_OnClick" xmlns:asp="#unknown">
<asp:image id="imgIcon" runat="server" imageurl="images/general/icon-plus.gif" /> view all job types
</asp:linkbutton>
Server Side
Note: I have included the code for my working buttons below too.
//This is in my Page_Load
btnCandidateRegister.Attributes.Add("onClick", "needToConfirm = false;");
btnFindAddress.Attributes.Add("onClick", "needToConfirm = false;");
btnOKAddress.Attributes.Add("onClick", "needToConfirm = false;");
btnCancelAddress.Attributes.Add("onClick", "needToConfirm = false;");
lbViewAllProfessions.Attributes.Add("onClick", "needToConfirm = false;");
protected void lbViewAllProfessions_OnClick(object sender, EventArgs e)
{
if (imgIcon.ImageUrl == "images/general/icon-plus.gif")
{
divSkillsBox.Visible = true;
imgIcon.ImageUrl = "images/general/icon-minus.gif";
}
else
{
divSkillsBox.Visible = false;
imgIcon.ImageUrl = "images/general/icon-plus.gif";
}
}
Javascript
<script language="JavaScript" type="text/javascript">
var needToConfirm = true;
window.onbeforeunload = confirmExit;
function confirmExit()
{
if (needToConfirm)
{
needToConfirm = false;
return "Your have not completed your registration process.";
}else{
needToConfirm = true;
return;
}
}
</script>
I hope this is clear enough. Please let me know if you need anymore info.
Thanks in advance,
Martin
|
|
|
|
|
1. önclick--> change to onclick(check the difference in "ö" and "o". Both are not same.
2. btnFindAddress.Attributes.Add("onClick", "needToConfirm = false;");
--> btnCandidateRegister.Attributes.Add("onclick", "return NeedToConfirm()");
3. Write a Javascript function and put the logic ..... like needToConfirm = false;
4. Wherever you are adding to attribute collection then it should be "onclick" not "onClick"
check this ... I guess it will help you.
Thanks,
Arindam D Tewary
|
|
|
|
|
Hi Arindam,
Thank you for looking into this.
I have done the following with my link button now:
lbViewAllProfessions.Attributes.Add("onClick", "return needToConfirmFalse();");
This is the javascript function that it calls:
function needToConfirmFalse()
{
needToConfirm = false;
return;
}
It still doesn't seem to work.
The strange thing about this is that is works fine in FF but not at all in IE. I am not sure what I am doing wrong but any help would be apprieciated.
Thanks again.
|
|
|
|
|
What you want to do in onclick event ??
Whats the use of needToConfirm into javascript function ??
use "return true" or "return false" instead of only "return" in javascript function.
Are you still gettng any error !!! ???
Thanks,
Arindam D Tewary
|
|
|
|
|
Hi
I have a dll which will be used by multiple application. So I have build the dll(say "sample.dll"). Now using GACUTIL.exe I have installed into GAC. Now my epectation is to see the "sample.dll" into list of dll into .NET tab of Add reference window( As I assume that .NET tab of Add Reference window lists all GAC dlls.)
But while adding a reference I can not find sample.dll into that list.
Where I am going wrong? In any application where "sample.dll" will be used I want to take a refrence of "sample.dll" from GAC.
Thanks in advance!!!
Thanks,
Arindam D Tewary
|
|
|
|
|
Can you see the assembly when you browser to GAC ? Make sure your assembly has strong name generated.
|
|
|
|
|
Yup !! when I am browsing "sample.dll",it is there in GAC. And its obvious that if I am having it insatalled into GAC(if I can see my "sample.dll", I believe its installed into GAC) then its already having its much needed strong name with it. Isnt it?
Thanks,
Arindam D Tewary
|
|
|
|
|
Arindam Tewary wrote: having its much needed strong name with it. Isnt it?
Yeah. I don't have any idea, it's weird.
|
|
|
|
|
Anywz thanks for your help!!!
Thanks,
Arindam D Tewary
|
|
|
|
|
Hi in my grid i have to handle two operation...,
One is when boundcolumn will click the selected row values have to come on textbox...,
When button column will click it have open new page...,
How to handle 2 things in gridview.......,
Thanks & Regards,
NeW OnE,
please don't forget to vote on the post
|
|
|
|
|
whats this?,
y what ever i am posting here its blocking?,
whats the probs?
Thanks & Regards,
NeW OnE,
please don't forget to vote on the post
|
|
|
|
|
What do you mean blocking?
|
|
|
|
|
hello i am facing the below javascript error while using update panel and modalpopupextender.............please some one help
Error: Sys.InvalidOperationException: 'DynamicServicePath' is not a property or an existing field.
Source File: http:
Line: 2765</pre>
i have stored MicrosoftAjax.debug.js file in Script folder
|
|
|
|
|
Can you post your code please
|
|
|
|
|
yeah sure
<atlas:ScriptManager ID="scriptmanager" runat="server" ScriptPath="./Script" EnablePartialRendering="false">
</atlas:ScriptManager>
and at top of master page
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="atlas" %>
plzzzz help how can i solve this error
|
|
|
|
|
Where is this in your code:
DynamicServicePath
|
|
|
|
|
i dont have any code for DynamicServicePath....its not my function.....
|
|
|
|
|
Can you please copy the code in following file :
http://www.myrapidhealthcare.com/soft/Script/System.Web.Extensions/1.0.61025.0/MicrosoftAjax.debug.js
and tell us which is the code in line number 2765
Thanks,
Arindam D Tewary
|
|
|
|
|
Arindam Tewary wrote: code in line number 2765
is
if (!isObject && typeof(targetVal) === 'undefined') throw Error.invalidOperation(String.format(Sys.Res.propertyUndefined, name));
and from firefox i check that error is in the same line....all is working fine but modalpopup is not displaying...plzzz help me
|
|
|
|
|
Not sure if this is the actual problem but check the line
typeof(targetVal) === 'undefined'
it should have been
typeof(targetVal) == 'undefined'
Check the "===" operator .... a typo ....
Thanks,
Arindam D Tewary
|
|
|
|
|
no this is not the problem......but i still didn't get the solution...please someone help
|
|
|
|
|
Whats seems to me is,
You have a function or method named DynamicServicePath which you have used like properties or fields.
use "DynamicServicePath" with a pair of brackets like "DynamicServicePath()".
Check it !!!
NB: if you use "DynamicServicePath" then system says its a properties or fields, but DynamicServicePath() is interpreted as method.
Thanks,
Arindam D Tewary
|
|
|
|
|
I want to develop time table with hourly editable
time for appointment booking. The viewers can then
check available time and ask for appointment
Any help would be appreciated ?
Thank you,
hemant
|
|
|
|
|
Where do we start? This is such a vague question with such a big answer needed.
Maybe start with where you are going to display your appointment timetable, i.e. in a gridview with a column with edit buttons in.
Just create that to start with then post back
|
|
|
|