javascript
-
-
Hi, clarify it.
Thanks, Sun Rays To get something you must have to try once. My Articles
-
You can do this with AJAX, or you can write the values you want into the script as variables.
Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
-
You can do this with AJAX, or you can write the values you want into the script as variables.
Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
Thx For reply my need is i have a javascript array in that array i want put asp.net array values For Example : ------------------ in the place of 'an apple','alligator','elephant','pear' etc.. i want to put asp.net array values var customarray=new Array('an apple','alligator','elephant','pear','kingbird','kingbolt', 'kingcraft','kingcup','kingdom','kingfisher','kingpin'); var custom2 = new Array('something','randomly','different'); Keerthi
-
Thx For reply my need is i have a javascript array in that array i want put asp.net array values For Example : ------------------ in the place of 'an apple','alligator','elephant','pear' etc.. i want to put asp.net array values var customarray=new Array('an apple','alligator','elephant','pear','kingbird','kingbolt', 'kingcraft','kingcup','kingdom','kingfisher','kingpin'); var custom2 = new Array('something','randomly','different'); Keerthi
OK, in this case, just write the values into your javascript from the code behind, no need to call it with AJAX, if the values are known, just pass them through.
Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
-
Thx For reply my need is i have a javascript array in that array i want put asp.net array values For Example : ------------------ in the place of 'an apple','alligator','elephant','pear' etc.. i want to put asp.net array values var customarray=new Array('an apple','alligator','elephant','pear','kingbird','kingbolt', 'kingcraft','kingcup','kingdom','kingfisher','kingpin'); var custom2 = new Array('something','randomly','different'); Keerthi
Hi dear, It is Possible to call c# function through javascript. Please go through google, if again not able to find. plz write me at personalmail@mysampatti.com By
Hello Forum Always be in touch to help about the topic ASP.NET
-
Hi Kirthi, It is possible To Do what u have asked : Just Look At The Example given Below. Here I have Passed The Values That I Get From TextBox This Code U have To Write In Ur ASPX Page
var cal = new CalendarPopup(); cal.showNavigationDropdowns();
And This IsWhat i have written in my Saprate Javascript File This Is A Functionfunction stepvalidation1(txtdate1,txtdate2,txtdatenow) { var flag=0; var dt1=document.getElementById(txtdate1); var dt2=document.getElementById(txtdate2); if (isDate(dt1.value)==false) { dt1.focus(); flag=1; } else { if(step3validation(txtdate1,0,txtdatenow)) { } else { flag=1; } } if (isDate(dt2.value)==false) { dt2.focus(); flag=1; } else { if(step3validation(txtdate2,0,txtdatenow)) { } else { flag=1; } } if(flag>0) { return false; } else { return true; } }
and this is the line tht i have written in my .cs Filebtn_Update.Attributes.Add("onclick", "javascript:return stepvalidation1('" + date1.ClientID.ToString()+ "','" + date2.ClientID.ToString()+ "','" + System.DateTime.Now.ToShortDateString() + "');");
I think This Can Help If Any doubt on the above then AskJust Do IT™ [Information Technology]™ :->
-
Thx For reply my need is i have a javascript array in that array i want put asp.net array values For Example : ------------------ in the place of 'an apple','alligator','elephant','pear' etc.. i want to put asp.net array values var customarray=new Array('an apple','alligator','elephant','pear','kingbird','kingbolt', 'kingcraft','kingcup','kingdom','kingfisher','kingpin'); var custom2 = new Array('something','randomly','different'); Keerthi
u van also try by this trick document.getElementbyId(HiddenButton).Click;
Hello Forum Always be in touch to help about the topic ASP.NET
-
Hi Kirthi, It is possible To Do what u have asked : Just Look At The Example given Below. Here I have Passed The Values That I Get From TextBox This Code U have To Write In Ur ASPX Page
var cal = new CalendarPopup(); cal.showNavigationDropdowns();
And This IsWhat i have written in my Saprate Javascript File This Is A Functionfunction stepvalidation1(txtdate1,txtdate2,txtdatenow) { var flag=0; var dt1=document.getElementById(txtdate1); var dt2=document.getElementById(txtdate2); if (isDate(dt1.value)==false) { dt1.focus(); flag=1; } else { if(step3validation(txtdate1,0,txtdatenow)) { } else { flag=1; } } if (isDate(dt2.value)==false) { dt2.focus(); flag=1; } else { if(step3validation(txtdate2,0,txtdatenow)) { } else { flag=1; } } if(flag>0) { return false; } else { return true; } }
and this is the line tht i have written in my .cs Filebtn_Update.Attributes.Add("onclick", "javascript:return stepvalidation1('" + date1.ClientID.ToString()+ "','" + date2.ClientID.ToString()+ "','" + System.DateTime.Now.ToShortDateString() + "');");
I think This Can Help If Any doubt on the above then AskJust Do IT™ [Information Technology]™ :->
HI than Q it is working fine but in my web page i am binding values to a array. that array values i want to pass in javascript. var customarray=new Array(---- asp.net array values ------- + 'alligator','elephant','pear','kingbird','kingbolt', 'kingcraft','kingcup','kingdom','kingfisher','kingpin'); Keerthi
-
Yes you can do this I assume that u have a method in code behind which returns string, write a logic to return string in following format Vaue1, value2, value3
SERVER Method(code behind): public string GetCommaSepratedUserNames() { //write u r logic here, instead of my sample return "'Manikandan.net, Prem.telecom, someName.Asp'"; }
Here value1, value2, value3 are your desired values, which u want to return from server. Write the java script like bellow:<script> var customarray=new Array(<%=GetCommaSepratedUserNames()%>); var custom2 = new Array('something','randomly','different'); </script>
Manikandan.net [Coding is life]