Problem to update value

Hi,
Within Javascript below, I cannot update value into tb_pass. Why?
                    var name = this.$content.find('.name').val();
                    var newname = this.$content.find('.newname').val();
                    var status = this.$content.find('.status');
                    if (name == "") {
                        $.alert("Invalid password and please enter one valid password!");
                        return false;
                    }
                    if (name == newname) {
                        // status.val(scorePassword(name));
                        //$.alert('Valid Password is entered!');
                        var pass_val = document.getElementById("tb_pass").value;
                        pass_val = name;
						...
                <asp:Textbox ID="tb_pass"
                    width="310px"
                    Style='display:none;visibility:hidden;'
                    Font-Names="標楷體" 
                    Font-Size="11pt" 
                    Font-Bold="true"
                    ForeColor="Black"
                    runat="server" />
					...

Open in new window

LVL 12
HuaMin ChenProblem resolverAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Ryan ChongBusiness Systems Analyst , ex-Senior Application EngineerCommented:
do you mean something like this?

document.getElementById("tb_pass").value = "somevalue";

Open in new window

0
HuaMin ChenProblem resolverAuthor Commented:
After the execution of above Javascript codes, I further see no value to tb_pass. Why?
0
Ryan ChongBusiness Systems Analyst , ex-Senior Application EngineerCommented:
I further see no value to tb_pass. Why?
as only partial script is posted here, we can't really debug for you.

it would probably some JavaScript error occurred which prevent your scripts to be executed successfully.

try open the browser's Inspect feature, and go to relevant Console or Debug panel and see if there's any errors detected there?
0
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

Ryan ChongBusiness Systems Analyst , ex-Senior Application EngineerCommented:
anyway, your text field is not visible:

<asp:Textbox ID="tb_pass"
                    width="310px"
                    Style='display:none;visibility:hidden;'
                    Font-Names="標楷體"
                    Font-Size="11pt"
                    Font-Bold="true"
                    ForeColor="Black"
                    runat="server" />

you may consider to remove that line of code temporarily for debugging.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
HuaMin ChenProblem resolverAuthor Commented:
To

http://my-friend.co/UserMaintenance2/Default.aspx?userid=mc4&readonly=n

you can choose 1st button (for password), by inputting one password for testing, to see tb_pass.Text does not capture the value well.
0
Ryan ChongBusiness Systems Analyst , ex-Senior Application EngineerCommented:
getting an error at:

$(this).parent().next().modal("show");

Open in new window


in JavaScript1.js:198:17

what is purpose of this line for?
you may try to remark it and try again?
0
HuaMin ChenProblem resolverAuthor Commented:
I removed the line. But tb_pass still cannot capture the value (of input to the prompt password), after re-deployment.
0
Ryan ChongBusiness Systems Analyst , ex-Senior Application EngineerCommented:
instead of :
var pass_val = document.getElementById("tb_pass").value;
                        pass_val = name;

Open in new window


you should try:

document.getElementById("tb_pass").value = name;

Open in new window

0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP.NET

From novice to tech pro — start learning today.