|
Use the document.getElementById method to get the elements from their id.
---
b { font-weight: normal; }
|
|
|
|
|
I am not to sure how to do that, as the asp.net gives my textboxes and dropdown boxes different names to the names I specify in the asp.net.
EG. My txtfield is called "txtUserLoginName", but when I view source, it's called "ctl00$cphCenter$txtUserLoginName"
|
|
|
|
|
playout wrote: I am not to sure how to do that, as the asp.net gives my textboxes and dropdown boxes different names to the names I specify in the asp.net.
But you already do that in the code. The problem is that you are treating the id strings as variable names instead of strings in the Javascript code.
---
b { font-weight: normal; }
|
|
|
|
|
I found the problem, thanks. Got it to work now. Thanks for the help. If you didnt point it out to me, I would probarly still be sitting clueless.
|
|
|
|
|
you are doing correctaly but you need to be get values in function instead of passing in function.
like
getElimentbyId('<% drpLocations.ClientID %>')
then use it.
|
|
|
|
|
HI,
i have a problem i want to enter a new row in the grid and this row contain some textboxces in which i enter the data and whn i press Insert buttion in my grid that data is inserted in the database.Tell me some other way to doing this or send me some codesnippet
|
|
|
|
|
I think this[^] will be helpful.
Best Regards,
Apurva Kaushal
|
|
|
|
|
use textbox in footer template and insert button too.
use this if this is not possible the tell me i will give you code.
|
|
|
|
|
Hi there,
I've been going through the tutorials, but either missed it (was late last night) oder it's just not there: I need some information on how to upload multiple image files on one page. Please note, that I have to use .NET 1.1!
Any starting point? Thanks in advance!
/matthias
I love deadlines. I like the whooshing sound they make as they fly by. [Douglas Adams]
|
|
|
|
|
For a start you can have a look at this.[^]
Best Regards,
Apurva Kaushal
|
|
|
|
|
My probelm is,
When i have two textboxes with two difeerent values, when i click inside the third textbox ,i need to get the sum of first two textboxes values.
Is it possible without any button click event.
How to do>> am i need to write any javascript for this???
kissy
|
|
|
|
|
Hi there...
This is the javascript function
function getSum(obj)
{
var v1 = document.getElementById('txt1').value;
var v2 = document.getElementById('txt2').value;
if ( !isNaN(v1) && !isNaN(v2) && !isEmpty(v1) && !isEmpty(v2) )
{
var sum = parseInt(v1) + parseInt(v2);
obj.value = sum;
}
else
{
alert("Please fill the fields with valid numbers");
}
}
function isEmpty(txt)
{
if (txt == "")
{
return true;
}
else
{
return false;
}
}
There are three text boxes in the form txt1, txt2, and txtSum
in the page load add this code ...
<br />
txtSum.Attributes.Add("onclick", "getSum(this);")<br />
Hope this would help
Best Regards
3ala2 
|
|
|
|
|
Ur idea is really working good and my exact doubt here is ,
I have to do this with the database values,i need to check the txt1,txt2
if ( !isNaN(v1) && !isNaN(v2) && !isEmpty(v1) && !isEmpty(v2) )
{if(v1>v2){
var sum = parseInt(v1) + parseInt(v2)
obj.value = "+" & sum}}
it is not working,bcz i need to check it and do as per my requirement.This adding of '+' symbol before and the condition checking are failed.I need to do the operations with the database values.
Thanks once again.
How to do.
My Purpose to do this is,
I have 2 columns for fees(txt1,txt2) and if txt1>txt2 then i need to disply if txt1>txt2 +(sum=txt1-txt2) and vice versa.
-- modified at 2:51 Wednesday 22nd November, 2006
kissy
|
|
|
|
|
Thanks once again, my problem got solved.
kissy
|
|
|
|
|
Hi Greetings
I Need a ASP.NET code that allow users to select Multiple files in File Open Dialog Box.
This is easy in Windows Application but its very Complicate in ASP.NET web Application
Regards
RPL
r_palanivel83 10:01 4 Jan '06
|
|
|
|
|
HI Greetings
I have done Multiple File Upload in My project.i want to select multiple files by drag and drop on to ASP.NET control(eg: DataGrid,DataView)those file paths will added to that control.i have seen this drag and drop event in Windows Application but i want to achieve this in ASP.NET.
Simply i want the design like Outlook 2003 drag and drop attachment process in asp.net.
Thanks in advance.
Regarding
RPL
r_palanivel83 10:01 4 Jan '06
|
|
|
|
|
Hi friends
I have checkbox control which when checked/unchecked should prompt a message
"Are you sure you want to Check/Uncheck?"...
Also the postback operation on checking/unchecking the CheckBox should not affect my page's normal working..that is, i have a button when clicked enables this CheckBox and when clicked the second time,disables the CheckBox... So this enabling and disabling operations shouldnt be affected by the CheckBox's event...
Please help me!
Thanx in advance!
|
|
|
|
|
You just need to put this javascript there in checkbox html part:
onclick="javascript:return confirm('Are you sure you want to Check/Uncheck?');"
Best Regards,
Apurva Kaushal
|
|
|
|
|
Can u please tell me where to include this code?
I mean in OnCheckedChanged = "...." or where else?
Thanx!
|
|
|
|
|
Hi
I got it!
Thanx very much!
|
|
|
|
|
always welcome..
Best Regards,
Apurva Kaushal
|
|
|
|
|
Hi guys
I am creating folder thru asp.net with help of
System.IO.Directory.CreateDirectory("Name")
Now i want to rename this directory. So some of members gave me suggestion to use
System.IO.Directory.Move(OldFile,NewFile)
But this is not working in my case as i am storing this in one location, So it is giving me error that
"Source and destination path must be different."
SO if any one have any idea please let me know
Thanks in advance
Regards,
DJ Rock
|
|
|
|
|
But that seems to be OK. Are you giving both the parameters same?
Best Regards,
Apurva Kaushal
|
|
|
|
|
no i am giving file name different but it is at same place
like i have following path
D:/Folders/Temp1 and i want to rename Temp1 to Temp2 ok? so i am passing
System.IO.Directory.Move("D:\Folders\" & oldName, "D:\Folders\" & NewName)
Tell me is it ok?? then why it is giving me error like Must not be same path??:
Regards,
DJ Rock
|
|
|
|
|
But the same code is working fine for me..
Best Regards,
Apurva Kaushal
|
|
|
|