Guest User

Untitled

a guest
Oct 24th, 2018
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.95 KB | None | 0 0
  1. <form method="post" action="./post_discussion.php" name="newdiscussion">
  2. <span style="font-size:16px; font-weight:bold; font-family:Arial, Helvetica, sans-serif">Title: </span>
  3.  
  4. <input id="title_text" name="title_text" style="width:650px; margin-left:10px;" type="text" placeholder="Whats the title of your discussion? Be clear." required="required" />
  5. <br/><br/>
  6. <div style="margin-top:10px; font-weight:bold; font-family:Arial, Helvetica, sans-serif;">Make your point</div>
  7.  
  8. <textarea id="text_area" name="text_area" style=" height:200px; margin-top:10px;" placeholder="Describe your point of discussion. Be clear on the point and provide convincing
  9. evidence.A claim without evidance will not be encouraged by the site." cols="90" required="required"/>
  10. </textarea><br />
  11.  
  12. <div style="margin-top:10px; margin-bottom:5px; font-weight:bold; font-family:Arial, Helvetica, sans-serif;">Tags</div>
  13. <input id="tags_textfield" onkeyup="tags_generator()" name="tags_textfield" type="text" style="width:500px;" placeholder="Enter atleast one tag" onblur="clear_tags()" autocomplete="off" required="required"/>
  14.  
  15. <ul id="tags_ul"><div id="tag_drop_down"></div></ul><br/>
  16.  
  17. <div style="margin-top:10px; margin-bottom:5px; font-weight:bold; font-family:Arial, Helvetica, sans-serif;">Users involved</div>
  18. <input id="uids_textfield" name="uids_textfield" type="text" style="width:500px;" placeholder="Enter all the users involved" required="required"/>
  19. <br/>
  20.  
  21. <?php
  22. if(!isset($_COOKIE["username"]))
  23. {
  24. echo '<div id="comment">You are not signed in. Please enter your credintials to post the discussion.</div><br/>';
  25. echo 'Username: <input id="bottom_username" type="text" name="username"/><br/>
  26. Password: <input id="bottom_password" name="password" type="password"/>';
  27. echo '<br/><br/>
  28. <input id="post_button" onclick="new_discussion(0)" type="button" value="Post the discussion" style="margin-top:10px;"/>';
  29. }
  30. else
  31. echo '<br/><br/>
  32. <input id="post_button" type="button" onclick="new_discussion(1)" value="Post the discussion" style="margin-top:10px;"/>';
  33. ?>
  34.  
  35. function new_discussion(arg)
  36. {
  37. if(arg==1)
  38. {
  39.  
  40. document.forms.newdiscussion.submit();
  41. }
  42. else
  43. {
  44. //some logic here
  45. }
  46. }
  47.  
  48. if(document.getElementById('submit') != undefined) {
  49. // start new discussion
  50. ...
  51. } else {
  52. // do login and start new discussion
  53. ...
  54. }
  55.  
  56. <input id="uids_textfield" name="uids_textfield" type="text" style="width:500px;" placeholder="Enter all the users involved" required="required"/>
  57.  
  58. <input id="uids_textfield" name="uids_textfield" type="text" style="width:500px;" placeholder="Enter all the users involved" required />
  59.  
  60. document.newdiscussion.submit();
  61.  
  62. <html:form styleId="myForm" action="/login" onsubmit="return demo()">
  63.  
  64. <input type="submit" value="login" />
  65.  
  66. demo(){
  67. var x = document.getElementById("one").value;
  68. if (x == "") {
  69. alert("Name must be filled out");
  70. return false;
  71. }else{
  72. document.getElementById("myForm").submit();
  73. }`
Add Comment
Please, Sign In to add comment