|
still i ma not being able to acess the control in my master page.
ex i hav a textbox id called txt
now the code
document.getElementById("txt")
still saying null
Soniagupta1@yahoo.co.in
Yahoo Messenger Id = soniagupta1
|
|
|
|
|
Sonia Gupta wrote: now the page is a master page
check out view source.You found button id as masterpageID_ButtonId.
I mean if your master page name "master" and your button is "id" then you have to found with 'master_id' in javascript.
see my first post
bEst rEgard
pAthan
please don't forget to vote on the post that helped you.
|
|
|
|
|
Hi
I am Exporting The dataGrid Data To Excel..i have done it but the problem is in my grid lots of data So i have used Paging in That when i m exporting the Grid Data insted of Exporting Whole Data it export only those data which shown in Grid and i want to export whole data..
pls tell me how can i acheive my target..
Thanks in Advance
Avesh
|
|
|
|
|
Try this..
Add the following code before export to excel.
GridView1.AllowPaging = False
GridView1.DataBind()
In the pageload set allowpaging true to the gridview
You can't do everything...
But you can do something...
So never refuse to do something that you can.....
|
|
|
|
|
Please can any one tell how to change the background color of MessageBox in windows application.. using ASP.NET2.0
Rashmi.M.K
|
|
|
|
|
|
sry sir it is actually .NET2.0 windows application..
In one of our project we r using some fixed background color for all forms... But when we display message box, we are getting different color which do not suit for the background color of form...
so if have any solution for this please reply...
Thanks for ur support and advice....
Rashmi.M.K
|
|
|
|
|
As i know u can't change the background color of a message box. You can create your won message box , using C# windows control library.
Try to use last like that i have provide.
In codeproject there are few same links on InputBox also. so, take help from them and go ahed....
And one more point, this is ASP.NET boards, and thisyour question is not related to asp.net. so please take care from next time, put this type of question on C# or VB.net section..
For any kind of clarification..... always welcome..
Good luck.
|
|
|
|
|
can i validate the date in javascript?
Soniagupta1@yahoo.co.in
Yahoo Messenger Id = soniagupta1
|
|
|
|
|
Is Google Accessible from your place?
Regards - J O H N -
|
|
|
|
|
i am not being able to access the pertaining subject code.Can u please help?
Soniagupta1@yahoo.co.in
Yahoo Messenger Id = soniagupta1
|
|
|
|
|
function checkdate(input)
{
var validformat=/^\d{2}\/\d{2}\/\d{4}$/ //Basic check for format validity
var returnval=false
if (!validformat.test(input.value))
alert("Invalid Date Format. Please correct and submit again.")
else{ //Detailed check for valid date ranges
var monthfield=input.value.split("/")[0]
var dayfield=input.value.split("/")[1]
var yearfield=input.value.split("/")[2]
var dayobj = new Date(yearfield, monthfield-1, dayfield)
if ((dayobj.getMonth()+1!=monthfield)||(dayobj.getDate()!=dayfield)||(dayobj.getFullYear()!=yearfield))
alert("Invalid Day, Month, or Year range detected. Please correct and submit again.")
else
returnval=true
}
if (returnval==false) input.select()
return returnval
}
in HTML
<form onSubmit="return checkdate(this.mydate)"><br />
<input type="text" name="mydate" /><br />
<input type="submit" value="submit" /><br /><br />
Valid date format: mm/dd/yyyy<br /><br />
<input type="submit" value="submit" /><br />
</form>
You can Try This Also
how to validate date in javascript[^]
Best Regards
-----------------
Abhijit Jana
View My CodeProject Articles
"Success is Journey it's not a destination"
|
|
|
|
|
try this:
see this link:
http://www.tutorialized.com/view/tutorial/Javascript-Date-Validation/6006
|
|
|
|
|
var abc = "12/12/2000";
var def = abc.split("/");
alert(def.length);
it is ok so far
what is the problem now
for(int i=0;i<def.length;i++)
{
alert(def[i]);
}
Soniagupta1@yahoo.co.in
Yahoo Messenger Id = soniagupta1
|
|
|
|
|
Split returns an array of string ....
problem is in 2 nd line !!!!
Thanks,
Arindam D Tewary
|
|
|
|
|
if i write
alert(abc[0]);
it is working fine.
What's the problem in loop then?
Soniagupta1@yahoo.co.in
Yahoo Messenger Id = soniagupta1
|
|
|
|
|
try ...
var abc = "12/12/2000";
var def = abc.split("/");
alert(def.length);
it is ok so far
what is the problem now
for(int i=0;i<def.<b>length-1;i++)
{
alert(def[i]);
}
Thanks,
Arindam D Tewary
|
|
|
|
|
Hi sonia,
To split a string, use the substring method:
string.substring(start,end)
Here string is the string from which you want to extract a substring.
start is the number specifying the position of the character at which the substring begins. (The character at start itself will be included in the substring.)
end is the number specifying the position of the character at which the substring ends. (The character at end will not be included in the substring.)
Note that the first character in the string corresponds to position 0, and the last character to position string.length-1.
Examples:
'Hello'.substring(0,2) // 'He'
'Hello'.substring(0,4) // 'Hell'
Regards,
S.Arif patel.
|
|
|
|
|
Sonia Gupta wrote: for(int i=0;i<def.length;i++)
{
there is no int in javascript, you want
for (var i=0;i<def.length;i++)
|
|
|
|
|
Part of my web application deals with recording voice from user in "8khz, 16bit, mono" format. which control do I need to use to meet this requirement.
I will be thankful for ur help.
with regards,
kiran.
|
|
|
|
|
That woud be hard. Did you google it by typing Audio Recording Javascript?
Here is one option[^]
|
|
|
|
|
how should i do with the dropdownlist in javascript.Like the selected-index , selected value , items.count functions in c#?
actually i wanted to use the dropdownlist functions in javascript.
Soniagupta1@yahoo.co.in
Yahoo Messenger Id = soniagupta1
|
|
|
|
|
Dear Sonia Gupta,
Its a ASP .NET forum ..... it is good that you post it in javascript forum of web development forum
In javascript...considering your drop down list controls ID is 'dddCountry'
.......
objDropDownList = document.getElementById('dddCountry')
int selectedIndex=objDropDownList.selectedIndex;
var SelectedText = objDropDownList.options[selectedIndex].text;
var SelectedValue = objDropDownList.options[selectedIndex].value;
... Hope it helps ...
Thanks,
Arindam D Tewary
|
|
|
|
|
how can i count the total items in the dropdownlist using the java script.
Soniagupta1@yahoo.co.in
Yahoo Messenger Id = soniagupta1
|
|
|
|
|
objDropDownList.options.length returns the length of items collection!!!
Thanks,
Arindam D Tewary
|
|
|
|