File tree Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -135,20 +135,36 @@ <h1><center><b>Wiki | FAQ | More Links</b></center></h1><button onclick=createWi
135135
136136 < h2 > Saved Pages:</ h2 >
137137 < ul id ="wikiPages "> </ ul >
138-
138+
139139 < div id ="wikiPageView " style ="display: none; ">
140140 < h2 id ="viewTitle "> </ h2 >
141141 < iframe id ="viewContent " style ="width: 100%; height: 300px; border: none; "> </ iframe >
142142 < button onclick ="closePageView() "> Close Page</ button >
143143 </ div >
144+ < script >
145+ // Get the content element by its ID
146+ const content = document . getElementById ( "wikiForm" ) ;
147+
148+ // Check the current display style and toggle between "none" and "block"
149+ if ( content . style . display === "none" || content . style . display === "" ) {
150+ content . style . display = "block" ; // Show the content
151+ } else {
152+ content . style . display = "none" ; // Hide the content
153+ }
154+
144155
156+ </ script >
145157 < script >
146158
147159 function createWikiPage ( ) {
148160 const title = document . getElementById ( 'pageTitle' ) . value ;
149161 const content = document . getElementById ( 'pageContent' ) . value ;
150162 const username = localStorage . getItem ( 'username' ) ;
163+ // Get the content element by its ID
164+ const content = document . getElementById ( "wikiForm" ) ;
151165
166+ // Change its display style to "block" to make it visible
167+ content . style . display = "block" ;
152168 if ( ! title || ! content ) {
153169 alert ( 'Please enter both a title and content.' ) ;
154170 return ;
You can’t perform that action at this time.
0 commit comments