File tree 2 files changed +5
-4
lines changed
2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -45,8 +45,8 @@ <h3>Would you like to lend anything?</h3>
45
45
< button id ="submit-item " type ="submit "> Submit your item</ button >
46
46
</ form >
47
47
</ section >
48
- < section class ="request-container hidden ">
49
- < form id ="request-form " class ="request-stuff ">
48
+ < section class ="request-container ">
49
+ < form id ="request-form " class ="hidden request-stuff ">
50
50
< input type ="text " id ="name-input " placeholder ="Enter your name here... " autocomplete ="off " required >
51
51
< input type ="email " id ="email-input " placeholder ="Enter your email here... " autocomplete ="off " required >
52
52
< input type ="number " id ="item-id " class ="hidden ">
Original file line number Diff line number Diff line change @@ -43,10 +43,11 @@ submitItemBtn.addEventListener("click", function(e) {
43
43
var xhrPost = new XMLHttpRequest ( ) ;
44
44
45
45
xhrPost . onreadystatechange = function ( ) {
46
- if ( xhrPost . readyState === 4 && xhrPost . status === 200 ) {
46
+ setTimeout ( ( ) => {
47
+ // horrible hacky fix for 302 redirect
47
48
console . log ( "submit item by lender successful!" ) ;
48
49
request ( "/testing" , "GET" , updateDom ) ;
49
- }
50
+ } , 500 ) ;
50
51
} ;
51
52
52
53
xhrPost . open ( "POST" , "/add-item" , true ) ;
You can’t perform that action at this time.
0 commit comments