Connecting Tech Pros Worldwide Help | Site Map

creating inputbox

chelvan's Avatar
Member
 
Join Date: Aug 2008
Location: Colombo 06, Srilanka
Posts: 86
#1: Sep 3 '08
hi
sorry again,
how to create an input box in javascript



thanks in advans
chel-1
chelvan's Avatar
Member
 
Join Date: Aug 2008
Location: Colombo 06, Srilanka
Posts: 86
#2: Sep 3 '08

re: creating inputbox


hi
all
thanks.
i got it
chel-1
acoder's Avatar
Site Moderator
 
Join Date: Nov 2006
Location: UK
Posts: 14,581
#3: Sep 3 '08

re: creating inputbox


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.
chelvan's Avatar
Member
 
Join Date: Aug 2008
Location: Colombo 06, Srilanka
Posts: 86
#4: Sep 3 '08

re: creating inputbox


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
acoder's Avatar
Site Moderator
 
Join Date: Nov 2006
Location: UK
Posts: 14,581
#5: Sep 3 '08

re: creating inputbox


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.
chelvan's Avatar
Member
 
Join Date: Aug 2008
Location: Colombo 06, Srilanka
Posts: 86
#6: Sep 4 '08

re: creating inputbox


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
acoder's Avatar
Site Moderator
 
Join Date: Nov 2006
Location: UK
Posts: 14,581
#7: Sep 4 '08

re: creating inputbox


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


Similar JavaScript / Ajax / DHTML bytes