Can't get the variable

B

Boki

Hi All,

I have many buttons that mapping many textbox, when I click button, I
want to show a string that contains button number( and the mapping
string ), but it failed.

Here is the code:
/////////////////////////////////////////////////////////////////////
<%response.write"<input type='button' name='bt_resone"& a &"'
value='Save' onclick='resone("&a&")'>"%>


function resone(cnt)
{
alert("document.all.txt_note"+cnt)
}

////////////////////////////////////////////////

It seems that the component I called is not there...
Could you please advice? Thank you so much!

Best regards,
Boki.
 
B

Boki

Boki said:
Hi All,

I have many buttons that mapping many textbox, when I click button, I
want to show a string that contains button number( and the mapping
string ), but it failed.

Here is the code:
/////////////////////////////////////////////////////////////////////
<%response.write"<input type='button' name='bt_resone"& a &"'
value='Save' onclick='resone("&a&")'>"%>


function resone(cnt)
{
alert("document.all.txt_note"+cnt)
}

////////////////////////////////////////////////

It seems that the component I called is not there...
Could you please advice? Thank you so much!

..... it should be ... can javascript convert int to string directly? (
no enviroment to test now...)
alert(document.all.txt_note+cnt)
 
T

Tim Slattery

Boki said:
.... it should be ... can javascript convert int to string directly? (

Yes, the toString(...) function does exactly that.

var xx = 5;

var yy = xx.toString();

yy is a String containing "5".
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,794
Messages
2,569,641
Members
45,355
Latest member
SJLChristi

Latest Threads

Top