onSubmit relocation only works once |
onSubmit relocation only works once |
Jimbus |
Aug 9 2023, 01:50 PM
Post
#1
|
Group: Members Posts: 2 Joined: 9-August 23 Member No.: 29,013 |
I'm using the following code to relocate the page from the Main Category page to the Sub-Category page:
CODE <select name="category" class="text-left form-control" onchange="location = this.value;"> <option value="" selected>--- Select Category Item ---</option> And is works well... until the back button is pushed and the same category is chosen, again. It won't go, it does nothing, in fact, no category can be revisited until the page is reloaded. Why would an onSubmit work only once? Each pulldown is constructed via a coldFusion loop, but I don't think there's any issue there, it's been in production for about 7 years. I'll incloude rest of the html/code below CODE <cfloop query="getCategories"> <!---I want all the catoegories except clearance and specials since im using these categories as links in the top div above and i dont want cband category either.---> <cfif #CategoryName# neq "Clearance" AND #CategoryName# neq "Specials" and #CategoryName# neq "c-band"> <cfset ArrayAppend(variables.categoryList, "#CategoryName#")> <cfset ArrayAppend(variables.categoryImages, "#CatImage#")> </cfif> </cfloop> <div class="content-fluid" id="innermain-container"> <div class="row"> <div class="col-12 text-center"> <h4>Collins Distribution Home</h4> </div> </div> <cfset counter = 1> <div class="row" id="innermain-container-row"> <cfloop index="category" array="#variables.categoryList#"> <div class="col-sm-6 my-3 text-center"> <cfoutput> <h6 class="bold-text text-center">#category#</h6> <img class="img-responsive center-block" src="/shopcart/images/categories/#variables.categoryImages[counter]#" alt="#category#"> </cfoutput> <cfset counter = counter + 1 > <select name="category" class="text-left form-control" onchange="location = this.value;"> <option value="" selected>--- Select Category Item ---</option> <cfoutput query="getItems"> <cfif #CategoryName# eq #category#> <option value="/cddata/index.cfm?AppReq=vwcat&CategoryID=#URLEncodedFormat (Code)#"> #Description# </option> </cfif> </cfoutput> </select> </div> </cfloop> </div> </div> |
Lo-Fi Version | Time is now: 8th June 2024 - 01:17 AM |