|
ASP.NET adds some name mangling to control ids when they are rendered. The controls are prefixed with the container name such as: Content1_lbltime. Since you are looking specifically for an element with the id lbltime this obviously won't work.
I would strong suggest you use JQuery and something like this
var value = $("id[$='lbltime']").val();
This says to get the element with an id that ends with 'lbltime' and retrieve its value. This will find the control no matter what prefix has been added
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
This code it's work okay in the page with out Masterpage
so the problem is document.getElementById("lbltime").value not work with masterpage
I want code work with masterpage
|
|
|
|
|
Member 7765904 wrote: the problem is document.getElementById("lbltime").value not work with masterpage
That is exactly what I'm saying. Have you tried it? What are you having difficulties with? What don't you understand?
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Hi,
I suggest this solution, it works for me.
in your JS add variable, and assign the ClientID of ur label control.
<script type="text/javascript">
var slbltime = '<%=lbltime.ClientID%>'
window.onload = WindowLoad;
function WindowLoad(event) {
ActivateCountDown("CountDownPanel1", document.getElementById(slbltime).value, "CountDownEnded1");
}
</script>
bcoz when .Net render asp control to html control, they need to give id to it.
if u use asp:label control, the id will transform into 'Master_ct00_lbltime' something like that.
as far as i know, what other member want to say is if u assign value into ur label control from code behind file(.aspx.cs)
u need to do b4 PreRender state of page life cycle.
PreRender is the state b4 the asp:control are actually transform into html control to send it to the web browser.
Hope it works!
|
|
|
|
|
Look at the source code of the webpage when it comes up. The ID of the label is not what you think it is...because of the MasterPage.
|
|
|
|
|
Let me begin by saying I am not fluent in regex. I need a regex that will validate a date AND time value, not just date and not just time...both. I found a regex written by Bernat Sales at regexlib.com that will validate a date AND time entry, however, it only validates it in European formate (dd/mm/yyyy hh:mm:ss). I need it to validate only in American format (mm/dd/yyyy hh:ss:mm). Can someone, out of the goodness of their heart, please modify this regex to accomplish my goal of validating in American format. Here is Bernat's creation from which you can start:
^((((([0-1]?\d)|(2[0-8]))\/((0?\d)|(1[0-2])))|(29\/((0?[1,3-9])|(1[0-2])))|(30\/((0?[1,3-9])|(1[0-2])))|(31\/((0?[13578])|(1[0-2]))))\/((19\d{2})|([2-9]\d{3}))|(29\/0?2\/(((([2468][048])|([3579][26]))00)|(((19)|([2-9]\d))(([2468]0)|([02468][48])|([13579][26]))))))\s(([01]?\d)|(2[0-3]))(:[0-5]?\d){2}$
Again, I am not a regex guru, nor do I plan to be. I just need this regex for a current page I'm writing. Thanks in advance.
|
|
|
|
|
|
Thanks for the search suggestion, but that is to the site where I found Bernat's regex by searching already. His is the closest I found to what I need (it only needs to swap the month and date tests).
When I have time (won't for a month), I'll check out the tool to which you sent me a link.
|
|
|
|
|
Here you can use it
Will detect American Date and time with whitespace
RegExp: /[\d]{2}\s[\d]{2}\s[\d]{4} [\d]{2}:[\d]{2}:[\d]{2}/g
|
|
|
|
|
Thanks, but that won't validate February or 30 versus 31 days properly.
|
|
|
|
|
Hey guys, as some of you have seen, i've been making some ASP.NET questions here, because i'm about to start my own company based on a business model i have.
The thing is, I don't have the enough knowledge in ASP.NET in order to do such a huge project (And neither in PHP), my brother is an ASP.NET C# Senior, but he's pretty busy with his job and carrier, so the help he can provide is closely to be NULL.
What i meant to say, is that I need to cover all i can with this, and there's no chance to have holes in the system, i know that every system isn't impossible to hack (not even NASA), but at least, don't leave it that easy to do so.
The project requires a very good knowledge of Internet Security and Payment System, since it will be an Online game site never seen on market.
A web developing company where a friend of mine works, offered me to develope my project under confidentiallity contracts and stuff in PHP and Apache/Oracle.
(The money at this point is not a problem since my lawyer will be also my investor)
Didn't know where to post this, since if I post it in PHP section, all the people will say "Nooo! PHP is better" or here "Nooo! ASP.NET is better", i need a professional answer if possible, i've been making a Google Search about this, and all the forums says the same, there's a lot of people who says that PHP is better and why, and the same applies for ASP.NET, I really don't know what to do!!
Is PHP secure enough to handle such a big project?
I need:
- Flexibility
- Security
- Performant system
Hope this is the right place to post this,
Thanks in advance,
My best regards,
Marian, from Argentina.
|
|
|
|
|
The correct forum for this is probably "Web Development".
My Advice: PHP will handle it, but you might find the going hard, depends upon what exactly it is you are doing. ASP.NET will probablyhandle it to. If you architect the system correctly, the font-end will matter much less.
I suggest you find PHP & ASP devs you can trust and chat with them about your requirements. You'll need some good advice to secure the system also, this is very hard.
|
|
|
|
|
Exactly, the web developer company will make the website, they got PHP and ASP.NET programmers, so i can totally decide. I'm an application programmer... so i can't take a risk by doing such a project by my own. I need a professional hand to do it.
Thanks for replying!
Marian.
|
|
|
|
|
Hi can u help me reach a regular expression which will
1: allow 7 numeric digits
or
2: 9 alphanumeric
or
9 numeric
i tried ([0-9]{7}|[a-zA-Z0-9]{9}|[0-9]{9}) but it doesn't allow 9 numerics.
thanks
|
|
|
|
|
As you already capture the conditions for a numeric only match in the alphanumeric match, you can drop the 9 numbers test and rely on the 9 alpha-numeric test. The key to your solution is to test for the longer character match before you test the shorter match, so your query becomes:
[a-zA-Z0-9]{9}|[0-9]{7}
|
|
|
|
|
Hai Experts.
i am working on the slide shows for my webapplication .i need a Vertical slide Show that moves From bottom to top For Example
http://www.accenture.com/us-en/Pages/index.aspx[^]
Here they are showing in the horizontal way i need in The Reverse order Vertical with same Bttom move up and Move down
please Help me out
Regards
venu
|
|
|
|
|
Don't cross post you have already asked this question in the JavaScript forum.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Hai nischalke.
If u dont know The answer please keep quiet, or do your work..understood.I have seen many Answers From u which are not at all use ful
Regards
venu
|
|
|
|
|
Watch your tone son. You need to read this.
How to get an answer to your question[^]
If you can't be civil then don't make any comments at all. Otherwise it will be very unlikely anyone will help you here.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
if client A page, B popup page was displayed.
And If client click button which "don't want to pop up".
So, I used cookies, but it dosen't work.
1. client connect A Page and don't click button
2. client connect A page again
but A page's Request.Cookies["co1"].Expires is "{0001-01-01 AM 12:00:00}"
Why?
and if there is 10 users, am i have to make Response.Cookies["co1"]~ Response.Cookies["co10"]?
A Page:
if (Request.Cookies["co1"].Value == null || Request.Cookies["co1"].Expires >= DateTime.Now)
{
Response.Cookies["co1"].Value = "1";
Response.Cookies["co1"].Expires = DateTime.Now.AddDays(1);
PopUp B Page.
}// if (Request.Cookies["co1"].Value == null || Request.Cookies["co1"].Expires >= DateTime.Now)
B Page:
if client click button
->
Response.Cookies["co1"].Expires = DateTime.Now.AddDays(-1);
RegisterStartupScript("load", "<script type=\"text/javascript\">\n" + "self.close();\n" + "<" + "/script>");
hi
My english is a little.
anyway, nice to meet you~~
and give me your advice anytime~
modified on Thursday, March 31, 2011 12:05 AM
|
|
|
|
|
You can not access cookies that were created on domain A from domain B. So I guess cookies won work here.
No you don't need to create cookies based on number of users ("c1" ... "c10"), since cookies get stored client side.
|
|
|
|
|
|
|
Hy,
I have shown a swf file inside the object tag which was embedded into an iframe through jaava script .The following code works in IE 8 but is not working in chrome.I have pasted my code below.
<script type="text/javascript">
function populateIframe(FilePath)
{
// var FilePath='../images/suche.swf';
var ifrm = document.getElementById('ucCMSHTML_ifrmCMSHTML');
ifrm = (ifrm.contentWindow) ? ifrm.contentWindow : (ifrm.contentDocument.document) ? ifrm.contentDocument.document : ifrm.contentDocument;
ifrm.document.open();
ifrm.document.write('<object height="300px" width="100%" style="border: 0 0 0 0 ; background-color: #FFFFFF;" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ><param name="movie" value="'+FilePath+'\" ><param name= wmode value ="opaque"/> </object>');
ifrm.document.close();
contentEditable="true" ;
}
</script>
<table width="100%">
<tr>
<td>
<%-- <asp:Literal ID="ltrcmsHTML" runat="server"></asp:Literal>--%>
<div style='border: 1; width: 100%; height: 100%; overflow: auto; padding: 0px'>
<iframe id='ifrmCMSHTML' runat='server' width='100%' height='300' scrolling='no'
frameborder='0' style='border: 0 0 0 0; background-color: #FFFFFF;'></iframe>
</div>
</td>
</tr>
</table>
Please Help.
|
|
|
|
|
autoextender result was coming behind Flah inside iframe.
To resolve the issue we have used the attached code.
As a result autoextender result is coming above flash.
But the cursor started blinking very fast in all the textbox of the page in an abnormal way.
We need to know how to make the cursor blink in normal way.
|
|
|
|