|
hi
my aim is to ask user to input a number and square it then want to display it in another text box ..with out postback of the page
i have used a html button n tried but failed
plz do let me know
regards
sindhu tiwari
Merry Xmas
|
|
|
|
|
<html >
<body>
<script language="javascript">
function Square()
{
var tb1 = window.document.getElementById("tb1");
var tb2 = window.document.getElementById("tb2");
tb2.value = "";
if(tb1.value == "" || isNaN(tb1.value))
return;
var temp = parseInt(tb1.value);
tb2.value = temp * temp;
}
</script>
<input type="text" id="tb1" name="tb1" />
<br />
<input type="text" id="tb2" name="tb2" />
<br />
<input type="button" value="Square" onclick="Square();"/>
</body>
</html>
|
|
|
|
|
Hi Sindhu!
Try this Javascript.
<script language="javascript" type="text/javascript"><br />
function SQRT()<br />
{ <br />
<br />
var value=Form1.inputText1.value; <br />
value = value * value; <br />
Form1.inputText2.innerText = value; <br />
}<br />
</script>
Regards.
"If I were not myself, I would like to be somebody like myself."
|
|
|
|
|
Hi,
How can I loop through an HTML Table and check all controls of each cell (TD) in it.
What I would like to achieve is make one TD on that table visible=true, and make all other TD visibility false.
Regads,
Blumen
|
|
|
|
|
blumenhause wrote: How can I loop through an HTML Table
Try this code. You will get all rows of HTML table.. then, check the tr variable at runtime, you will know how to get the cell value.
<br />
var tbody = document.getElementById("t1");<br />
<br />
var i = 0;<br />
for(i = 0; i < tbody.rows.length; i++){<br />
var tr = tbody.rows[i]; <br />
}
|
|
|
|
|
I've enabled script debugging in IE, but I can't debug in VS 2005 aspx file.
I'm not doing TBODY, instead I'm using this structure:
<table>
<tr>
<td></td></tr></table>
|
|
|
|
|
blumenhause wrote: I'm not doing TBODY, instead I'm using this structure:
It's okay... I think my code will still work..
blumenhause wrote: I've enabled script debugging in IE, but I can't debug in VS 2005 aspx file.
It's strange.. What about Firebug? See this article[^] if you are not so sure how to use Firebug.
OR
You can try to alert (eg. alert(tr.cell[0]);)
|
|
|
|
|
I really appreciate it, thank you.
|
|
|
|
|
blumenhause wrote: How can I loop through an HTML Table and check all controls of each cell (TD) in it.
Here is a DOM example[^] that will give a tip on how to traverse a HTML table and access the controls in it.
- Regards - JON
Life is not measured by the amount of breaths we take, but by the moments that take our breath away.
|
|
|
|
|
|
I have a web user control.
I need to create one property in this control that can be accessed in the main page on client side.
How can I achieve this.
Ashwani
|
|
|
|
|
Normally, It is not possible... I think you probably need to use the third-party Ajax frameworks (e.g: AjaxPro and etc)...
|
|
|
|
|
use a Hidden Field on the web-user control. you can access it on the client-side.
- Regards - JON
Life is not measured by the amount of breaths we take, but by the moments that take our breath away.
|
|
|
|
|
Hello everybody,
i have two issues..
in my application I have DataTable which contain all the values.My dataTable contain 3 columns and rows depend on the data.Later on I assign the datatable to a gridview. I want to put line break in the last column of the Gridview and in the 2nd column i need the data should be hyperlink to a pgeUrl.
i use VS2005
plz help me out..
A key to every Solution
|
|
|
|
|
For a new line break you can use this syntax in the inline code
DataBinder.Eval(Container.DataItem, "ColName").ToString().Replace(Environment.NewLine,"<br/>")
For a Hyperlink Column on the Gridview control, you can check the sample code Here[^]
- Regards - JON
Life is not measured by the amount of breaths we take, but by the moments that take our breath away.
|
|
|
|
|
where I v to writhe the code before bind the datasource or in aspx page.
my code is as below
DataColumn dcol = new DataColumn(Var_ColumnName1, typeof(System.String));
subsGift_DataTable.Columns.Add(dcol);
lke other two column..
DataRow dr_Gift = subsGift_DataTable.NewRow();
dr_Datarow[Var_ColumnName1] = "SomeValue");
dr_Datarow[Var_ColumnName2] = SomeValue2;
dr_Datarow[Var_ColumnName3] =" Name: Address: PhoneNo: ";
subsGift_DataTable.Rows.Add(dr_Gift);
MyGridView.DataSource = subsGift_DataTable;
MyGridView.DataBind();
I need data shown in Column3 in linebreak like
Name:
Address:
PhoneNo:
and the address sould be hyperlink..
A key to every Solution
|
|
|
|
|
Is it possible to split an XML File ( which has converted from a book to xml file) to many small files depending upon the page no of the book using asp.net ?
If possible means please tell me the concept and the codings.
VanithaVasu
|
|
|
|
|
I suggest you to take a look at the XmlReader and XmlWriter classes in .NET which will help you parse and write XML data from XML documents.
- Regards - JON
Life is not measured by the amount of breaths we take, but by the moments that take our breath away.
|
|
|
|
|
Hi, I have a requirement to customize the edit in Grid view.
I need to place an image instead of edit link button in Grid view.
When i click on that image, the same edit functionality will need to happen.
or
I want to keep check boxes for each row. I have an edit button in footer.
When i click on edit button, the checkboxes which i checked need to appear in edit mode.
How can i customize like this...
Thanks & Regards
G. Satish
|
|
|
|
|
Satish - Developer< wrote: Hi, I have a requirement to customize the edit in Grid view.
I need to place an image instead of edit link button in Grid view.
When i click on that image, the same edit functionality will need to happen.
you can use a CommandField with ButtonType set as Image, ShowEditButton property set to True and EditImageUrl property to the appropriate Image. Write the relevant code on the RowEditing event of the GridView.
- Regards - JON
Life is not measured by the amount of breaths we take, but by the moments that take our breath away.
|
|
|
|
|
Thank You John,
Thank you very much. Your reply is helped a lot for me.
|
|
|
|
|
Satish - Developer< wrote: Thank You John,
You're Welcome.
- Regards - JON
Life is not measured by the amount of breaths we take, but by the moments that take our breath away.
|
|
|
|
|
Hello,
I need to find geographiacl location of the visitor from his IP address.
I am able to get his IP address but unable to get location.
Is there any way to get location from IP address....
|
|
|
|
|
Dikshant wrote: Is there any way to get location from IP address....
Try this...
Extracting the Country from IP Address[^]
- Regards - JON
Life is not measured by the amount of breaths we take, but by the moments that take our breath away.
|
|
|
|
|
iam using isdate function to check the whether the given date is correct or not but it is taking only if the date is given in mm/dd/yyyy format.how to check it shoukd take in dd/mm/yyyy format also
|
|
|
|