|
Hello friends
In my app i have ti transfer some text from one textbox to another textbox.
for that i want to retriev the element by its ClientID but how to get it my JS file.
Please help me............
Deepak Nigam
|
|
|
|
|
You can get it from Browser's View source
Thank& Regards
Vijay s
|
|
|
|
|
Use the ClientID property of the control on the server side, and inject it as javascript so that you have a variable that contains that value, on the client side.
Christian Graus
Please read this if you don't understand the answer I've given you
"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 )
|
|
|
|
|
Read Client ID
var txtTextBox="<%=txtMyTextBox.ClientID %>";
Get Value From This
var myValue=document.GetElementByID("txtTextBox");
Best Regards
-----------------
Abhijit Jana
Microsoft Certified Professional
"Success is Journey it's not a destination"
|
|
|
|
|
exact approach dear
but use
var myValue=document.getElementByID(txtTextBox);
instead of
var myValue=document.GetElementByID("txtTextBox");
or we can save a variable by using
var myValue=document.getElementByID("<%=txtMyTextBox.ClientID %>");
Ashish Sehajpal
modified on Wednesday, April 9, 2008 4:12 AM
|
|
|
|
|
Best Regards
-----------------
Abhijit Jana
Microsoft Certified Professional
"Success is Journey it's not a destination"
|
|
|
|
|
Ashish Sehajpal wrote: but use
var myValue=document.getElementByID("txtTextBox");
instead of
var myValue=document.GetElementByID("txtTextBox");
LOL - I think you meant to remove the quotes there somewhere.
Christian Graus
Please read this if you don't understand the answer I've given you
"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 )
|
|
|
|
|
even u have not noticed the SYNTAX of function dear.....
Ashish Sehajpal
|
|
|
|
|
Oh, I see. Yes, the G needed to be a g, AND the name needed not to be in quotes, so as to use the variable that was being declared.
Christian Graus
Please read this if you don't understand the answer I've given you
"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 )
|
|
|
|
|
Hi Friends,
I have one doubt,i m doing quiz questions in my webform so that i need to display time on the above web form it should decrease the time and when it reaches end it should display a message.Can any one help me how to do this.
Thanks & Regards
Senthil kumar.T.S
|
|
|
|
|
senthilsstil wrote: I have one doubt
But where is you doubt? Did you get any problem to implement it ?
Best Regards
-----------------
Abhijit Jana
Microsoft Certified Professional
"Success is Journey it's not a destination"
|
|
|
|
|
Hi Abhijit Jana,
Thanks for reply,my doubt is how to implement the timer and how to decrease the time.
Thanks & Regards
Senthil Kumar.T.S
|
|
|
|
|
As Christian Said... Java script is best idea to implement it
Best Regards
-----------------
Abhijit Jana
Microsoft Certified Professional
"Success is Journey it's not a destination"
|
|
|
|
|
Obviously this is done with javascript[^].
Christian Graus
Please read this if you don't understand the answer I've given you
"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 )
|
|
|
|
|
use this javascript in head tag of page and call GETCOUNT() funtion in body onload event of page...
here, dshow and dhide are jsut CSS classes which sets the display:none|block;
right
and btnsub is the submit button which will be disabled if time is OFF...right
lblrslt is the asp:label which will show messages or time....
<script language="javascript" type="text/javascript">
var d = new Date();
var yy=d.getFullYear();
var mm=d.getMonth();
var dd=d.getDate();
var hh=d.getHours();
var min =d.getMinutes();
//var m=1;
var m=parseInt(document.getElementById("lbltottime").innerHTML);
min=min + m;
if(min>60)
{
hh++;
min=min-60;
}
dateFuture = new Date(yy,mm,dd,hh,min,00);
document.getElementById("lbltottime").innerHTML=document.getElementById("lbltottime").innerHTML+ ' Min';
function GetCount()
{
dateNow = new Date();
amount = dateFuture.getTime() - dateNow.getTime(); //calc milliseconds between dates
delete dateNow;
if(document.getElementById('btnsub').value!='Submit')
{
amount=-1;
}
if(amount < 0)
{
if(document.getElementById('btnsub').value=='Submit')
{
document.getElementById('lblyrtim').innerHTML="00";
document.getElementById('btntestcomp').className='dshow';
document.getElementById('btnsub').className='dhide';
document.getElementById('btnsub').disabled=true;
document.getElementById('lblrslt').innerHTML="Your Time Is Over";
}
}
else{
days=0;hours=0;mins=0;secs=0;out="";
amount = Math.floor(amount/1000);//kill the "milliseconds" so just secs
days=Math.floor(amount/86400);//days
amount=amount%86400;
hours=Math.floor(amount/3600);//hours
amount=amount%3600;
mins=Math.floor(amount/60);//minutes
amount=amount%60;
secs=Math.floor(amount);//seconds
if(days != 0){out += days +" day"+((days!=1)?"s":"")+", ";}
if(days != 0 || hours != 0){out += hours +" hour"+((hours!=1)?"s":"")+", ";}
if(days != 0 || hours != 0 || mins != 0){out += mins+((mins!=1)?" m":"")+": ";}
out += secs +" s";
document.getElementById('lblyrtim').innerHTML=out;
setTimeout("GetCount()", 1000);
}
}
function callme()
{
window.clipboardData.clearData();
self.setTimeout("callme()", 10);
}
window.onload=function()
{
callme();
}
</script>
cheers !
Ashish Sehajpal
|
|
|
|
|
Hi Friends,
Thanks to all for replying.
Thanks & Regards
Senthil Kumar.T.S
|
|
|
|
|
In online Payment
When PayPal then sends confirmation back to my server with a single word, "VERIFIED" or "INVALID
Then in case of varified it must return the txn_id (which is transactionId
To which i want to save in my database
But i dont get any value in txn_id
Plz help me Out here
Christinn Can you help me
Raghvendra
Raghvendra
|
|
|
|
|
Please don't post the question over and over. As I told paypal support center will be good place to ask this.
Member 4659001 wrote: But i dont get any value in txn_id
Plz help me Out here
You need to explain more to get help. This doesn't make any sense. What have you tried ? What error you are getting ?
|
|
|
|
|
r u getting your request verified by paypal? (make it sure u r posting to exact LIVE URL instead of testing URL)
Ashish Sehajpal
|
|
|
|
|
In online Payment
When PayPal then sends confirmation back to my server with a single word, "VERIFIED" or "INVALID
Then in case of varified it must return the txn_id (which is transactionId
To which i want to save in my database
But i dont get any value in txn_id
Plz help me Out here
Raghvendra
|
|
|
|
|
This is wrong place. Try here[^]
|
|
|
|
|
Hey i have a page which is a quiz website..
one question is displayed in the .net page at a time and when i click next button it displays the next question in the same page same place....
I want my page such that if the user does not select ans /if he has selected ans and did not click next button , the next question should automatically be displayed
Thank you
Hepsi
|
|
|
|
|
Hey, why are you asking this again when I told you how to do it before ?
Christian Graus
Please read this if you don't understand the answer I've given you
"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 )
|
|
|
|
|
today it looks like people are asking same questions over and over
|
|
|
|
|
And that's different to every other day ?
Christian Graus
Please read this if you don't understand the answer I've given you
"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 )
|
|
|
|