hi all,
i had a page where there are three text boxes.username,password,allocatedmemory. Now when i placed an invalid number in allocated memory after submit button click it wil display a popup as invalid.so after clicking ok button,i need the value present in allocated memory to be cleared and cursor should focus on it.
so can any one please...

Recommended Answers

All 3 Replies

Member Avatar for rajarajan2017

Set its value to ""

i had done it but i didnt get the data of allocated memory cleared

Hey,
You can use Java Script to achieve this.
1. On submit call a function
2. Check for your condition
3. If failed do this
document.getElementById("Id of memory text box").value = "";
document.getElementById("Id of memory text box").focus();

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.