|
hello folks,this is basically my first question. help me out
i have created a system running clock in javascript
and am able to display the value on the page by the document property...
by calling a function in loop...
can u tell me how to display this value in the textbox...the code is
Ish Kumar Kapila
|
|
|
|
|
Hi!
Because you haven't defined a name for the input box. Just define a name such as name="box1" and then use the ID with document.form.box1.value statement in the function.
|
|
|
|
|
sorry buddy it did not worked... see the new code
<!--
<html>
<head>
<script>
function time()
{
var d=new Date()
var h=d.getHours()
var m=d.getMinutes()
var s=d.getSeconds()
var ms=d.getMilliseconds()
var w=document.getElementById('txt').innerHTML=h+":"+m+":"+s+":"+ms //check it
t=setTimeout('time()',50)
document.form.tb1.value=w // check it
}
</script>
</head>
<body onload="time()" >
<div id="txt"></div>
<input type="text" id="tb1" >
</body>
</html>
//-->
help me guys...
Ish Kumar Kapila
|
|
|
|
|
If you define a form object it can work out. After tag define a form object
|
|
|
|
|
Still nothing happened buddy. is the problem so complex to solve..
plz try again ... thanx for the effort
<!--
<html>
<head>
<script type="text/javascript">
function time()
{
var d=new Date()
var h=d.getHours()
var m=d.getMinutes()
var s=d.getSeconds()
var ms=d.getMilliseconds()
document.getElementById('txt').innerHTML=h+":"+m+":"+s+":"+ms
t=setTimeout('time()',50)
document.tb1.value=t
}
</script>
</head>
<body onload="time()" >
<FORM name="form" method="POST"></FORM>
<div id="txt"></div>
<input type="text" id="tb1" ></input>
</body>
</html>
-->
try something new
Ish Kumar Kapila
|
|
|
|
|
Hi!
I just fixed the code for you. There were a few mistakes. Copy and paste the whole code below in to a page and then load the page. I have checked it and it is working...
<title>New Page 1
function time()
{
var d=new Date()
var h=d.getHours()
var m=d.getMinutes()
var s=d.getSeconds()
var ms=d.getMilliseconds()
document.getElementById('txt').innerHTML=h+":"+m+":"+s+":"+ms
t=setTimeout('time()',50)
document.form.tbox.value=t
}
|
|
|
|
|
how can i enable debugging in web service?
my client cannot access the service if i create it in the wwwroot\folder\service... however it can access it wwwroot\service like this can i get a logical reason for this
B U
|
|
|
|
|
Hi, i have an aspx page containing 7 user controls now i have 5 actors in my app , against each user i have certain function defined, now based on these function i have to either make a control's visibility true/false or enable/disable a control and the roles and the function corresponding to them r defined in an xml file.
i am not able to figure out how to go about it any help/suggestion are welcome
|
|
|
|
|
This is a snippet from my page:
I need some javascript that can check if the id query string is in the
action attribute, and if it is, remove it so the form element will look
like this:
Thanks.
/\ |_ E X E GG
|
|
|
|
|
You can use a regular expression like /(\?|&)id=(.*?)(&|$)/ to check for the attribute and remove it.
---
b { font-weight: normal; }
|
|
|
|
|
COM Error Number: -2147467259 (0x80004005)
Line Number: 97
Column Number: -1
Brief Description: Method '~' of object '~' failed
Can any one explain me what could be the possible reasons.
This code is generated when asp application is run, a call to specific file is causing the problem. a dll is also used in these pages,
when this application is run by below 5 hits its running fine. but when the load increased to 10 the error is generated
|
|
|
|
|
anybody plz send some dotnet projects with explanation its very urgent for me to get a job
|
|
|
|
|
Don't mind but what will you do with others projects??? Those projects will not help in your job but ya it will be very harmful for your carrier.
And though you want readymade .NET project then you can get it from this site itself. Just see up here is one green bar where .NET is mentioned. you just go from it.
And All the best for your job.
|
|
|
|
|
hiral_shah wrote: carrier
Career
Similar sound - very different meaning
|
|
|
|
|
Hi!
I have one global.asa file under root directory and I have defined a few application variables. Application("Visitors") keeps the total count for visitors. However, it is getting resetted every day. I wonder if it is caused because resetting the IIS.
If you enlighten me about it, I would really appreciate it.
Thanks!
Sub Application_OnStart
Application.Lock
Application("Visitors") = 0
Application("CurrentVisitors") = 0
Application.UnLock
End Sub
Sub Session_OnStart
Application.Lock
Application("CurrentVisitors") = Application("CurrentVisitors") + 1
Application("Visitors") = Application("Visitors") + 1
Application.UnLock
End Sub
Sub Session_OnEnd
Application.Lock
Application("CurrentVisitors") = Application("CurrentVisitors") - 1
Application.UnLock
End Sub
|
|
|
|
|
A web application does not run continuiously. Whenever the web server determines that the application is unused, or if it thinks that recycling it would free resources that is better used elsewhere, it can shut the application down. The application will start again at the first request to the site.
Some servers are also set up to recycle the applications on a regular interval.
If the IIS is restarted due to some server problems, the web applications will of course also be shut down.
---
b { font-weight: normal; }
|
|
|
|
|
Hi There,
I have a problem to create multi level tree structure of the folder in php if you know how then please please reply me as soon as possible. It will help me a lot. I want the same structure as like we got while we open my computer and click on folders from standard button bar.
Waiting for the Reply,
Thank you in advance.
|
|
|
|
|
Would it be possible to make a web service request so that when it returns the data it returns straight XML instead of the serialized object? And if so, how do I do it?
I am quite new to this... thanks for your time!
|
|
|
|
|
A web service returns a SOAP message, which is XML that follows the SOAP standard.
If you make a regular web page instead, you can return anything you like.
---
b { font-weight: normal; }
|
|
|
|
|
After some playing around I realized that I'm an idiot haha
I was able to figure it out
|
|
|
|
|
Morning all.
Im currently working on a booking form and need to get the user to input, into two ASP textboxes, the date they want to arrive and the date they want to depart. To make it easier for the user when they click on the textbox an asp:calendar control appears. The calendar is hidden using css and the onfocus feature of the textbox is used to make it visible again. The javascript performs this by editing the calendars css display attribute.
The user can then select a date and the date gets thrown into the textbox. So thats all gravy.
The problem appears when the month selector is clicked on the calendar control, because of course this reloads the page and thus sets the calendars css back to it's original setting. Thus hiding the calendar control.
How can I get around this? Is there a better way of doing this.
My only other option is to have a link to the side of the textbox and reveal the calendar on that being clicked. But id rather use the onfocus event of the textbox and keep the form simpler...
Any help on this would be spot on. Thanks
|
|
|
|
|
Personally, my favorite way to popup a helpful calendar is to open a new window using javascript. This new window has JUST the calendar and the name of the textbox that it needs to set a value for is passed in the url. Then, to set up the calendar to update that textbox on the other window I add this code:
Note: calPicker is my Calendar control
Protected Sub calPicker_DayRender(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.DayRenderEventArgs) Handles calPicker.DayRender
' Clear the link from this day
e.Cell.Controls.Clear()
' Add the custom link
Dim Link As New HyperLink
Link.Text = e.Day.Date.Day
'Format colors
If e.Day.IsOtherMonth Then
Link.ForeColor = Drawing.Color.DimGray
Else
Link.ForeColor = Drawing.Color.Black
End If
Link.ToolTip = e.Day.Date.ToString("MMMM d, yyyy")
'Tell the link which control on the other window to update
Link.Attributes.Add("href", "JavaScript:window.opener.document." & Request.QueryString("field") & ".value = '" & e.Day.Date.ToString("yyyyMMdd") & "'; window.close();")
e.Cell.Controls.Add(Link)
End Sub
You can still do it your way if you want, you will just have to setup a bunch of flag variables to check and see if you are supposed to hide the css or not, and you can also use hidden fields on the aspx side, and javascript.
Hope this helps.
|
|
|
|
|
Hi All! I want to get some link regarding accessing MS Word (through automation ) from javascript.(just like vb6 or vbscript allows). I need javascript as it is supported by all major browsers.
Thanks
|
|
|
|
|
Hi,
I have one problem with nested tables. following is spinpet for html
<code>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Untitle</title>
</head>
<body>
<div>
<table style="width:100%" border="0" width="100%" cellpadding="2" cellspacing="2">
<tr class="TableRowBackGround">
<td>
<table style="width:100%" cellspacing="0" border="1" style="border-color:Black;border-width:1px;border-style:solid;width:100%;border-collapse:collapse;">
<tr>
<td >
<span >Root</span></td>
<td > pqr</td>
<td >0</td>
<td align="center" >
4</td>
<td align="center" >
1</td>
</tr>
<tr>
<td colspan="12" style="border-style:Solid;width:100%;">
<table style="width:100%" border="0" style="border-color:Black;border-width:1px;border-style:solid;width:100%;border-collapse:collapse;">
<tr>
<td></td>
<td>
<table style="border-color:Black;border-width:1px;border-style:solid;width:100%;border-collapse:collapse;" cellspacing="0" border="0" >
<tr>
<td >
<span >BBB</span></td>
<td >
xxx</td>
<td >
1</td>
<td align="center" >
2</td>
<td align="center" >
2</td>
</tr>
<tr>
<td colspan="6" style="border-style:None;width:100%;">
<table style="width:100%" border="0" style="border-color:Black;border-width:1px;border-style:solid;width:100%;border-collapse:collapse;">
<tr>
<td></td>
<td>
<table style="width:100%" cellspacing="0" border="0" >
<tr>
<td colspan="12" style="border-style:None;width:100%;">
<table style="width:100%" border="0" style="border-color:Black;border-width:1px;border-style:solid;width:100%;border-collapse:collapse;">
<tr>
<td>
</td>
<td>
<table style="width:100%" cellspacing="0" border="0" >
<tr>
<td ><span >AAA</span></td>
<td > xyz</td>
<td >0</td>
<td align="center" >0</td>
<td align="center" >4</td>
</tr>
<tr>
<td colspan="12" style="border-style:None;width:100%;">
<table style="width:100%" border="0" style="border-color:Black;border-width:1px;border-style:solid;width:100%;border-collapse:collapse;">
<tr>
<td></td>
<td>
<table style="width:100%" cellspacing="0" border="0" >
<tr>
<td ><span >Chart</span></td>
<td > xyz</td>
<td >0</td>
<td align="center" >0</td>
<td align="center" >5</td>
</tr>
<tr>
<td colspan="12" style="border-style:None;width:100%;">
<table style="width:100%" border="0" style="border-color:Black;border-width:1px;border-style:solid;width:100%;border-collapse:collapse;">
<tr>
<td></td>
<td>
<table style="width:100%" cellspacing="0" border="0" >
<tr >
<td ><span >Level 6</span></td>
<td > abc</td>
<td >0</td>
<td align="center" >0</td>
<td align="center" >6</td>
</tr>
<tr>
<td colspan="12" style="border-style:None;width:100%;">
<table style="width:100%" border="0" style="border-color:Black;border-width:1px;border-style:solid;width:100%;border-collapse:collapse;">
<tr>
<td></td>
<td>
<table style="width:100%" cellspacing="0" border="0" >
<tr >
<td ><span >Level 7</span></td>
<td > abc</td>
<td >0</td>
<td align="center" >0</td>
<td align="center" >7</td>
</tr>
<tr>
<td colspan="12" style="border-style:None;width:100%;">
<table style="width:100%" border="0" style="border-color:Black;border-width:1px;border-style:solid;width:100%;border-collapse:collapse;">
<tr>
<td></td>
<td>
<table style="width:100%" cellspacing="0" border="0" >
<tr >
<td ><span >Level 8</span></td>
<td > abc</td>
<td >0</td>
<td align="center" >0</td>
<td align="center" >8</td>
</tr>
<tr>
<td colspan="12" style="border-style:None;width:100%;">
<table style="width:100%" border="0" style="border-color:Black;border-width:1px;border-style:solid;width:100%;border-collapse:collapse;">
<tr>
<td></td>
<td>
<table style="width:100%" cellspacing="0" border="0" >
<tr >
<td ><span >Level 9</span></td>
<td > abc</td>
<td >0</td>
<td align="center" >0</td>
<td align="center" >9</td>
</tr>
<tr>
<td colspan="12" style="border-style:None;width:100%;">
<table style="width:100%" border="0" style="border-color:Black;border-width:1px;border-style:solid;width:100%;border-collapse:collapse;">
<tr>
<td></td>
<td>
<table style="width:100%" cellspacing="0" border="0" >
<tr >
<td ><span >Level 10</span></td>
<td > abc</td>
<td >0</td>
<td align="center" >0</td>
<td align="center" >10</td>
</tr>
<tr>
<td colspan="12" style="border-style:None;width:100%;">
<table style="width:100%" border="0" style="border-color:Black;border-width:1px;border-style:solid;width:100%;border-collapse:collapse;">
<tr>
<td></td>
<td>
<table style="width:100%" cellspacing="0" border="0" >
<tr >
<td ><span >Level 11</span></td>
<td > abc</td>
<td >0</td>
<td align="center" >0</td>
<td align="center" >11</td>
</tr>
<tr>
<td colspan="12" style="border-style:None;width:100%;">
<table style="width:100%" border="0" style="border-color:Black;border-width:1px;border-style:solid;width:100%;border-collapse:collapse;">
<tr>
<td></td>
<td>
<table style="width:100%" cellspacing="0" border="0" >
<tr >
<td ><span >Level 12</span></td>
<td > abc</td>
<td >0</td>
<td align="center" >0</td>
<td align="center" >12</td>
</tr>
<tr>
<td colspan="12" style="border-style:None;width:100%;">
<table style="width:100%" border="0" style="border-color:Black;border-width:1px;border-style:solid;width:100%;border-collapse:collapse;">
<tr>
<td>
<table style="width:100%" >
<tr>
<td ><span >Level 13</span></td>
<td > abc</td>
<td >0</td>
<td align="center" >0</td>
<td align="center" >13</td>
</tr>
<tr>
<td colspan="12" style="border-style:None;width:100%;">
<table style="width:100%" border="0" style="border-color:Black;border-width:1px;border-style:solid;width:100%;border-collapse:collapse;">
<tr>
<td>
<table style="border-color:Black;border-width:1px;border-style:solid;width:100%;border-collapse:collapse;">
<tr >
<td>Level 14</td>
<td> abc</td>
<td >0</td>
<td align="center" >0</td>
<td align="center" >14</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
</body>
</html>
</code>
Check this in front page. in design view it shows level 14 but in preview it shows levels till 13
can any one suggest why?
Thanx in advance
|
|
|
|
|
Well,
due to the fact that i'm not fascinated on tables like others are, i can only give you some simple hints.
But before that, i want to ask, why are you still using nested tables? It isn't even a rumour anymore, that it produces more problems and a massive code-overhead and eats RAM-Ressources 'til the earth stands still. Okay, whatever; Should be your problem, but if there's a reason why, please note it.
1) Even in html 4 it is not allowed to use style-attributes in every table-element when using nested tables, because without a class-definition in a cascading style sheet the doubled definitions are differently interpreted. That is, because tables are organized as a list inside the interpreter, so the normal 'The same tag inside (with a style definition) overrides the parent tag, is not given.
2) The 'td'-tags/-Elements that are emepty are written like '<td ></td>'. That space in between the opening tag should be deleted. Why? Because there are many browsers especially Mozilla-based and the older Netscapes that produce blank childs/doubled text-nodes inside the Element-Hierarchy while parsing the site on load. The result is unpredictable, because even the same browser-installation (same version, setup-type, etc.) is making it's behaviour dependent on the machines power (RAM, CPU-TYPE,etc.) and especially, the core-services provided by the operating system.
So just clean up that table-tree of those spaces. Anytime, you are building a site. There should be no element that hasn't attributes in it having spaces!
3) Due to the talk, any helper might give advice based on looking up the code-result in front-page... I'm not one of those 'pro-anything-else-than-microsoft'-users, but to be true, though' i'm loving microsoft-products i never used frontpage. But what i can tell you, is that the Internet Explorer (any Version) got a problem with '100%' of width in the style-attribute of a table. This is because the styles that are pre-defined for tables use borders, column-spacing and margin-settings, that make it impossible to run a table at '100%' width without defining a stylesheet that cleans up those pre-definitions.
In some tasks it could help to set the body-Element and all-Elements to zero padding and margin.
So the resulting code should look like:
(somewhere inside the <head>...
<style type="text/css">
<!--
body{
margin:0px;
padding:0px;
width:100%;
overflow:auto;
}
*{
margin:0px;
padding:0px;
}
//-->
</style>
This is the absolute minimum set of style definitions you might have to use if you want to use tables (especially nested ones) and are ready to style up any element directly per style-attributes.
4) It is definately unnessecary to double the styles, means: use per style-definition given width- and border-values OR use the direct formatting per attribute. Why? Because any browser-type has another way of processing those values. As the Internet Explorer until Version 5.5 is first rendering the site using the direct attributes (e.g.: width="100%", border="0") and then processes the style-definitions in your head-area, then adding external stylesheets and then at least looks up if a style-attribute is present inside the Element, Other browsers do it the other way around.
5) I didn't looked it all up, but check if you gave all values for width and border-width, etc. a px after the number, because some browsers don't recognize these values as pixel values if not set, instead using pt (Point ...typographic measure).
6) If you're not giving a doctype and/or a namespace definition, any browser will parse the code as html 3/4, but there you got a problem, because those who are using html 3 or html 3 compatibility don't recognize the %-sign in the width-attribute. Even the newest IE's and Safari, Konqueror and Co. partly don't recognize them because of the downward-compatibility and different table-handling.
So at least you should give a doctype. Look up http://www.w3.org and search for doctype headers.
If you don't know what this is, here is an example for a XHTML 1 Transitional DocType:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
The DocType in any case has to be the first line(s) in your html-file if you want to use it.
The according namespace to this (used in newer browsers, capable of XML-presenting) is:
<html xmlns="http://www.w3.org/1999/xhtml">
So this one is used instead the typical '<html>'-Element.
Well, i really don't know if any of this might have had helped you if you're through with practicing it, but maybe?
Just try it, take your time.
If you got special questions you're free to send me an e-Mail. Please be specific and precisely as you're able if you're asking for help.
You know, code is poetry, fine and tasty; ...but taste sometimes isn't discussable.
You're Welcome,
Paeth.Claudius-Raphael
|
|
|
|