|
Hi Experts,
I have to show ok cancel button in popup and while clicking ok it should proceed and cancel should remain the same.
Any idea, please provide.
Modified :
i need this is code behind.
|
|
|
|
|
Well, design your popup with two buttons... 'Ok' & 'Cancel'. Define OnClientClick event on both of them. Based on the button, different javascript event would be called. If it's a Cancel button then cancel the request, just return false. If it's an 'Ok' button, move on.
There are lots of examples on the same. In case needed, just Google for 'Ok Cancel Javascript'
|
|
|
|
|
padmanabhan N wrote: Ok Cancel button using javascript
So why have yuou posted this here instead of the Javascript forum?
This is pretty basic Javascript which you cuold solve yourself with a little Googling. But anyway, try here[^] for starters
|
|
|
|
|
I am asking about code behind. I have few samples like
btnImport.Attributes.Add("onclick", "javascript:return " +
"confirm(Are you sure you want to create?')");
But this is not working.
|
|
|
|
|
OK - you don't really need the "javascript:" bit, but apart from that, and the fact that you have missed out ther opening ' at the start of your message (before the word "Are"), it should work:
btnImport.Attributes.Add("onclick", "return confirm('Are you sure you want to create?')");
|
|
|
|
|
sorry
i can not run project, please help me for run searcharoo and use this projeh
thanks
-- Modified Monday, December 20, 2010 2:48 AM
|
|
|
|
|
It isn't clear, Rather then showing your emotions please give us brief scenario.
|
|
|
|
|
1. Your question is not clear. The better you explain, better and faster response you will get.
2. You posted the same thing in Question & Answer forum. Avoid this. Pick one forum and stick to it.
3. It looks like you are trying to ask/post related to some existing article of Code project. Use the forum present at the end of the article to discuss the same with the author directly.
|
|
|
|
|
Sandeep Mewara wrote: 3. It looks like you are trying to ask/post related to some existing article of Code project. Use the forum present at the end of the article to discuss the same with the author directly.
Yeah, He was referencing THIS[^] article, He has tried same to ask a Author also, But unfortunately in 5 hrs Author hasn't replied, So Desperately he is asking here question As probably by guessing Author comes here before his article.
|
|
|
|
|
I am creating a new Custom Asp .Net server Control which include some images and my question is, what I need to do for enclosing the images as part of the final .dll so I can move the Library including all their resources in the same package or the only solution is to create an installation msi package.
Best Regards
|
|
|
|
|
Compile the images within the project as an embedded resource.
|
|
|
|
|
Hi
I have a javascript function that is applied to a textbox onkeyup so that when a user puts in a date in the format of dd/mm/yyyy it puts in the forward slashes. It also stops the user exceeding ten characters. However, when the user uses the backspace button, whilst the numbers are deleted, unless you keep down on the button, I can't get the backspace button to move back beyond the slashes.
Here is my code, and I have highlighted in bold the bit that is not working:
function DateInputUpdate(input) {
if ( input.value.length == 2 || input.value.length == 5 )
input.value = input.value + dateSep;
if (input.value.length > dateFormat.length) {
input.value = input.value.substring(0, dateFormat.length);
if (event.keyCode == 8) {
if (input.value.length == 3 || input.value.length == 6) {
input.value = input.value.substring(input.value.length, input.value.length - 1);
}
}
}
}
Can someone please advise me what I need to do or change? I don't particular wish to delete the slashes, more to ignore them or skip over them that's my ideal solution.
Thanks
|
|
|
|
|
First off - this is the wrong forum for this question - you should have posted it in "JavaScript".
Secondly, code blocks should be wrapped using the "code block" button above the editor when posting.
Having said all that, you code behaves as it does because you are catching the keyup event on the backspace key just like any other. You need your code to be of the form:
if (event.keyCode == 8) {
} else {
}
Also, I suspect you have only been testing/using this in IE - you may need to look at how Firefox sees it...
|
|
|
|
|
In reply to your answer, the code will only ever run in IE as it is an internal web application not a website, so testing in Firefox or in Google Chrome is not required. When testing in IE, the javascript is not hitting if the statement and is thus not working as expected.
|
|
|
|
|
Well OK, but you still need to write it along the lines I suggested. Of course, you need also to check for valid input at some stage - eg as is a user could enter 99/99/9999.
|
|
|
|
|
Hi,
In my webapplication i gave links to open certain pdf files.
But i don't want users to save them to their local pc.
How can we do that?
|
|
|
|
|
SUDHAKAR PALLAM wrote: But i don't want users to save them to their local pc.
You can't. Where do you think the PDF is displayed from when you open it up in the web browser? That's right, it's already on the local PC in the browser cache.
|
|
|
|
|
I am tring to access to the user´s selected text inside the text contained in an TextBox ASP .Net server control, but because I do not want to get all the text but only the selected by the user I cann't use the text property, please any suggestion for do it with the TextBox or with another control which let do it inside a an ASP .Net site.
I choose TextBox Multiline because it yields an TextArea Html tag in the explorer and because there is no a RitchTextBox control in ASP .Net but perhaps is there an other control for do it.
Best regards
|
|
|
|
|
|
|
Hi,
I have an asp.net webpage with multiple textboxes filled with data, If user uses browser search(ctrl+F) the text in textboxes is not highlighted.
How to achieve this?
Thanks
Baba
|
|
|
|
|
You need to find some other control that renders the value without using an input element like many of the rich text box controls.
|
|
|
|
|
Hi,
If I want to destroy a page from my website and display (Page Can't be displayed)! if user trued to browse after he sign out my web site using my sign out button.
how can can I do this?
|
|
|
|
|
Probably by asking somewhat less question here.
You could have Google to search first. If you find it hard or getting stucked to any point then you can come here.
|
|
|
|
|
but how can I search? what keywoord? I tried expiring (set expire to 0 and -1 the page but didn't work
|
|
|
|