Connecting Tech Pros Worldwide Help | Site Map

creating inputbox

 
LinkBack Thread Tools Search this Thread
  #1  
Old September 3rd, 2008, 05:58 AM
chelvan's Avatar
Member
 
Join Date: Aug 2008
Location: Colombo 06, Srilanka
Age: 24
Posts: 86
Default creating inputbox

hi
sorry again,
how to create an input box in javascript



thanks in advans
chel-1

Last edited by chelvan; September 3rd, 2008 at 06:18 AM. Reason: remove
Reply
  #2  
Old September 3rd, 2008, 06:19 AM
chelvan's Avatar
Member
 
Join Date: Aug 2008
Location: Colombo 06, Srilanka
Age: 24
Posts: 86
Default

hi
all
thanks.
i got it
chel-1
Reply
  #3  
Old September 3rd, 2008, 10:11 AM
acoder's Avatar
Site Moderator
 
Join Date: Nov 2006
Location: UK
Posts: 14,228
Default

Rather than just post that you solved it, you should also post how you managed to solve it. I assume you used document.createElement("input")?

Anyway, pleased that you did manage to solve it by yourself.
Reply
  #4  
Old September 3rd, 2008, 12:42 PM
chelvan's Avatar
Member
 
Join Date: Aug 2008
Location: Colombo 06, Srilanka
Age: 24
Posts: 86
Default

Quote:
Originally Posted by acoder
Rather than just post that you solved it, you should also post how you managed to solve it. I assume you used document.createElement("input")?

Anyway, pleased that you did manage to solve it by yourself.

ya....
i found it very simple

the code below

Expand|Select|Wrap|Line Numbers
  1. <script type="text/javascript">
  2. <!--
  3.  
  4. var code = prompt ("Enter The Administative Code", "DEFAULT");
  5. if(code=="guest@tropic"){
  6. document.write("<input type='button' name='b1' value='Click To Edit'/>");
  7. }
  8.  
  9. // -->
  10. </script>
  11.  
regards
chel-1

Last edited by acoder; September 3rd, 2008 at 02:20 PM. Reason: Added [code] tags
Reply
  #5  
Old September 3rd, 2008, 02:22 PM
acoder's Avatar
Site Moderator
 
Join Date: Nov 2006
Location: UK
Posts: 14,228
Default

If you want to create it after the page has loaded, you can't use document.write().

PS. please use code tags when posting code. Thanks.
Reply
  #6  
Old September 4th, 2008, 03:33 AM
chelvan's Avatar
Member
 
Join Date: Aug 2008
Location: Colombo 06, Srilanka
Age: 24
Posts: 86
Default

Quote:
Originally Posted by acoder
If you want to create it after the page has loaded, you can't use document.write().

PS. please use code tags when posting code. Thanks.
on javascript. i have a input dialogbox. is it able to read the inputs in hidden format

thanks.
chel-1
Reply
  #7  
Old September 4th, 2008, 10:30 AM
acoder's Avatar
Site Moderator
 
Join Date: Nov 2006
Location: UK
Posts: 14,228
Default

You mean the prompt()? No. You could create your own version of an input prompt making use of the password field.
Reply
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search


Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,662 network members.