Connecting Tech Pros Worldwide Help | Site Map
Reply
 
LinkBack Thread Tools Search this Thread
  #1  
Old September 3rd, 2008, 06:58 AM
chelvan's Avatar
Member
 
Join Date: Aug 2008
Location: Colombo 06, Srilanka
Age: 23
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 07:18 AM. Reason: remove
Reply
  #2  
Old September 3rd, 2008, 07:19 AM
chelvan's Avatar
Member
 
Join Date: Aug 2008
Location: Colombo 06, Srilanka
Age: 23
Posts: 86
Default

hi
all
thanks.
i got it
chel-1
Reply
  #3  
Old September 3rd, 2008, 11:11 AM
acoder's Avatar
Site Moderator
 
Join Date: Nov 2006
Location: UK
Posts: 12,964
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, 01:42 PM
chelvan's Avatar
Member
 
Join Date: Aug 2008
Location: Colombo 06, Srilanka
Age: 23
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 03:20 PM. Reason: Added [code] tags
Reply
  #5  
Old September 3rd, 2008, 03:22 PM
acoder's Avatar
Site Moderator
 
Join Date: Nov 2006
Location: UK
Posts: 12,964
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, 04:33 AM
chelvan's Avatar
Member
 
Join Date: Aug 2008
Location: Colombo 06, Srilanka
Age: 23
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, 11:30 AM
acoder's Avatar
Site Moderator
 
Join Date: Nov 2006
Location: UK
Posts: 12,964
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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

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 205,248 network members.